Changeset 768387e0 in sasview for src/sas/qtgui/MainWindow
- Timestamp:
- Sep 14, 2018 5:45:39 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 86d3207
- Parents:
- 855e7ad
- Location:
- src/sas/qtgui/MainWindow
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/GuiManager.py
r5b144c6 r768387e0 118 118 self.dockedFilesWidget.setWidget(self.filesWidget) 119 119 120 # Disable maximize/minimize and close buttons 121 self.dockedFilesWidget.setFeatures(QDockWidget.NoDockWidgetFeatures) 122 123 #self._workspace.workspace.addDockWidget(Qt.LeftDockWidgetArea, self.dockedFilesWidget) 120 # Modify menu items on widget visibility change 121 self.dockedFilesWidget.visibilityChanged.connect(self.updateContextMenus) 122 124 123 self._workspace.addDockWidget(Qt.LeftDockWidgetArea, self.dockedFilesWidget) 125 124 self._workspace.resizeDocks([self.dockedFilesWidget], [305], Qt.Horizontal) … … 164 163 logger.error("%s: could not load SasView models") 165 164 logger.error(traceback.format_exc()) 165 166 def updateContextMenus(self, visible=False): 167 """ 168 Modify the View/Data Explorer menu item text on widget visibility 169 """ 170 if visible: 171 self._workspace.actionHide_DataExplorer.setText("Hide Data Explorer") 172 else: 173 self._workspace.actionHide_DataExplorer.setText("Show Data Explorer") 166 174 167 175 def statusBarSetup(self): … … 427 435 self._workspace.actionStartup_Settings.triggered.connect(self.actionStartup_Settings) 428 436 self._workspace.actionCategory_Manager.triggered.connect(self.actionCategory_Manager) 437 self._workspace.actionHide_DataExplorer.triggered.connect(self.actionHide_DataExplorer) 429 438 # Tools 430 439 self._workspace.actionData_Operation.triggered.connect(self.actionData_Operation) … … 617 626 pass 618 627 628 def actionHide_DataExplorer(self): 629 """ 630 Toggle Data Explorer vsibility 631 """ 632 if self.dockedFilesWidget.isVisible(): 633 #self._workspace.actionHide_DataExplorer.setText("Show Data Explorer") 634 self.dockedFilesWidget.setVisible(False) 635 else: 636 #self._workspace.actionHide_DataExplorer.setText("Hide Data Explorer") 637 self.dockedFilesWidget.setVisible(True) 638 pass 639 619 640 def actionStartup_Settings(self): 620 641 """ -
src/sas/qtgui/MainWindow/UI/MainWindowUI.ui
r33b3e4d r768387e0 74 74 <addaction name="separator"/> 75 75 <addaction name="actionHide_Toolbar"/> 76 <addaction name="actionHide_DataExplorer"/> 76 77 <addaction name="separator"/> 77 78 <addaction name="actionStartup_Settings"/> … … 552 553 </property> 553 554 </action> 555 <action name="actionHide_DataExplorer"> 556 <property name="text"> 557 <string>Hide Data Explorer</string> 558 </property> 559 </action> 554 560 </widget> 555 561 <resources/> -
src/sas/qtgui/MainWindow/UnitTesting/GuiManagerTest.py
r144fe21 r768387e0 53 53 self.assertIsInstance(self.manager.dockedFilesWidget, QDockWidget) 54 54 self.assertIsInstance(self.manager.dockedFilesWidget.widget(), DataExplorerWindow) 55 self.assertEqual(self.manager.dockedFilesWidget.features(), QDockWidget.NoDockWidgetFeatures)56 55 self.assertEqual(self.manager._workspace.dockWidgetArea(self.manager.dockedFilesWidget), Qt.LeftDockWidgetArea) 57 56
Note: See TracChangeset
for help on using the changeset viewer.