Changeset 6011788 in sasview for src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
- Timestamp:
- May 15, 2017 5:21:45 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:
- 2241130
- Parents:
- ad6b4e2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
rad6b4e2 r6011788 34 34 from sas.qtgui.Perspectives.Fitting.FitPage import FitPage 35 35 from sas.qtgui.Perspectives.Fitting.ViewDelegate import ModelViewDelegate 36 from sas.qtgui.Perspectives.Fitting.ViewDelegate import PolyViewDelegate 36 37 37 38 TAB_MAGNETISM = 4 … … 77 78 self.chi2 = None 78 79 80 # Does the control support UNDO/REDO 81 # temporarily off 82 self.support_undo = False 83 79 84 # Data for chosen model 80 85 self.model_data = None … … 146 151 self.setPolyModel() 147 152 self.setTableProperties(self.lstPoly) 153 # Delegates for custom editing and display 154 self.lstPoly.setItemDelegate(PolyViewDelegate(self)) 148 155 149 156 # Magnetism model displayed in magnetism list … … 361 368 self.createDefaultDataset() 362 369 363 # TODO: update state stack 364 #state = self.currentState() 370 # Update state stack 371 if self.support_undo: 372 state = self.currentState() 373 self.pushFitPage(state) 365 374 366 375 def onSelectStructureFactor(self): … … 850 859 851 860 # Extract changed value. Assumes proper validation by QValidator/Delegate 852 # TODO: disable model update for uneditable cells/columns853 861 try: 854 862 value = float(item.text()) … … 1068 1076 checked_list = ["Distribution of "+param.name, str(param.default), 1069 1077 str(param.limits[0]), str(param.limits[1]), 1070 "35", "3", " "]1078 "35", "3", "gaussian"] 1071 1079 FittingUtilities.addCheckedListToModel(self._poly_model, checked_list) 1072 1080 1073 1081 #TODO: Need to find cleaner way to input functions 1074 func = QtGui.QComboBox()1075 func.addItems(['rectangle', 'array', 'lognormal', 'gaussian', 'schulz',])1076 func_index = self.lstPoly.model().index(row, 6)1077 self.lstPoly.setIndexWidget(func_index, func)1082 #func = QtGui.QComboBox() 1083 #func.addItems(['rectangle', 'array', 'lognormal', 'gaussian', 'schulz',]) 1084 #func_index = self.lstPoly.model().index(row, 6) 1085 #self.lstPoly.setIndexWidget(func_index, func) 1078 1086 1079 1087 FittingUtilities.addPolyHeadersToModel(self._poly_model) … … 1179 1187 self.q_range_max = fp.fit_options[fp.MAX_RANGE] 1180 1188 self.npts = fp.fit_options[fp.NPTS] 1181 #fp.fit_options[fp.NPTS_FIT] = self.npts_fit1182 1189 self.log_points = fp.fit_options[fp.LOG_POINTS] 1183 1190 self.weighting = fp.fit_options[fp.WEIGHTING] … … 1258 1265 Add a new fit page object with current state 1259 1266 """ 1260 #page_stack.append(new_page)1267 self.page_stack.append(new_page) 1261 1268 pass 1262 1269 … … 1265 1272 Remove top fit page from stack 1266 1273 """ 1267 #ifpage_stack:1268 #page_stack.pop()1274 if self.page_stack: 1275 self.page_stack.pop() 1269 1276 pass 1270 1277
Note: See TracChangeset
for help on using the changeset viewer.