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