Changes in / [ef2cdb3:cb05bfd] in sasview
- Location:
- src/sas/sasgui/perspectives/fitting
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/basepage.py
r4387385 r9e0aa69a 53 53 ON_MAC = True 54 54 55 CUSTOM_MODEL = 'Plugin Models'56 CUSTOM_MODEL_OLD = 'Customized Models'57 58 55 class BasicPage(ScrolledPanel, PanelBase): 59 56 """ 60 This class provide general structure of thefitpanel page57 This class provide general structure of fitpanel page 61 58 """ 62 59 # Internal name for the AUI manager … … 680 677 def _copy_info(self, flag): 681 678 """ 682 Send event d epending on flag683 684 : Param flag: flag that distinguish es theevent679 Send event dpemding on flag 680 681 : Param flag: flag that distinguish event 685 682 """ 686 683 # messages depending on the flag … … 1122 1119 :precondition: the page is already drawn or created 1123 1120 1124 :postcondition: the state of the underlying data change sas well as the1121 :postcondition: the state of the underlying data change as well as the 1125 1122 state of the graphic interface 1126 1123 """ … … 1159 1156 # select the current model 1160 1157 state._convert_to_sasmodels() 1161 if state.categorycombobox == CUSTOM_MODEL_OLD:1162 state.categorycombobox = CUSTOM_MODEL1163 1158 state.categorycombobox = unicode(state.categorycombobox) 1164 1159 if state.categorycombobox in self.categorybox.Items: … … 1172 1167 self._show_combox(None) 1173 1168 from models import PLUGIN_NAME_BASE 1174 if self.categorybox.GetValue() == CUSTOM_MODEL\1169 if self.categorybox.GetValue() == 'Customized Models' \ 1175 1170 and PLUGIN_NAME_BASE not in state.formfactorcombobox: 1176 1171 state.formfactorcombobox = \ … … 1340 1335 def _selectDlg(self): 1341 1336 """ 1342 open a dialog file to select the customized polydispersity function1337 open a dialog file to selected the customized dispersity 1343 1338 """ 1344 1339 if self.parent is not None: … … 1765 1760 def _set_multfactor_combobox(self, multiplicity=10): 1766 1761 """ 1767 Set comboBox for mu ltitfactor of CoreMultiShellModel1762 Set comboBox for muitfactor of CoreMultiShellModel 1768 1763 :param multiplicit: no. of multi-functionality 1769 1764 """ … … 1803 1798 Fill panel's combo box according to the type of model selected 1804 1799 """ 1805 1800 custom_model = 'Customized Models' 1806 1801 mod_cat = self.categorybox.GetStringSelection() 1807 1802 self.structurebox.SetSelection(0) … … 1812 1807 m_list = [] 1813 1808 try: 1814 if mod_cat == CUSTOM_MODEL:1809 if mod_cat == custom_model: 1815 1810 for model in self.model_list_box[mod_cat]: 1816 1811 m_list.append(self.model_dict[model.name]) … … 3458 3453 fills out the category list box 3459 3454 """ 3460 uncat_str = ' PluginModels'3455 uncat_str = 'Customized Models' 3461 3456 self._read_category_info() 3462 3457 … … 3487 3482 self.model_box.Clear() 3488 3483 3489 if category == ' PluginModels':3484 if category == 'Customized Models': 3490 3485 for model in self.model_list_box[category]: 3491 3486 str_m = str(model).split(".")[0] -
src/sas/sasgui/perspectives/fitting/fitpage.py
r3d55219 r3d55219 31 31 SMEAR_SIZE_L = 0.00 32 32 SMEAR_SIZE_H = 0.00 33 CUSTOM_MODEL = 'Plugin Models' 33 34 34 35 35 class FitPage(BasicPage): … … 1249 1249 wx.PostEvent(self.parent, new_event) 1250 1250 # update list of plugins if new plugin is available 1251 custom_model = CUSTOM_MODEL1251 custom_model = 'Customized Models' 1252 1252 mod_cat = self.categorybox.GetStringSelection() 1253 1253 if mod_cat == custom_model: -
src/sas/sasgui/perspectives/fitting/fitting.py
re92a352 r73cbeec 225 225 226 226 self.id_edit = wx.NewId() 227 editmodel_help = "Edit customized model sample file" 227 228 self.menu1.AppendMenu(self.id_edit, "Plugin Model Operations", 228 self.edit_model_menu )229 self.edit_model_menu, editmodel_help) 229 230 #create menubar items 230 231 return [(self.menu1, self.sub_menu)] … … 259 260 self.update_custom_combo() 260 261 if os.path.isfile(p_path): 261 msg = "Sorry! unable to delete the default "262 msg += " pluginmodel... \n"262 msg = "Sorry! Could not be able to delete the default " 263 msg += "custom model... \n" 263 264 msg += "Please manually remove the files (.py, .pyc) " 264 265 msg += "in the 'plugin_models' folder \n" … … 273 274 if item.GetLabel() == label: 274 275 self.edit_menu.DeleteItem(item) 275 msg = "The pluginmodel, %s, has been deleted." % label276 msg = "The custom model, %s, has been deleted." % label 276 277 evt = StatusEvent(status=msg, type='stop', info='info') 277 278 wx.PostEvent(self.parent, evt) … … 330 331 temp = self.fit_panel.reset_pmodel_list() 331 332 if temp: 332 # Set the new pluginmodel list for all fit pages333 # Set the new custom model list for all fit pages 333 334 for uid, page in self.fit_panel.opened_pages.iteritems(): 334 335 if hasattr(page, "formfactorbox"): -
src/sas/sasgui/perspectives/fitting/models.py
re92a352 r0de74af 325 325 self.plugins.append(plug) 326 326 self.model_dictionary[name] = plug 327 self.model_combobox.set_list(" PluginModels", self.plugins)327 self.model_combobox.set_list("Customized Models", self.plugins) 328 328 return self.model_combobox.get_list() 329 329 else: … … 346 346 self.model_dictionary[name] = plug 347 347 348 self.model_combobox.reset_list(" PluginModels", self.plugins)348 self.model_combobox.reset_list("Customized Models", self.plugins) 349 349 return self.model_combobox.get_list() 350 350 … … 389 389 # self.shape_indep_list) 390 390 self.model_combobox.set_list("Structure Factors", self.struct_list) 391 self.model_combobox.set_list(" PluginModels", self.plugins)391 self.model_combobox.set_list("Customized Models", self.plugins) 392 392 self.model_combobox.set_list("P(Q)*S(Q)", self.multiplication_factor) 393 393 self.model_combobox.set_list("multiplication", -
src/sas/sasgui/perspectives/fitting/pagestate.py
r4387385 r6d2b50b 33 33 from sas.sascalc.dataloader.data_info import Data2D, Collimation, Detector 34 34 from sas.sascalc.dataloader.data_info import Process, Aperture 35 36 35 # Information to read/write state as xml 37 36 FITTING_NODE_NAME = 'fitting_plug_in' 38 37 CANSAS_NS = "cansas1d/1.0" 39 40 CUSTOM_MODEL = 'Plugin Models'41 CUSTOM_MODEL_OLD = 'Customized Models'42 38 43 39 LIST_OF_DATA_ATTRIBUTES = [["is_data", "is_data", "bool"], … … 382 378 'Sphere' : 'adsorbed_layer', 383 379 'Structure Factor' : 'hardsphere', 384 CUSTOM_MODEL_OLD : '', 385 CUSTOM_MODEL : '' 380 'Customized Models' : '' 386 381 } 387 382 if self.categorycombobox == '':
Note: See TracChangeset
for help on using the changeset viewer.