Changeset cbcdd2c in sasview for src/sas/qtgui/Perspectives/Fitting/FittingPerspective.py
- Timestamp:
- Mar 10, 2017 9:44:44 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:
- cd31251
- Parents:
- 5236449
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingPerspective.py
r5236449 rcbcdd2c 12 12 """ 13 13 """ 14 updateTheoryFromPerspectiveSignal = QtCore.pyqtSignal(QtGui.QStandardItem)15 14 name = "Fitting" # For displaying in the combo box in DataExplorer 16 15 def __init__(self, manager=None, parent=None, data=None): … … 44 43 self.setWindowTitle('Fit panel - Active Fitting Optimizer: %s' % self.optimizer) 45 44 46 self.communicate = GuiUtils.Communicate() 45 #self.communicate = GuiUtils.Communicate() 46 self.communicate = self.parent.communicator() 47 47 48 48 def addFit(self, data): … … 54 54 self.maxIndex += 1 55 55 self.addTab(tab, self.tabName()) 56 tab.signalTheory.connect(self.passSignal)57 56 58 57 def tabName(self): … … 67 66 Update local bookkeeping on tab close 68 67 """ 69 assert (len(self.tabs) >= index)68 assert len(self.tabs) >= index 70 69 # don't remove the last tab 71 70 if len(self.tabs) <= 1: … … 86 85 Pass it over to the calculator 87 86 """ 88 assert (data_item is not None)87 assert data_item is not None 89 88 90 89 if not isinstance(data_item, list): … … 98 97 self._model_item = data_item[0] 99 98 100 # Extract data on 1st child - this is the Data1D/2D component101 data = GuiUtils.dataFromItem(self._model_item)102 103 # self.model.item(WIDGETS.W_FILENAME).setData(QtCore.QVariant(self._model_item.text()))104 105 99 # Find the first unassigned tab. 106 100 # If none, open a new tab. 107 available_tabs = list(map(lambda tab: tab.acceptsData(), self.tabs))101 available_tabs = list(map(lambda tab: tab.acceptsData(), self.tabs)) 108 102 109 103 if numpy.any(available_tabs): … … 111 105 else: 112 106 self.addFit(data_item) 113 114 115 def passSignal(self, theory_item):116 """117 """118 self.updateTheoryFromPerspectiveSignal.emit(theory_item)119 120 if __name__ == "__main__":121 app = QtGui.QApplication([])122 dlg = FittingWindow()123 dlg.show()124 sys.exit(app.exec_())
Note: See TracChangeset
for help on using the changeset viewer.