Changeset 2aa960a in sasview for src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
- Timestamp:
- Oct 25, 2017 9:01:37 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:
- aae5f4c
- Parents:
- e7a0b2f (diff), f7d14a1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
ra95c44b rf7d14a1 13 13 from PyQt4 import QtWebKit 14 14 15 from sasmodels import product 15 16 from sasmodels import generate 16 17 from sasmodels import modelinfo … … 52 53 53 54 class ToolTippedItemModel(QtGui.QStandardItemModel): 54 55 def __init__(self, parent = None): 55 """ 56 Subclass from QStandardItemModel to allow displaying tooltips in 57 QTableView model. 58 """ 59 def __init__(self, parent=None): 56 60 QtGui.QStandardItemModel.__init__(self,parent) 57 61 58 62 def headerData(self, section, orientation, role): 59 63 """ 64 Displays tooltip for each column's header 65 :param section: 66 :param orientation: 67 :param role: 68 :return: 69 """ 60 70 if role == QtCore.Qt.ToolTipRole: 61 71 if orientation == QtCore.Qt.Horizontal: … … 136 146 def data(self, value): 137 147 """ data setter """ 148 # Value is either a list of indices for batch fitting or a simple index 149 # for standard fitting. Assure we have a list, regardless. 138 150 if isinstance(value, list): 139 151 self.is_batch_fitting = True … … 149 161 150 162 # Update logics with data items 163 # Logics.data contains only a single Data1D/Data2D object 151 164 self.logic.data = GuiUtils.dataFromItem(value[0]) 152 165 … … 154 167 self.is2D = True if isinstance(self.logic.data, Data2D) else False 155 168 169 # Let others know we're full of data now 156 170 self.data_is_loaded = True 157 171 … … 333 347 self.chk2DView.setVisible(False) 334 348 self.chkMagnetism.setEnabled(self.is2D) 349 self.tabFitting.setTabEnabled(TAB_MAGNETISM, self.is2D) 335 350 # Combo box or label for file name" 336 351 if self.is_batch_fitting: … … 344 359 # Similarly on other tabs 345 360 self.options_widget.setEnablementOnDataLoad() 361 362 # Reload the model 363 self.onSelectModel() 346 364 347 365 # Smearing tab … … 1038 1056 # Regardless of previous state, this should now be `plot show` functionality only 1039 1057 self.cmdPlot.setText("Show Plot") 1040 if not self.data_is_loaded:1041 1058 # Force data recalculation so existing charts are updated 1059 self.recalculatePlotData() 1042 1060 self.showPlot() 1043 1061 … … 1253 1271 structure_module = generate.load_kernel_module(structure_factor) 1254 1272 structure_parameters = modelinfo.make_parameter_table(getattr(structure_module, 'parameters', [])) 1273 structure_kernel = self.models[structure_factor]() 1274 1275 self.kernel_module._model_info = product.make_product_info(self.kernel_module._model_info, structure_kernel._model_info) 1255 1276 1256 1277 new_rows = FittingUtilities.addSimpleParametersToModel(structure_parameters, self.is2D)
Note: See TracChangeset
for help on using the changeset viewer.