Changes in src/sas/qtgui/GuiManager.py [257bd57:83d6249] in sasview
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/GuiManager.py
r257bd57 r83d6249 29 29 30 30 # Perspectives 31 import Perspectives 31 32 from sas.qtgui.Perspectives.Invariant.InvariantPerspective import InvariantWindow 33 from sas.qtgui.Perspectives.Fitting.FittingPerspective import FittingWindow 32 34 from sas.qtgui.DataExplorer import DataExplorerWindow 33 35 … … 98 100 "_downloads", 99 101 "Tutorial.pdf")) 100 101 #========================================================== 102 # TEMP PROTOTYPE 103 # Add InvariantWindow to the workspace. 104 self.invariantWidget = InvariantWindow(self) 105 self._workspace.workspace.addWindow(self.invariantWidget) 106 107 # Default perspective 108 self._current_perspective = self.invariantWidget 102 # Current displayed perspective 103 self._current_perspective = None 104 105 # Invoke the initial perspective 106 self.perspectiveChanged("Fitting") 109 107 110 108 def addWidgets(self): … … 120 118 self.dockedFilesWidget = QtGui.QDockWidget("Data Explorer", self._workspace) 121 119 self.dockedFilesWidget.setWidget(self.filesWidget) 120 122 121 # Disable maximize/minimize and close buttons 123 122 self.dockedFilesWidget.setFeatures(QtGui.QDockWidget.NoDockWidgetFeatures) … … 143 142 self.KIESSIGCalculator = KiessigPanel(self) 144 143 self.SlitSizeCalculator = SlitSizeCalculator(self) 144 145 145 def statusBarSetup(self): 146 146 """ … … 173 173 """ 174 174 return self._workspace.workspace 175 176 def perspectiveChanged(self, perspective_name): 177 """ 178 Respond to change of the perspective signal 179 """ 180 # Close the previous perspective 181 if self._current_perspective: 182 self._current_perspective.close() 183 # Default perspective 184 self._current_perspective = Perspectives.PERSPECTIVES[str(perspective_name)](self) 185 self._workspace.workspace.addWindow(self._current_perspective) 186 self._current_perspective.show() 175 187 176 188 def updatePerspective(self, data): … … 322 334 self.communicate.updatePerspectiveWithDataSignal.connect(self.updatePerspective) 323 335 self.communicate.progressBarUpdateSignal.connect(self.updateProgressBar) 336 self.communicate.perspectiveChangedSignal.connect(self.perspectiveChanged) 324 337 325 338 def addTriggers(self):
Note: See TracChangeset
for help on using the changeset viewer.