Sfoglia il codice sorgente

- added an initial text in the Tools tab
- added possibility to use the shortcut key for shortcut list in the Notebook tabs

Marius Stanciu 7 anni fa
parent
commit
ed6d262780
3 ha cambiato i file con 46 aggiunte e 12 eliminazioni
  1. 37 12
      FlatCAMApp.py
  2. 7 0
      FlatCAMGUI.py
  3. 2 0
      README.md

+ 37 - 12
FlatCAMApp.py

@@ -93,7 +93,7 @@ class App(QtCore.QObject):
 
 
     # Version
     # Version
     version = 8.906
     version = 8.906
-    version_date = "2019/02/3"
+    version_date = "2019/02/5"
     beta = True
     beta = True
 
 
     # current date now
     # current date now
@@ -6322,15 +6322,15 @@ class App(QtCore.QObject):
         # label = QtWidgets.QLabel("Choose an item from Project")
         # label = QtWidgets.QLabel("Choose an item from Project")
         # label.setAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignVCenter)
         # label.setAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignVCenter)
 
 
-        self.sel_title = QtWidgets.QTextEdit(
+        sel_title = QtWidgets.QTextEdit(
             '<b>Shortcut Key List</b>')
             '<b>Shortcut Key List</b>')
-        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 = self.sel_title.font()
         # font.setPointSize(12)
         # font.setPointSize(12)
         # self.sel_title.setFont(font)
         # self.sel_title.setFont(font)
 
 
-        self.selected_text = '''
+        selected_text = '''
 <p><span style="font-size:14px"><strong>Selected Tab - Choose an Item from Project Tab</strong></span></p>
 <p><span style="font-size:14px"><strong>Selected Tab - Choose an Item from Project Tab</strong></span></p>
 
 
 <p><span style="font-size:10px"><strong>Details</strong>:<br />
 <p><span style="font-size:10px"><strong>Details</strong>:<br />
@@ -6341,7 +6341,7 @@ The normal flow when working in FlatCAM is the following:</span></p>
 	<br />
 	<br />
 	You can also load a <strong>FlatCAM project</strong> by double clicking on the project file, drag &amp; drop of the file into the FLATCAM GUI or through the menu/toolbar links offered within the app.</span><br />
 	You can also load a <strong>FlatCAM project</strong> by double clicking on the project file, drag &amp; drop of the file into the FLATCAM GUI or through the menu/toolbar links offered within the app.</span><br />
 	&nbsp;</li>
 	&nbsp;</li>
-	<li><span style="font-size:10px">Once an object is available in the Project Tab, by selecting it and then selecting <strong>SELECTED TAB </strong>(more simpler is to double click the object name in the Project Tab), <strong>SELECTED TAB </strong>will be updated with the object properties according to it&#39;s kind: Gerber, Excellon or Geometry object.<br />
+	<li><span style="font-size:10px">Once an object is available in the Project Tab, by selecting it and then selecting <strong>SELECTED TAB </strong>(more simpler is to double click the object name in the Project Tab), <strong>SELECTED TAB </strong>will be updated with the object properties according to it&#39;s kind: Gerber, Excellon, Geometry or CNCJob object.<br />
 	<br />
 	<br />
 	If the selection of the object is done on the canvas by single click instead, and the <strong>SELECTED TAB</strong> 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 <strong>SELECTED TAB</strong> and populate it even if it was out of focus.<br />
 	If the selection of the object is done on the canvas by single click instead, and the <strong>SELECTED TAB</strong> 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 <strong>SELECTED TAB</strong> and populate it even if it was out of focus.<br />
 	<br />
 	<br />
@@ -6354,14 +6354,39 @@ The normal flow when working in FlatCAM is the following:</span></p>
 
 
         '''
         '''
 
 
-        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(
+            '<b>Shortcut Key List</b>')
+        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 = '''
+<p><span style="font-size:14px"><strong>Tool Tab - Choose an Item in Tools Menu</strong></span></p>
+
+<p><span style="font-size:10px"><strong>Details</strong>:<br />
+Some of the functionality of FlatCAM have been implemented as tools (a sort of plugins). </span></p>
+
+<p><span style="font-size:10px">Most of the tools are accessible through&nbsp;the Tools menu or by using the associated shortcut keys.<br />
+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.</span></p>
+
+<ol>
+</ol>
+
+<p><span style="font-size:10px">A list of key shortcuts is available through an menu entry in <strong>Help -&gt; Shortcuts List</strong>&nbsp;or through it&#39;s own key shortcut: &#39;`&#39; (key left to 1).</span></p>
+
+                '''
+
+        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):
     def setup_obj_classes(self):
         """
         """

+ 7 - 0
FlatCAMGUI.py

@@ -1508,6 +1508,13 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
         if event.key() == QtCore.Qt.Key_3:
         if event.key() == QtCore.Qt.Key_3:
             self.app.on_select_tab('tool')
             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):
     def dragEnterEvent(self, event):
         if event.mimeData().hasUrls:
         if event.mimeData().hasUrls:
             event.accept()
             event.accept()

+ 2 - 0
README.md

@@ -12,6 +12,8 @@ CAD program, and create G-Code for Isolation routing.
 5.02.3019
 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 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
 4.02.2019