Procházet zdrojové kódy

- minor changes in the Code Editor GUI
- minor changes in the 'FlatCAM About' GUI
- added a new shortcut key F5 for doing the 'Plot All'

Marius Stanciu před 6 roky
rodič
revize
0a005cfe40
3 změnil soubory, kde provedl 29 přidání a 22 odebrání
  1. 10 11
      FlatCAMApp.py
  2. 4 1
      README.md
  3. 15 10
      flatcamGUI/FlatCAMGUI.py

+ 10 - 11
FlatCAMApp.py

@@ -3821,18 +3821,17 @@ class App(QtCore.QObject):
 
                 title = QtWidgets.QLabel(
                     "<font size=8><B>FlatCAM</B></font><BR>"
-                    "%s<BR>"
-                    "%s.<BR>"
+                    "{title}<BR>"
                     "<BR>"
                     "<BR>"
-                    "<B>%s</B> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
+                    "<B>{devel}</B> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
                     "<a href = \"https://bitbucket.org/jpcgt/flatcam/src/Beta/\">here.</a><BR>"
-                    "<b>%s</B> area &nbsp;&nbsp;&nbsp;&nbsp;"
+                    "<b>{down}</B> area &nbsp;&nbsp;&nbsp;&nbsp;"
                     "<a href = \"https://bitbucket.org/jpcgt/flatcam/downloads/\">here.</a><BR>"
-                    "<b>%s</B> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
-                    "<a href = \"https://bitbucket.org/jpcgt/flatcam/issues?status=new&status=open/\">here.</a><BR>" %
-                    (_("2D Computer-Aided Printed Circuit Board"), _("Manufacturing"), _("Development"), _("DOWNLOAD"),
-                     _("Issue tracker"))
+                    "<b> {issue}</B> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"
+                    "<a href = \"https://bitbucket.org/jpcgt/flatcam/issues?status=new&status=open/\">here.</a><BR>".
+                        format(title=_("2D Computer-Aided Printed Circuit Board Manufacturing"),
+                               devel=_("Development"), down=_("DOWNLOAD"), issue=_("Issue tracker"))
                 )
                 title.setOpenExternalLinks(True)
 
@@ -3928,15 +3927,15 @@ class App(QtCore.QObject):
                 self.programmmers_tab_layout.addStretch()
 
                 self.prog_grid_lay.addWidget(QtWidgets.QLabel('<b>%s</b>' % _("Programmer")), 0, 0)
-                self.prog_grid_lay.addWidget(QtWidgets.QLabel('<b>%s</b>' % _("Function")), 0, 1)
-                self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % "Juan Pablo Caram <BR>"), 1, 0)
+                self.prog_grid_lay.addWidget(QtWidgets.QLabel('<b>%s</b>' % _("Status")), 0, 1)
+                self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % "Juan Pablo Caram"), 1, 0)
                 self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % _("Program Author")), 1, 1)
                 self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % "Denis Hayrullin"), 2, 0)
                 self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % " "), 2, 1)
                 self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % "Kamil Sopko"), 3, 0)
                 self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % " "), 3, 1)
                 self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % "Marius Stanciu"), 4, 0)
-                self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % "Maintainer >=2019"), 4, 1)
+                self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % _("Maintainer >=2019")), 4, 1)
                 self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % "Matthieu Berthomé"), 5, 0)
                 self.prog_grid_lay.addWidget(QtWidgets.QLabel('%s' % " "), 5, 1)
 

+ 4 - 1
README.md

@@ -14,6 +14,9 @@ CAD program, and create G-Code for Isolation routing.
 - more string changes
 - updated translation files
 - fixed a small bug
+- minor changes in the Code Editor GUI
+- minor changes in the 'FlatCAM About' GUI
+- added a new shortcut key F5 for doing the 'Plot All'
 
 13.09.2019
 
@@ -32,7 +35,7 @@ CAD program, and create G-Code for Isolation routing.
 
 12.09.2019
 
-- small changes in the TclCommands: MillDrills, MillSlots, DrillCNCJob: the new parameter for tolerance is now named: tooldia
+- small changes in the TclCommands: MillDrills, MillSlots, DrillCNCJob: the new parameter for tolerance is now named: diatol
 - cleaned up the 'About FlatCAM' window, started to give credits for the translation team
 - started to add an application splash screen
 - now, Excellon and Gerber edited objects will have the source_code updated and ready to be saved

+ 15 - 10
flatcamGUI/FlatCAMGUI.py

@@ -1277,6 +1277,10 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
                         <td height="20"><strong>F4</strong></td>
                         <td>&nbsp;%s</td>
                     </tr>
