From ed6d2627809b417d1021b40eea445dc00c20ef15 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Tue, 5 Feb 2019 13:37:49 +0200 Subject: [PATCH] - added an initial text in the Tools tab - added possibility to use the shortcut key for shortcut list in the Notebook tabs --- FlatCAMApp.py | 49 +++++++++++++++++++++++++++++++++++++------------ FlatCAMGUI.py | 7 +++++++ README.md | 2 ++ 3 files changed, 46 insertions(+), 12 deletions(-) diff --git a/FlatCAMApp.py b/FlatCAMApp.py index 39e87ae9..9d46dd55 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -93,7 +93,7 @@ class App(QtCore.QObject): # Version version = 8.906 - version_date = "2019/02/3" + version_date = "2019/02/5" beta = True # current date now @@ -6322,15 +6322,15 @@ class App(QtCore.QObject): # label = QtWidgets.QLabel("Choose an item from Project") # label.setAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignVCenter) - self.sel_title = QtWidgets.QTextEdit( + sel_title = QtWidgets.QTextEdit( 'Shortcut Key List') - self.sel_title.setTextInteractionFlags(QtCore.Qt.NoTextInteraction) - self.sel_title.setFrameStyle(QtWidgets.QFrame.NoFrame) + sel_title.setTextInteractionFlags(QtCore.Qt.NoTextInteraction) + sel_title.setFrameStyle(QtWidgets.QFrame.NoFrame) # font = self.sel_title.font() # font.setPointSize(12) # self.sel_title.setFont(font) - self.selected_text = ''' + selected_text = '''

Selected Tab - Choose an Item from Project Tab

Details:
@@ -6341,7 +6341,7 @@ The normal flow when working in FlatCAM is the following:


You can also load a FlatCAM project by double clicking on the project file, drag & drop of the file into the FLATCAM GUI or through the menu/toolbar links offered within the app.
  -
  • Once an object is available in the Project Tab, by selecting it and then selecting SELECTED TAB (more simpler is to double click the object name in the Project Tab), SELECTED TAB will be updated with the object properties according to it's kind: Gerber, Excellon or Geometry object.
    +
  • Once an object is available in the Project Tab, by selecting it and then selecting SELECTED TAB (more simpler is to double click the object name in the Project Tab), SELECTED TAB will be updated with the object properties according to it's kind: Gerber, Excellon, Geometry or CNCJob object.

    If the selection of the object is done on the canvas by single click instead, and the SELECTED TAB is in focus, again the object properties will be displayed into the Selected Tab. Alternatively, double clicking on the object on the canvas will bring the SELECTED TAB and populate it even if it was out of focus.

    @@ -6354,14 +6354,39 @@ The normal flow when working in FlatCAM is the following:

    ''' - self.sel_title.setText(self.selected_text) - self.sel_title.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + sel_title.setText(selected_text) + sel_title.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) - self.ui.selected_scroll_area.setWidget(self.sel_title) + self.ui.selected_scroll_area.setWidget(sel_title) - label = QtWidgets.QLabel("Choose a Tool from Tool Menu") - label.setAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignVCenter) - self.ui.tool_scroll_area.setWidget(label) + tool_title = QtWidgets.QTextEdit( + 'Shortcut Key List') + tool_title.setTextInteractionFlags(QtCore.Qt.NoTextInteraction) + tool_title.setFrameStyle(QtWidgets.QFrame.NoFrame) + # font = self.sel_title.font() + # font.setPointSize(12) + # self.sel_title.setFont(font) + + tool_text = ''' +

    Tool Tab - Choose an Item in Tools Menu

    + +

    Details:
    +Some of the functionality of FlatCAM have been implemented as tools (a sort of plugins).

    + +

    Most of the tools are accessible through the Tools menu or by using the associated shortcut keys.
    +Each such a tool, if it needs an object to be used as a source it will provide the way to select this object(s) through a series of comboboxes. The result of using a tool is either a Geometry, an information that can be used in the app or it can be a file that can be saved.

    + +
      +
    + +

    A list of key shortcuts is available through an menu entry in Help -> Shortcuts List or through it's own key shortcut: '`' (key left to 1).

    + + ''' + + tool_title.setText(tool_text) + tool_title.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + + self.ui.tool_scroll_area.setWidget(tool_title) def setup_obj_classes(self): """ diff --git a/FlatCAMGUI.py b/FlatCAMGUI.py index ac9c85fb..a8907eac 100644 --- a/FlatCAMGUI.py +++ b/FlatCAMGUI.py @@ -1508,6 +1508,13 @@ class FlatCAMGUI(QtWidgets.QMainWindow): if event.key() == QtCore.Qt.Key_3: self.app.on_select_tab('tool') + # Show shortcut list + if event.key() == QtCore.Qt.Key_Ampersand: + self.app.on_shortcut_list() + + if event.key() == QtCore.Qt.Key_QuoteLeft: + self.app.on_shortcut_list() + def dragEnterEvent(self, event): if event.mimeData().hasUrls: event.accept() diff --git a/README.md b/README.md index 0f402d38..d80c1777 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ CAD program, and create G-Code for Isolation routing. 5.02.3019 - added a text in the Selected Tab which is showed whenever the Selected Tab is selected but without having an object selected to display it's properties +- added an initial text in the Tools tab +- added possibility to use the shortcut key for shortcut list in the Notebook tabs 4.02.2019