Changeset ca7c6bd in sasview for src


Ignore:
Timestamp:
Oct 9, 2017 9:26:07 AM (7 years ago)
Author:
wojciech
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
Message:

Attempt to pass parameters

Location:
src/sas/qtgui/Perspectives/Fitting
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py

    r8222f171 rca7c6bd  
    131131    Adds predefined headers to the model 
    132132    """ 
    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")) 
    138139 
    139140def addErrorHeadersToModel(model): 
  • src/sas/qtgui/Perspectives/Fitting/FittingWidget.py

    r13cd397 rca7c6bd  
    5656        QtGui.QStandardItemModel.__init__(self,parent) 
    5757 
     58        super(ToolTippedItemModel, self).__init__() 
     59        self.parent = parent 
     60        self.parameter_headers = None 
     61 
    5862    # optional method for Model class 
    5963    def headerData(self, section, orientation, role): 
     
    6165        if role == QtCore.Qt.ToolTipRole: 
    6266            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 
    6673 
    6774class FittingWidget(QtGui.QWidget, Ui_FittingWidgetUI): 
Note: See TracChangeset for help on using the changeset viewer.