Changeset a95c44b in sasview for src/sas/qtgui/Perspectives/Fitting
- Timestamp:
- Oct 13, 2017 5:38:54 AM (7 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:
- c7358b2
- Parents:
- ca7c6bd
- Location:
- src/sas/qtgui/Perspectives/Fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py ¶
rca7c6bd ra95c44b 131 131 Adds predefined headers to the model 132 132 """ 133 model.parameter_headers = ['Parameter', 'Value', 'Min', 'Max', 'Units'] 134 #model.setHeaderData(0, QtCore.Qt.Horizontal, QtCore.QVariant("Parameter")) 135 #model.setHeaderData(1, QtCore.Qt.Horizontal, QtCore.QVariant("Value")) 136 #model.setHeaderData(2, QtCore.Qt.Horizontal, QtCore.QVariant("Min")) 137 #model.setHeaderData(3, QtCore.Qt.Horizontal, QtCore.QVariant("Max")) 138 #model.setHeaderData(4, QtCore.Qt.Horizontal, QtCore.QVariant("Units")) 139 133 model.setHeaderData(0, QtCore.Qt.Horizontal, QtCore.QVariant("Parameter")) 134 model.setHeaderData(1, QtCore.Qt.Horizontal, QtCore.QVariant("Value")) 135 model.setHeaderData(2, QtCore.Qt.Horizontal, QtCore.QVariant("Min")) 136 model.setHeaderData(3, QtCore.Qt.Horizontal, QtCore.QVariant("Max")) 137 model.setHeaderData(4, QtCore.Qt.Horizontal, QtCore.QVariant("Units")) 138 139 model.header_tooltips = ['Select parameter for fitting', 140 'Enter parameter value', 141 'Enter minimum value for parameter', 142 'Enter maximum value for parameter', 143 'Unit of the parameter'] 140 144 def addErrorHeadersToModel(model): 141 145 """ … … 148 152 model.setHeaderData(4, QtCore.Qt.Horizontal, QtCore.QVariant("Max")) 149 153 model.setHeaderData(5, QtCore.Qt.Horizontal, QtCore.QVariant("Units")) 154 155 model.header_tooltips = ['Select parameter for fitting', 156 'Enter parameter value', 157 'Error value for fitted parameter', 158 'Enter minimum value for parameter', 159 'Enter maximum value for parameter', 160 'Unit of the parameter'] 150 161 151 162 def addPolyHeadersToModel(model): … … 161 172 model.setHeaderData(6, QtCore.Qt.Horizontal, QtCore.QVariant("Function")) 162 173 model.setHeaderData(7, QtCore.Qt.Horizontal, QtCore.QVariant("Filename")) 174 175 model.header_tooltips = ['Select parameter for fitting', 176 'Enter polydispersity ratio (STD/mean). ' 177 'STD: standard deviation from the mean value', 178 'Enter minimum value for parameter', 179 'Enter maximum value for parameter', 180 'Enter number of points for parameter', 181 'Enter number of sigmas parameter', 182 'Select distribution function', 183 'Select filename with user-definable distribution'] 163 184 164 185 def addErrorPolyHeadersToModel(model): … … 175 196 model.setHeaderData(7, QtCore.Qt.Horizontal, QtCore.QVariant("Function")) 176 197 model.setHeaderData(8, QtCore.Qt.Horizontal, QtCore.QVariant("Filename")) 198 199 model.header_tooltips = ['Select parameter for fitting', 200 'Enter polydispersity ratio (STD/mean). ' 201 'STD: standard deviation from the mean value', 202 'Error value for fitted parameter', 203 'Enter minimum value for parameter', 204 'Enter maximum value for parameter', 205 'Enter number of points for parameter', 206 'Enter number of sigmas parameter', 207 'Select distribution function', 208 'Select filename with user-definable distribution'] 177 209 178 210 def addShellsToModel(parameters, model, index): -
TabularUnified src/sas/qtgui/Perspectives/Fitting/FittingWidget.py ¶
rca7c6bd ra95c44b 56 56 QtGui.QStandardItemModel.__init__(self,parent) 57 57 58 super(ToolTippedItemModel, self).__init__()59 self.parent = parent60 self.parameter_headers = None61 62 # optional method for Model class63 58 def headerData(self, section, orientation, role): 64 59 65 60 if role == QtCore.Qt.ToolTipRole: 66 61 if orientation == QtCore.Qt.Horizontal: 67 return QtCore.QString("Horizontal Header Tooltip for %s" % str(self.parameter_headers[section])) 68 69 if role == QtCore.Qt.DisplayRole: 70 if orientation == QtCore.Qt.Horizontal: 71 return QtCore.QString(self.parameter_headers[section]) 72 62 return QtCore.QString(str(self.header_tooltips[section])) 63 64 return QtGui.QStandardItemModel.headerData(self, section, orientation, role) 73 65 74 66 class FittingWidget(QtGui.QWidget, Ui_FittingWidgetUI):
Note: See TracChangeset
for help on using the changeset viewer.