From f06888e4fbfd12da0bf92283b3651754e74a4696 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Fri, 4 Oct 2019 17:44:12 +0300 Subject: [PATCH] - added a Toggle Notebook button named 'NB' in the QMenBar which toggle the notebook --- FlatCAMApp.py | 4 +++- README.md | 1 + flatcamGUI/FlatCAMGUI.py | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/FlatCAMApp.py b/FlatCAMApp.py index ed367750..c510af16 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -1841,7 +1841,7 @@ class App(QtCore.QObject): self.ui.menuview_toggle_fscreen.triggered.connect(self.on_fullscreen) self.ui.menuview_toggle_parea.triggered.connect(self.on_toggle_plotarea) self.ui.menuview_toggle_notebook.triggered.connect(self.on_toggle_notebook) - + self.ui.menu_toggle_nb.triggered.connect(self.on_toggle_notebook) self.ui.menuview_toggle_grid.triggered.connect(self.on_toggle_grid) self.ui.menuview_toggle_axis.triggered.connect(self.on_toggle_axis) self.ui.menuview_toggle_workspace.triggered.connect(self.on_workspace_menu) @@ -5753,8 +5753,10 @@ class App(QtCore.QObject): def on_toggle_notebook(self): if self.ui.splitter.sizes()[0] == 0: self.ui.splitter.setSizes([1, 1]) + self.ui.menu_toggle_nb.setChecked(True) else: self.ui.splitter.setSizes([0, 1]) + self.ui.menu_toggle_nb.setChecked(False) def on_toggle_axis(self): self.report_usage("on_toggle_axis()") diff --git a/README.md b/README.md index 5e0a28f0..77566c55 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ CAD program, and create G-Code for Isolation routing. - fixed exit FullScreen with Escape key - added a new menu category in the MenuBar named 'Objects'. It will hold the objects found in the Project tab. Useful when working in FullScreen - disabeld a log.debug in ObjectColection.get_by_name() +- added a Toggle Notebook button named 'NB' in the QMenBar which toggle the notebook 3.10.2019 diff --git a/flatcamGUI/FlatCAMGUI.py b/flatcamGUI/FlatCAMGUI.py index 555d7180..0cf3fe8c 100644 --- a/flatcamGUI/FlatCAMGUI.py +++ b/flatcamGUI/FlatCAMGUI.py @@ -43,6 +43,12 @@ class FlatCAMGUI(QtWidgets.QMainWindow): # ######### ## self.menu = self.menuBar() + # self.menu_toggle_nb = QtWidgets.QAction(QtGui.QIcon('share/notebook32.png'), "NB") + self.menu_toggle_nb = QtWidgets.QAction("NB") + + self.menu_toggle_nb.setCheckable(True) + self.menu.addAction(self.menu_toggle_nb) + # ######################################################################## # ########################## File # ###################################### # ########################################################################