Changeset 811bec1 in sasview for src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
- Timestamp:
- Mar 17, 2017 4:22:23 AM (8 years ago)
- Branches:
- ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 4d457df
- Parents:
- cd31251
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
rcd31251 r811bec1 38 38 Main widget for selecting form and structure factor models 39 39 """ 40 def __init__(self, manager=None, parent=None, data=None, id=1): 41 """ 42 43 :param manager: 44 :param parent: 45 :return: 46 """ 40 def __init__(self, parent=None, data=None, id=1): 41 47 42 super(FittingWidget, self).__init__() 48 43 … … 69 64 self.tab_id = id 70 65 71 # Parameters66 # Range parameters 72 67 self.q_range_min = QMIN_DEFAULT 73 68 self.q_range_max = QMAX_DEFAULT 74 69 self.npts = NPTS_DEFAULT 70 75 71 # Main Data[12]D holder 76 72 self._data = None … … 88 84 self._magnet_model = QtGui.QStandardItemModel() 89 85 90 # Set the proxy models for display91 # Main display92 self._model_proxy = QtGui.QSortFilterProxyModel()93 self._model_proxy.setSourceModel(self._model_model)94 #self._model_proxy.setFilterRegExp(r"[^()]")95 96 # Proxy display97 self._poly_proxy = QtGui.QSortFilterProxyModel()98 self._poly_proxy.setSourceModel(self._poly_model)99 self._poly_proxy.setFilterRegExp(r"[^()]")100 101 # Magnetism display102 self._magnet_proxy = QtGui.QSortFilterProxyModel()103 self._magnet_proxy.setSourceModel(self._magnet_model)104 #self._magnet_proxy.setFilterRegExp(r"[^()]")105 106 86 # Param model displayed in param list 107 87 self.lstParams.setModel(self._model_model) 108 #self.lstParams.setModel(self._model_proxy)109 88 self.readCategoryInfo() 110 89 self.model_parameters = None … … 112 91 113 92 # Poly model displayed in poly list 114 self.lstPoly.setModel(self._poly_ proxy)93 self.lstPoly.setModel(self._poly_model) 115 94 self.setPolyModel() 116 95 self.setTableProperties(self.lstPoly) … … 251 230 structure_factors = ["None"] 252 231 self.cbStructureFactor.clear() 253 for (structure_factor, _) in structure_factor_list: 254 structure_factors.append(structure_factor) 232 structure_factors = [factor[0] for factor in structure_factor_list] 255 233 self.cbStructureFactor.addItems(sorted(structure_factors)) 256 234 … … 365 343 If so, returns the name of the counter parameter and the number of shells 366 344 """ 367 iter_param = ""368 iter_length = 0369 370 345 iter_params = self.getIterParams(model) 371 # pull out the iterator parameter name and length 372 if iter_params: 373 iter_length = iter_params[0].length 374 iter_param = iter_params[0].length_control 375 return (iter_param, iter_length) 346 # return the iterator parameter name and length 347 return (iter_params[0].length_control if iter_params else "", 348 iter_params[0].length if iter_params else 0) 376 349 377 350 def addBackgroundToModel(self, model): … … 392 365 393 366 def addCheckedListToModel(self, model, param_list): 367 """ 368 Add a QItem to model. Makes the QItem checkable 369 """ 394 370 assert isinstance(model, QtGui.QStandardItemModel) 395 371 item_list = [QtGui.QStandardItem(item) for item in param_list]
Note: See TracChangeset
for help on using the changeset viewer.