Changes in src/sas/qtgui/MainWindow/GuiManager.py [8ac3551:14ec91c5] in sasview
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/GuiManager.py
r8ac3551 r14ec91c5 19 19 20 20 import sas.qtgui.Utilities.ObjectLibrary as ObjectLibrary 21 from sas.qtgui.Utilities.TabbedModelEditor import TabbedModelEditor22 from sas.qtgui.Utilities.PluginManager import PluginManager23 21 from sas.qtgui.MainWindow.UI.AcknowledgementsUI import Ui_Acknowledgements 24 22 from sas.qtgui.MainWindow.AboutBox import AboutBox … … 49 47 Main SasView window functionality 50 48 """ 49 51 50 def __init__(self, parent=None): 52 51 """ … … 183 182 Respond to change of the perspective signal 184 183 """ 184 185 # Save users from themselves... 186 #if isinstance(self._current_perspective, Perspectives.PERSPECTIVES[str(perspective_name)]): 187 self.setupPerspectiveMenubarOptions(self._current_perspective) 188 # return 189 185 190 # Close the previous perspective 186 191 self.clearPerspectiveMenubarOptions(self._current_perspective) … … 192 197 # Default perspective 193 198 self._current_perspective = Perspectives.PERSPECTIVES[str(perspective_name)](parent=self) 194 195 self.setupPerspectiveMenubarOptions(self._current_perspective)196 199 197 200 subwindow = self._workspace.workspace.addSubWindow(self._current_perspective) … … 355 358 self.communicate.updateTheoryFromPerspectiveSignal.connect(self.updateTheoryFromPerspective) 356 359 self.communicate.plotRequestedSignal.connect(self.showPlot) 357 self.communicate.plotFromFilenameSignal.connect(self.showPlotFromFilename)358 360 self.communicate.updateModelFromDataOperationPanelSignal.connect(self.updateModelFromDataOperationPanel) 359 361 … … 404 406 self._workspace.actionFit_Results.triggered.connect(self.actionFit_Results) 405 407 self._workspace.actionChain_Fitting.triggered.connect(self.actionChain_Fitting) 406 self._workspace.actionAdd_Custom_Model.triggered.connect(self.actionAdd_Custom_Model)407 408 self._workspace.actionEdit_Custom_Model.triggered.connect(self.actionEdit_Custom_Model) 408 self._workspace.actionManage_Custom_Models.triggered.connect(self.actionManage_Custom_Models)409 409 # Window 410 410 self._workspace.actionCascade.triggered.connect(self.actionCascade) … … 417 417 self._workspace.actionInversion.triggered.connect(self.actionInversion) 418 418 self._workspace.actionInvariant.triggered.connect(self.actionInvariant) 419 self._workspace.actionCorfunc.triggered.connect(self.actionCorfunc)420 419 # Help 421 420 self._workspace.actionDocumentation.triggered.connect(self.actionDocumentation) … … 663 662 pass 664 663 665 def actionAdd_Custom_Model(self):666 """667 """668 self.model_editor = TabbedModelEditor(self)669 self.model_editor.show()670 671 664 def actionEdit_Custom_Model(self): 672 665 """ 673 666 """ 674 self.model_editor = TabbedModelEditor(self, edit_only=True) 675 self.model_editor.show() 676 677 def actionManage_Custom_Models(self): 678 """ 679 """ 680 self.model_manager = PluginManager(self) 681 self.model_manager.show() 667 print("actionEdit_Custom_Model TRIGGERED") 668 pass 682 669 683 670 #============ ANALYSIS ================= … … 687 674 """ 688 675 self.perspectiveChanged("Fitting") 689 # Notify other widgets690 self.filesWidget.onAnalysisUpdate("Fitting")691 676 692 677 def actionInversion(self): … … 694 679 Change to the Inversion perspective 695 680 """ 681 # For now we'll just update the analysis menu status but when the inversion is implemented delete from here 682 self.checkAnalysisOption(self._workspace.actionInversion) 683 # to here and uncomment the following line 696 684 self.perspectiveChanged("Inversion") 697 self.filesWidget.onAnalysisUpdate("Inversion")698 685 699 686 def actionInvariant(self): … … 702 689 """ 703 690 self.perspectiveChanged("Invariant") 704 self.filesWidget.onAnalysisUpdate("Invariant")705 706 def actionCorfunc(self):707 """708 Change to the Corfunc perspective709 """710 self.perspectiveChanged("Corfunc")711 self.filesWidget.onAnalysisUpdate("Corfunc")712 691 713 692 #============ WINDOW ================= … … 800 779 self.filesWidget.model.appendRow(new_item) 801 780 self._data_manager.add_data(new_datalist_item) 802 803 def showPlotFromFilename(self, filename):804 """805 Pass the show plot request to the data explorer806 """807 if hasattr(self, "filesWidget"):808 self.filesWidget.displayFile(filename=filename, is_data=True)809 781 810 782 def showPlot(self, plot): … … 856 828 elif isinstance(perspective, Perspectives.PERSPECTIVES["Invariant"]): 857 829 self.checkAnalysisOption(self._workspace.actionInvariant) 858 elif isinstance(perspective, Perspectives.PERSPECTIVES["Inversion"]): 859 self.checkAnalysisOption(self._workspace.actionInversion) 860 elif isinstance(perspective, Perspectives.PERSPECTIVES["Corfunc"]): 861 self.checkAnalysisOption(self._workspace.actionCorfunc) 830 # elif isinstance(perspective, Perspectives.PERSPECTIVES["Inversion"]): 831 # self.checkAnalysisOption(self._workspace.actionInversion)
Note: See TracChangeset
for help on using the changeset viewer.