def showHomePage(self, home=True):
     self.menuBar.setVisible(Settings().displayMenuBar)
     if home:
         _logger().debug('going to home page')
         if self.stackedWidget.currentIndex() == 1:
             s = Settings()
             s.navigationPanelVisible = self.dockWidgetNavPanel.isVisible()
             s.logPanelVisible = self.dockWidgetLogs.isVisible()
         self.consoleOutput.clear()
         self.stackedWidget.setCurrentIndex(0)
         self.toolBarFile.hide()
         self.toolBarCode.hide()
         self.dockWidgetLogs.hide()
         self.statusBar().setVisible(Settings().displayStatusBar)
         self.dockWidgetNavPanel.hide()
         self.dockWidgetOffsets.hide()
         self.lblEncoding.setText('')
         self.lblFilename.setText('OpenCobolIDE v.%s' % __version__)
         self.lblCursorPos.setText('')
     else:
         _logger().debug('going to editor page')
         if self.stackedWidget.currentIndex() == 0:
             self.stackedWidget.setCurrentIndex(1)
             self.dockWidgetNavPanel.show()
             s = Settings()
             self.statusBar().setVisible(Settings().displayStatusBar)
             self.dockWidgetNavPanel.setVisible(s.navigationPanelVisible)
             self.dockWidgetLogs.setVisible(s.logPanelVisible)
             if s.displayToolBar:
                 self.toolBarFile.setVisible(True)
                 self.toolBarCode.setVisible(True)
Beispiel #2
0
 def saveSettings(self):
     if self.stackedWidget.currentIndex() == 1:
         s = Settings()
         s.geometry = self.saveGeometry()
         s.state = self.saveState()
         s.maximised = self.isMaximized()
         s.size = self.size()
         s.navigationPanelVisible = self.dockWidgetNavPanel.isVisible()
         s.logPanelVisible = self.dockWidgetLogs.isVisible()
         s.fullscreen = self.isFullScreen()
Beispiel #3
0
 def showHomePage(self, home=True):
     if home:
         if self.stackedWidget.currentIndex() == 1:
             self.prevSize = self.size()
             self.wasMaximised = self.isMaximized()
             s = Settings()
             s.navigationPanelVisible = self.dockWidgetNavPanel.isVisible()
             s.logPanelVisible = self.dockWidgetLogs.isVisible()
             self.setMinimumWidth(700)
             self.setMinimumHeight(400)
             self.resize(700, 400)
             if not self.isFullScreen():
                 self.showCentered()
         self.consoleOutput.clear()
         self.setMinimumWidth(700)
         self.setMinimumHeight(400)
         self.resize(700, 400)
         self.stackedWidget.setCurrentIndex(0)
         self.menuBar.hide()
         self.toolBarFile.hide()
         self.toolBarCode.hide()
         self.dockWidgetLogs.hide()
         self.dockWidgetNavPanel.hide()
         self.dockWidgetOffsets.hide()
         self.lblEncoding.setText("")
         self.lblFilename.setText("OpenCobolIDE v.%s" % __version__)
         self.lblCursorPos.setText("")
     else:
         if self.stackedWidget.currentIndex() == 0:
             self.stackedWidget.setCurrentIndex(1)
             self.menuBar.show()
             self.toolBarFile.show()
             self.toolBarCode.show()
             self.dockWidgetNavPanel.show()
             self.setMinimumWidth(900)
             self.setMinimumHeight(700)
             if not self.isFullScreen():
                 if self.wasMaximised:
                     self.showMaximized()
                 else:
                     if self.prevSize.width() < 900:
                         self.prevSize.setWidth(900)
                     if self.prevSize.height() < 700:
                         self.prevSize.setHeight(700)
                     self.resize(self.prevSize)
                     self.showCentered()
             s = Settings()
             self.dockWidgetNavPanel.setVisible(s.navigationPanelVisible)
             self.dockWidgetLogs.setVisible(s.logPanelVisible)