+                    <tr height="20">
+                        <td height="20"><strong>F5</strong></td>
+                        <td>&nbsp;%s</td>
+                    </tr>
                     <tr height="20">
                         <td height="20"><strong>Del</strong></td>
                         <td>&nbsp;%s</td>
@@ -1314,7 +1318,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
             _("Paint Area Tool"), _("PDF Import Tool"), _("Transformations Tool"), _("View File Source"),
             _("Cutout PCB Tool"), _("Enable all Plots"), _("Disable all Plots"), _("Disable Non-selected Plots"),
             _("Toggle Full Screen"), _("Abort current task (gracefully)"), _("Open Online Manual"),
-            _("Open Online Tutorials"), _("Delete Object"), _("Alternate: Delete Tool"),
+            _("Open Online Tutorials"), _("Refresh Plots"), _("Delete Object"), _("Alternate: Delete Tool"),
             _("(left to Key_1)Toogle Notebook Area (Left Side)"), _("En(Dis)able Obj Plot"), _("Deselects all objects")
         )
         )
@@ -1483,7 +1487,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
             _("Within Add Arc will toogle the ARC direction: CW or CCW"), _("Polygon Intersection Tool"),
             _("Geo Paint Tool"), _("Jump to Location (x, y)"), _("Toggle Corner Snap"), _("Move Geo Item"),
             _("Within Add Arc will cycle through the ARC modes"), _("Draw a Polygon"), _("Draw a Circle"),
-            _("Draw a Path"), _("Draw Rectangle"), _("Polygon Substraction Tool"), _("Add Text Tool"),
+            _("Draw a Path"), _("Draw Rectangle"), _("Polygon Subtraction Tool"), _("Add Text Tool"),
             _("Polygon Union Tool"), _("Flip shape on X axis"), _("Flip shape on Y axis"), _("Skew shape on X axis"),
             _("Skew shape on Y axis"), _("Editor Transformation Tool"), _("Offset shape on X axis"),
             _("Offset shape on Y axis"), _("Measurement Tool"), _("Save Object and Exit Editor"), _("Polygon Cut Tool"),
@@ -1821,7 +1825,6 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
 
         self.entryFind = FCEntry()
         self.entryFind.setToolTip(_("Find box. Enter here the strings to be searched in the text."))
-        self.entryFind.setMaximumWidth(200)
 
         self.buttonReplace = QtWidgets.QPushButton(_('Replace With'))
         self.buttonReplace.setToolTip(_("Will replace the string from the Find box with the one in the Replace box."))
@@ -1829,13 +1832,11 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
         self.buttonReplace.setMinimumWidth(100)
         self.entryReplace = FCEntry()
         self.entryReplace.setToolTip(_("String to replace the one in the Find box throughout the text."))
-        self.entryReplace.setMaximumWidth(200)
 
         self.sel_all_cb = QtWidgets.QCheckBox(_('All'))
-        self.sel_all_cb.setToolTip(
-            _("When checked it will replace all instances in the 'Find' box\n"
-              "with the text in the 'Replace' box..")
-        )
+        self.sel_all_cb.setToolTip(_("When checked it will replace all instances in the 'Find' box\n"
+                                     "with the text in the 'Replace' box.."))
+
         self.buttonOpen = QtWidgets.QPushButton(_('Open Code'))
         self.buttonOpen.setToolTip(_("Will open a text file in the editor."))
 
@@ -1849,13 +1850,13 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
         self.cncjob_tab_layout.addWidget(self.code_editor, 0, 0, 1, 5)
 
         cnc_tab_lay_1 = QtWidgets.QHBoxLayout()
-        cnc_tab_lay_1.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
+        # cnc_tab_lay_1.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
         cnc_tab_lay_1.addWidget(self.buttonFind)
         cnc_tab_lay_1.addWidget(self.entryFind)
         cnc_tab_lay_1.addWidget(self.buttonReplace)
         cnc_tab_lay_1.addWidget(self.entryReplace)
         cnc_tab_lay_1.addWidget(self.sel_all_cb)
-        self.cncjob_tab_layout.addLayout(cnc_tab_lay_1, 1, 0, 1, 1, QtCore.Qt.AlignLeft)
+        self.cncjob_tab_layout.addLayout(cnc_tab_lay_1, 1, 0, 1, 5)
 
         cnc_tab_lay_3 = QtWidgets.QHBoxLayout()
         cnc_tab_lay_3.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
@@ -2442,6 +2443,10 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
                 if key == QtCore.Qt.Key_F4 or key == 'F4':
                     webbrowser.open(self.app.video_url)
 
+                # Open Video Help
+                if key == QtCore.Qt.Key_F5 or key == 'F5':
+                    self.app.plot_all()
+
                 # Switch to Project Tab
                 if key == QtCore.Qt.Key_1:
                     self.app.on_select_tab('project')