Changeset efaf022 in sasview


Ignore:
Timestamp:
Oct 10, 2018 7:25:21 AM (5 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
a4ceeb7
Parents:
f20ea3f
Message:

Allow for visibility toggle of the log explorer

Location:
src/sas/qtgui/MainWindow
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/MainWindow/GuiManager.py

    re258c53 refaf022  
    136136        self.logDockWidget = QDockWidget("Log Explorer", self._workspace) 
    137137        self.logDockWidget.setObjectName("LogDockWidget") 
     138        self.logDockWidget.visibilityChanged.connect(self.updateLogContextMenus) 
     139 
    138140 
    139141        self.listWidget = QTextBrowser() 
     
    178180            logger.error("%s: could not load SasView models") 
    179181            logger.error(traceback.format_exc()) 
     182 
     183    def updateLogContextMenus(self, visible=False): 
     184        """ 
     185        Modify the View/Data Explorer menu item text on widget visibility 
     186        """ 
     187        if visible: 
     188            self._workspace.actionHide_LogExplorer.setText("Hide Log Explorer") 
     189        else: 
     190            self._workspace.actionHide_LogExplorer.setText("Show Log Explorer") 
    180191 
    181192    def updateContextMenus(self, visible=False): 
     
    433444        """ 
    434445        # disable not yet fully implemented actions 
    435         self._workspace.actionOpen_Analysis.setEnabled(False) 
    436         self._workspace.actionUndo.setEnabled(False) 
    437         self._workspace.actionRedo.setEnabled(False) 
    438         self._workspace.actionReset.setEnabled(False) 
    439         self._workspace.actionStartup_Settings.setEnabled(False) 
    440         self._workspace.actionImage_Viewer.setEnabled(False) 
    441         self._workspace.actionCombine_Batch_Fit.setEnabled(False) 
    442         self._workspace.actionFit_Results.setEnabled(False) 
     446        self._workspace.actionOpen_Analysis.setVisible(False) 
     447        self._workspace.actionUndo.setVisible(False) 
     448        self._workspace.actionRedo.setVisible(False) 
     449        self._workspace.actionReset.setVisible(False) 
     450        self._workspace.actionStartup_Settings.setVisible(False) 
     451        self._workspace.actionImage_Viewer.setVisible(False) 
     452        self._workspace.actionCombine_Batch_Fit.setVisible(False) 
     453        self._workspace.actionFit_Results.setVisible(False) 
    443454        # orientation viewer set to invisible SASVIEW-1132 
    444455        self._workspace.actionOrientation_Viewer.setVisible(False) 
     
    467478        self._workspace.actionCategory_Manager.triggered.connect(self.actionCategory_Manager) 
    468479        self._workspace.actionHide_DataExplorer.triggered.connect(self.actionHide_DataExplorer) 
     480        self._workspace.actionHide_LogExplorer.triggered.connect(self.actionHide_LogExplorer) 
    469481        # Tools 
    470482        self._workspace.actionData_Operation.triggered.connect(self.actionData_Operation) 
     
    654666        """ 
    655667        if self.dockedFilesWidget.isVisible(): 
    656             #self._workspace.actionHide_DataExplorer.setText("Show Data Explorer") 
    657668            self.dockedFilesWidget.setVisible(False) 
    658669        else: 
    659             #self._workspace.actionHide_DataExplorer.setText("Hide Data Explorer") 
    660670            self.dockedFilesWidget.setVisible(True) 
     671        pass 
     672 
     673    def actionHide_LogExplorer(self): 
     674        """ 
     675        Toggle Data Explorer vsibility 
     676        """ 
     677        if self.logDockWidget.isVisible(): 
     678            self.logDockWidget.setVisible(False) 
     679        else: 
     680            self.logDockWidget.setVisible(True) 
    661681        pass 
    662682 
  • src/sas/qtgui/MainWindow/UI/MainWindowUI.ui

    rfc5d2d7f refaf022  
    2525     <y>0</y> 
    2626     <width>915</width> 
    27      <height>26</height> 
     27     <height>21</height> 
    2828    </rect> 
    2929   </property> 
     
    7575    <addaction name="actionHide_Toolbar"/> 
    7676    <addaction name="actionHide_DataExplorer"/> 
     77    <addaction name="actionHide_LogExplorer"/> 
    7778    <addaction name="separator"/> 
    7879    <addaction name="actionStartup_Settings"/> 
     
    565566   </property> 
    566567  </action> 
     568  <action name="actionHide_LogExplorer"> 
     569   <property name="text"> 
     570    <string>Hide Log Explorer</string> 
     571   </property> 
     572  </action> 
    567573 </widget> 
    568574 <resources/> 
Note: See TracChangeset for help on using the changeset viewer.