- in Gerber and Excellon UI added buttons to start the Editor

- in all Editors Selected Tab added a button to Exit the Editor
This commit is contained in:
Marius Stanciu 2020-07-10 05:03:54 +03:00
parent 0dee41e03c
commit 24192540d7
7 changed files with 83 additions and 2 deletions

View File

@ -11,6 +11,8 @@ CHANGELOG for FlatCAM beta
- Tool Drilling - moved some of the Excellon Preferences related to drilling operation to it's own group Drilling Tool Options
- optimized the CNCJob UI to look like other parts of the app
- in Gerber and Excellon UI added buttons to start the Editor
- in all Editors Selected Tab added a button to Exit the Editor
9.07.2020

View File

@ -2028,7 +2028,22 @@ class AppExcEditor(QtCore.QObject):
self.slot_array_frame.hide()
self.tools_box.addStretch()
layout.addStretch()
# Editor
self.exit_editor_button = QtWidgets.QPushButton(_('Exit Editor'))
self.exit_editor_button.setToolTip(
_("Exit from Editor.")
)
self.exit_editor_button.setStyleSheet("""
QPushButton
{
font-weight: bold;
}
""")
layout.addWidget(self.exit_editor_button)
self.exit_editor_button.clicked.connect(lambda: self.app.editor2object())
# ## Toolbar events and properties
self.tools_exc = {

View File

@ -3295,6 +3295,23 @@ class AppGeoEditor(QtCore.QObject):
self.geo_parent = self.tw.invisibleRootItem()
layout.addStretch()
# Editor
self.exit_editor_button = QtWidgets.QPushButton(_('Exit Editor'))
self.exit_editor_button.setToolTip(
_("Exit from Editor.")
)
self.exit_editor_button.setStyleSheet("""
QPushButton
{
font-weight: bold;
}
""")
layout.addWidget(self.exit_editor_button)
self.exit_editor_button.clicked.connect(lambda: self.app.editor2object())
# ## Toolbar events and properties
self.tools = {
"select": {"button": self.app.ui.geo_select_btn, "constructor": FCSelect},

View File

@ -2892,7 +2892,22 @@ class AppGerberEditor(QtCore.QObject):
self.array_frame.hide()
self.custom_box.addStretch()
layout.addStretch()
# Editor
self.exit_editor_button = QtWidgets.QPushButton(_('Exit Editor'))
self.exit_editor_button.setToolTip(
_("Exit from Editor.")
)
self.exit_editor_button.setStyleSheet("""
QPushButton
{
font-weight: bold;
}
""")
layout.addWidget(self.exit_editor_button)
self.exit_editor_button.clicked.connect(lambda: self.app.editor2object())
# Toolbar events and properties
self.tools_gerber = {

View File

@ -311,6 +311,19 @@ class GerberObjectUI(ObjectUI):
)
self.custom_box.addWidget(self.create_buffer_button)
# Editor
self.editor_button = QtWidgets.QPushButton(_('Gerber Editor'))
self.editor_button.setToolTip(
_("Edit an Gerber object.")
)
self.editor_button.setStyleSheet("""
QPushButton
{
font-weight: bold;
}
""")
self.custom_box.addWidget(self.editor_button)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
@ -584,6 +597,19 @@ class ExcellonObjectUI(ObjectUI):
# this column is not used; reserved for future usage
self.tools_table.setColumnHidden(4, True)
# Editor
self.editor_button = QtWidgets.QPushButton(_('Excellon Editor'))
self.editor_button.setToolTip(
_("Edit an Excellon object.")
)
self.editor_button.setStyleSheet("""
QPushButton
{
font-weight: bold;
}
""")
self.tools_box.addWidget(self.editor_button)
# #################################################################
# ########## TOOLS GRID ###########################################
# #################################################################

View File

@ -268,6 +268,9 @@ class ExcellonObject(FlatCAMObj, Excellon):
self.ui.solid_cb.stateChanged.connect(self.on_solid_cb_click)
self.ui.multicolored_cb.stateChanged.connect(self.on_multicolored_cb_click)
# Editor
self.ui.editor_button.clicked.connect(lambda: self.app.object2editor())
self.ui.drill_button.clicked.connect(lambda: self.app.drilling_tool.run(toggle=True))
# self.ui.milling_button.clicked.connect(lambda: self.app.milling_tool.run(toggle=True))

View File

@ -207,6 +207,9 @@ class GerberObject(FlatCAMObj, Gerber):
self.ui.solid_cb.stateChanged.connect(self.on_solid_cb_click)
self.ui.multicolored_cb.stateChanged.connect(self.on_multicolored_cb_click)
# Editor
self.ui.editor_button.clicked.connect(lambda: self.app.object2editor())
# Tools
self.ui.iso_button.clicked.connect(self.app.isolation_tool.run)
self.ui.generate_ncc_button.clicked.connect(self.app.ncclear_tool.run)