Changeset 676f137 in sasview for src/sas/qtgui/Perspectives/Fitting/FittingPerspective.py
- Timestamp:
- Jan 11, 2018 6:04:58 AM (6 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:
- be8f4b0
- Parents:
- 570e091
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/FittingPerspective.py
re90988c r676f137 11 11 12 12 from sas.qtgui.Perspectives.Fitting.FittingWidget import FittingWidget 13 from sas.qtgui.Perspectives.Fitting.ConstraintWidget import ConstraintWidget 13 14 from sas.qtgui.Perspectives.Fitting.FittingOptions import FittingOptions 14 15 from sas.qtgui.Perspectives.Fitting.GPUOptions import GPUOptions … … 30 31 # Max index for adding new, non-clashing tab names 31 32 self.maxIndex = 0 33 self.maxCSIndex = 0 32 34 33 35 # Index of the current tab … … 108 110 tab.is_batch_fitting = is_batch 109 111 # Add this tab to the object library so it can be retrieved by scripting/jupyter 110 tab_name = self. tabName(is_batch=is_batch)112 tab_name = self.getTabName(is_batch=is_batch) 111 113 ObjectLibrary.addObject(tab_name, tab) 112 114 self.tabs.append(tab) … … 116 118 self.addTab(tab, tab_name) 117 119 120 def addConstraintTab(self): 121 """ 122 Add a new C&S fitting tab 123 """ 124 tab = ConstraintWidget(parent=self.parent) 125 # Add this tab to the object library so it can be retrieved by scripting/jupyter 126 tab_name = self.getCSTabName() # TODO update the tab name scheme 127 ObjectLibrary.addObject(tab_name, tab) 128 self.tabs.append(tab) 129 self.maxCSIndex += 1 130 self.addTab(tab, tab_name) 131 118 132 def updateFitDict(self, item_key, tab_name): 119 133 """ … … 126 140 self.dataToFitTab[item_key_str] = [tab_name] 127 141 128 #print "CURRENT dict: ", self.dataToFitTab 129 130 def tabName(self, is_batch=False): 142 def getTabName(self, is_batch=False): 131 143 """ 132 144 Get the new tab name, based on the number of fitting tabs so far … … 134 146 page_name = "BatchPage" if is_batch else "FitPage" 135 147 page_name = page_name + str(self.maxIndex) 148 return page_name 149 150 def getCSTabName(self): 151 """ 152 Get the new tab name, based on the number of fitting tabs so far 153 """ 154 page_name = "Const. & Simul. Fit" 155 page_name = page_name + str(self.maxCSIndex) 136 156 return page_name 137 157
Note: See TracChangeset
for help on using the changeset viewer.