Changeset ca7c6bd in sasview for src/sas/qtgui/Perspectives
- Timestamp:
- Oct 9, 2017 9:26:07 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:
- a95c44b
- Parents:
- 13cd397
- Location:
- src/sas/qtgui/Perspectives/Fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py
r8222f171 rca7c6bd 131 131 Adds predefined headers to the model 132 132 """ 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")) 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")) 138 139 139 140 def addErrorHeadersToModel(model): -
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
r13cd397 rca7c6bd 56 56 QtGui.QStandardItemModel.__init__(self,parent) 57 57 58 super(ToolTippedItemModel, self).__init__() 59 self.parent = parent 60 self.parameter_headers = None 61 58 62 # optional method for Model class 59 63 def headerData(self, section, orientation, role): … … 61 65 if role == QtCore.Qt.ToolTipRole: 62 66 if orientation == QtCore.Qt.Horizontal: 63 return QtCore.QString("Horizontal Header %s Tooltip" % str(section)) 64 else: 65 return QtCore.QString("Vertical Header %s Tooltip" % str(section)) 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 66 73 67 74 class FittingWidget(QtGui.QWidget, Ui_FittingWidgetUI):
Note: See TracChangeset
for help on using the changeset viewer.