- starting to work to a general Print function; for now it will generate PDF files; currently it works only for one object not for a selection
- added shortcut key CTRL+P for printing to PDF method
This commit is contained in:
@@ -240,6 +240,9 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
||||
|
||||
# Separator
|
||||
self.menufile.addSeparator()
|
||||
self.menufile_print = QtWidgets.QAction(
|
||||
QtGui.QIcon(self.app.resource_location + '/printer32.png'), '%s\tCTRL+P' % _('Print (PDF)'))
|
||||
self.menufile.addAction(self.menufile_print)
|
||||
|
||||
self.menufile_save = self.menufile.addMenu(QtGui.QIcon(self.app.resource_location + '/save_as.png'), _('Save'))
|
||||
|
||||
@@ -260,11 +263,6 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
||||
|
||||
self.menufile_save.addSeparator()
|
||||
|
||||
# Save Object PDF
|
||||
self.menufilesave_object_pdf = QtWidgets.QAction(QtGui.QIcon(self.app.resource_location + '/pdf32.png'),
|
||||
_('Save Object as PDF ...'), self)
|
||||
self.menufile_save.addAction(self.menufilesave_object_pdf)
|
||||
|
||||
# Separator
|
||||
self.menufile.addSeparator()
|
||||
|
||||
@@ -1381,18 +1379,22 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
||||
<td height="20"><strong>CTRL+G</strong></td>
|
||||
<td> %s</td>
|
||||
</tr>
|
||||
<tr height="20">
|
||||
<td height="20"><strong>CTRL+N</strong></td>
|
||||
<td> %s</td>
|
||||
</tr>
|
||||
<tr height="20">
|
||||
<td height="20"><strong>CTRL+M</strong></td>
|
||||
<td> %s</td>
|
||||
</tr>
|
||||
<tr height="20">
|
||||
<td height="20"><strong>CTRL+N</strong></td>
|
||||
<td> %s</td>
|
||||
</tr>
|
||||
<tr height="20">
|
||||
<td height="20"><strong>CTRL+O</strong></td>
|
||||
<td> %s</td>
|
||||
</tr>
|
||||
<tr height="20">
|
||||
<td height="20"><strong>CTRL+P</strong></td>
|
||||
<td> %s</td>
|
||||
</tr>
|
||||
<tr height="20">
|
||||
<td height="20"><strong>CTRL+Q</strong></td>
|
||||
<td> %s</td>
|
||||
@@ -1579,8 +1581,8 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
||||
|
||||
# CTRL section
|
||||
_("Select All"), _("Copy Obj"), _("Open Tools Database"),
|
||||
_("Open Excellon File"), _("Open Gerber File"), _("New Project"), _("Distance Tool"),
|
||||
_("Open Project"), _("PDF Import Tool"), _("Save Project As"), _("Toggle Plot Area"),
|
||||
_("Open Excellon File"), _("Open Gerber File"), _("Distance Tool"), _("New Project"),
|
||||
_("Open Project"), _("Print (PDF)"), _("PDF Import Tool"), _("Save Project As"), _("Toggle Plot Area"),
|
||||
|
||||
# SHIFT section
|
||||
_("Copy Obj_Name"),
|
||||
@@ -2671,18 +2673,22 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
||||
if key == QtCore.Qt.Key_G:
|
||||
self.app.on_fileopengerber()
|
||||
|
||||
# Create New Project
|
||||
if key == QtCore.Qt.Key_N:
|
||||
self.app.on_file_new_click()
|
||||
|
||||
# Distance Tool
|
||||
if key == QtCore.Qt.Key_M:
|
||||
self.app.distance_tool.run()
|
||||
|
||||
# Create New Project
|
||||
if key == QtCore.Qt.Key_N:
|
||||
self.app.on_file_new_click()
|
||||
|
||||
# Open Project
|
||||
if key == QtCore.Qt.Key_O:
|
||||
self.app.on_file_openproject()
|
||||
|
||||
# Open Project
|
||||
if key == QtCore.Qt.Key_P:
|
||||
self.app.on_file_save_objects_pdf(use_thread=True)
|
||||
|
||||
# PDF Import
|
||||
if key == QtCore.Qt.Key_Q:
|
||||
self.app.pdf_tool.run()
|
||||
|
||||
Reference in New Issue
Block a user