- the Selected Tab is now Properties Tab for FlatCAM objects
- modified the Properties Tab for various FlatCAM objects preparing the move of Properties Tool data into the Properties Tab - if the Properties tab is in focus (selected) when a new object is created then it is automatically selected therefore it's properties will be populated
This commit is contained in:
parent
2f564b5a76
commit
d5cf7b4980
@ -7,6 +7,12 @@ CHANGELOG for FlatCAM beta
|
||||
|
||||
=================================================
|
||||
|
||||
26.09.2020
|
||||
|
||||
- the Selected Tab is now Properties Tab for FlatCAM objects
|
||||
- modified the Properties Tab for various FlatCAM objects preparing the move of Properties Tool data into the Properties Tab
|
||||
- if the Properties tab is in focus (selected) when a new object is created then it is automatically selected therefore it's properties will be populated
|
||||
|
||||
25.09.2020
|
||||
|
||||
- minor GUI change in Isolation Tool
|
||||
|
@ -76,8 +76,8 @@ class FCDrillAdd(FCShapeTool):
|
||||
|
||||
self.draw_app.app.jump_signal.connect(lambda x: self.draw_app.update_utility_geometry(data=x))
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.properties_tab)
|
||||
|
||||
def click(self, point):
|
||||
self.make()
|
||||
@ -194,8 +194,8 @@ class FCDrillArray(FCShapeTool):
|
||||
|
||||
self.draw_app.app.jump_signal.connect(lambda x: self.draw_app.update_utility_geometry(data=x))
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.properties_tab)
|
||||
|
||||
def click(self, point):
|
||||
|
||||
@ -416,8 +416,8 @@ class FCSlot(FCShapeTool):
|
||||
|
||||
self.draw_app.app.jump_signal.connect(lambda x: self.draw_app.update_utility_geometry(data=x))
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.properties_tab)
|
||||
|
||||
def click(self, point):
|
||||
self.make()
|
||||
@ -637,8 +637,8 @@ class FCSlotArray(FCShapeTool):
|
||||
|
||||
self.draw_app.app.jump_signal.connect(lambda x: self.draw_app.update_utility_geometry(data=x))
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.properties_tab)
|
||||
|
||||
def click(self, point):
|
||||
|
||||
@ -916,8 +916,8 @@ class FCDrillResize(FCShapeTool):
|
||||
self.draw_app.resize_btn.clicked.connect(self.make)
|
||||
self.draw_app.resdrill_entry.editingFinished.connect(self.make)
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.properties_tab)
|
||||
|
||||
def make(self):
|
||||
self.draw_app.is_modified = True
|
||||
@ -1163,8 +1163,8 @@ class FCDrillMove(FCShapeTool):
|
||||
|
||||
self.draw_app.app.jump_signal.connect(lambda x: self.draw_app.update_utility_geometry(data=x))
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.properties_tab)
|
||||
|
||||
def set_origin(self, origin):
|
||||
self.origin = origin
|
||||
@ -1979,10 +1979,10 @@ class AppExcEditor(QtCore.QObject):
|
||||
|
||||
# Remove anything else in the GUI Selected Tab
|
||||
self.app.ui.selected_scroll_area.takeWidget()
|
||||
# Put ourself in the GUI Selected Tab
|
||||
# Put ourselves in the GUI Properties Tab
|
||||
self.app.ui.selected_scroll_area.setWidget(self.e_ui.exc_edit_widget)
|
||||
# Switch notebook to Selected page
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
|
||||
# we reactivate the signals after the after the tool adding as we don't need to see the tool been populated
|
||||
self.e_ui.tools_table_exc.itemChanged.connect(self.on_tool_edit)
|
||||
|
@ -399,7 +399,7 @@ class TextInputTool(AppTool):
|
||||
|
||||
def hide_tool(self):
|
||||
self.text_tool_frame.hide()
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
# self.app.ui.splitter.setSizes([0, 1])
|
||||
self.app.ui.notebook.setTabText(2, _("Tool"))
|
||||
|
||||
@ -1023,7 +1023,7 @@ class TransformEditorTool(AppTool):
|
||||
if toggle:
|
||||
try:
|
||||
if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName:
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
else:
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
|
||||
except AttributeError:
|
||||
@ -3099,8 +3099,8 @@ class FCEraser(FCShapeTool):
|
||||
self.geometry = []
|
||||
self.storage = self.draw_app.storage
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.properties_tab)
|
||||
self.draw_app.app.jump_signal.connect(lambda x: self.draw_app.update_utility_geometry(data=x))
|
||||
|
||||
def set_origin(self, origin):
|
||||
@ -3529,14 +3529,14 @@ class AppGeoEditor(QtCore.QObject):
|
||||
|
||||
# Remove anything else in the GUI Selected Tab
|
||||
self.app.ui.selected_scroll_area.takeWidget()
|
||||
# Put ourselves in the appGUI Selected Tab
|
||||
# Put ourselves in the appGUI Properties Tab
|
||||
self.app.ui.selected_scroll_area.setWidget(self.geo_edit_widget)
|
||||
# Switch notebook to Selected page
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
|
||||
def build_ui(self):
|
||||
"""
|
||||
Build the appGUI in the Selected Tab for this editor
|
||||
Build the appGUI in the Properties Tab for this editor
|
||||
|
||||
:return:
|
||||
"""
|
||||
@ -3633,8 +3633,8 @@ class AppGeoEditor(QtCore.QObject):
|
||||
self.app.ui.popmenu_properties.setVisible(False)
|
||||
self.app.ui.g_editor_cmenu.menuAction().setVisible(True)
|
||||
|
||||
# prevent the user to change anything in the Selected Tab while the Geo Editor is active
|
||||
# sel_tab_widget_list = self.app.ui.selected_tab.findChildren(QtWidgets.QWidget)
|
||||
# prevent the user to change anything in the Properties Tab while the Geo Editor is active
|
||||
# sel_tab_widget_list = self.app.ui.properties_tab.findChildren(QtWidgets.QWidget)
|
||||
# for w in sel_tab_widget_list:
|
||||
# w.setEnabled(False)
|
||||
|
||||
@ -3715,7 +3715,7 @@ class AppGeoEditor(QtCore.QObject):
|
||||
|
||||
# try:
|
||||
# # re-enable all the widgets in the Selected Tab that were disabled after entering in Edit Geometry Mode
|
||||
# sel_tab_widget_list = self.app.ui.selected_tab.findChildren(QtWidgets.QWidget)
|
||||
# sel_tab_widget_list = self.app.ui.properties_tab.findChildren(QtWidgets.QWidget)
|
||||
# for w in sel_tab_widget_list:
|
||||
# w.setEnabled(True)
|
||||
# except Exception as e:
|
||||
|
@ -242,8 +242,8 @@ class FCPad(FCShapeTool):
|
||||
|
||||
self.draw_app.app.jump_signal.connect(lambda x: self.draw_app.update_utility_geometry(data=x))
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.properties_tab)
|
||||
|
||||
self.start_msg = _("Click to place ...")
|
||||
|
||||
@ -472,8 +472,8 @@ class FCPadArray(FCShapeTool):
|
||||
|
||||
self.draw_app.app.jump_signal.connect(lambda x: self.draw_app.update_utility_geometry(data=x))
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.properties_tab)
|
||||
|
||||
def click(self, point):
|
||||
|
||||
@ -1954,8 +1954,8 @@ class FCApertureMove(FCShapeTool):
|
||||
aperture_on_row = self.draw_app.apertures_table.item(row, 1).text()
|
||||
self.selected_apertures.append(aperture_on_row)
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.properties_tab)
|
||||
|
||||
self.draw_app.app.jump_signal.connect(lambda x: self.draw_app.update_utility_geometry(data=x))
|
||||
|
||||
@ -2170,8 +2170,8 @@ class FCEraser(FCShapeTool):
|
||||
aperture_on_row = self.draw_app.apertures_table.item(row, 1).text()
|
||||
self.selected_apertures.append(aperture_on_row)
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.draw_app.app.ui.notebook.setCurrentWidget(self.draw_app.app.ui.properties_tab)
|
||||
|
||||
self.draw_app.app.jump_signal.connect(lambda x: self.draw_app.update_utility_geometry(data=x))
|
||||
|
||||
@ -3322,12 +3322,12 @@ class AppGerberEditor(QtCore.QObject):
|
||||
# make sure no rows are selected so the user have to click the correct row, meaning selecting the correct tool
|
||||
self.apertures_table.clearSelection()
|
||||
|
||||
# Remove anything else in the GUI Selected Tab
|
||||
# Remove anything else in the GUI Properties Tab
|
||||
self.app.ui.selected_scroll_area.takeWidget()
|
||||
# Put ourselves in the GUI Selected Tab
|
||||
# Put ourselves in the GUI Properties Tab
|
||||
self.app.ui.selected_scroll_area.setWidget(self.grb_edit_widget)
|
||||
# Switch notebook to Selected page
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
|
||||
# we reactivate the signals after the after the tool adding as we don't need to see the tool been populated
|
||||
self.apertures_table.itemChanged.connect(self.on_tool_edit)
|
||||
@ -5305,7 +5305,7 @@ class AppGerberEditor(QtCore.QObject):
|
||||
self.ma_tool_frame.hide()
|
||||
except Exception as e:
|
||||
log.debug("AppGerberEditor.hide_tool() --> %s" % str(e))
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
|
||||
|
||||
class TransformEditorTool(AppTool):
|
||||
@ -5733,7 +5733,7 @@ class TransformEditorTool(AppTool):
|
||||
if toggle:
|
||||
try:
|
||||
if self.app.ui.tool_scroll_area.widget().objectName() == self.toolName:
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
else:
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.tool_tab)
|
||||
except AttributeError:
|
||||
|
@ -90,12 +90,12 @@ class AppGCodeEditor(QtCore.QObject):
|
||||
self.ui.append_text.set_value(self.app.defaults["cncjob_append"])
|
||||
self.ui.prepend_text.set_value(self.app.defaults["cncjob_prepend"])
|
||||
|
||||
# Remove anything else in the GUI Selected Tab
|
||||
# Remove anything else in the GUI Properties Tab
|
||||
self.app.ui.selected_scroll_area.takeWidget()
|
||||
# Put ourselves in the GUI Selected Tab
|
||||
# Put ourselves in the GUI Properties Tab
|
||||
self.app.ui.selected_scroll_area.setWidget(self.ui.edit_widget)
|
||||
# Switch notebook to Selected page
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
|
||||
# make a new name for the new Excellon object (the one with edited content)
|
||||
self.edited_obj_name = self.gcode_obj.options['name']
|
||||
|
@ -1224,16 +1224,16 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
# ########################################################################
|
||||
# ########################## SELECTED Tab # ##############################
|
||||
# ########################################################################
|
||||
self.selected_tab = QtWidgets.QWidget()
|
||||
# self.selected_tab.setMinimumWidth(270)
|
||||
self.selected_tab.setObjectName("selected_tab")
|
||||
self.selected_tab_layout = QtWidgets.QVBoxLayout(self.selected_tab)
|
||||
self.selected_tab_layout.setContentsMargins(2, 2, 2, 2)
|
||||
self.properties_tab = QtWidgets.QWidget()
|
||||
# self.properties_tab.setMinimumWidth(270)
|
||||
self.properties_tab.setObjectName("properties_tab")
|
||||
self.properties_tab_layout = QtWidgets.QVBoxLayout(self.properties_tab)
|
||||
self.properties_tab_layout.setContentsMargins(2, 2, 2, 2)
|
||||
|
||||
self.selected_scroll_area = VerticalScrollArea()
|
||||
# self.selected_scroll_area.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContents)
|
||||
self.selected_tab_layout.addWidget(self.selected_scroll_area)
|
||||
self.notebook.addTab(self.selected_tab, _("Selected"))
|
||||
self.properties_tab_layout.addWidget(self.selected_scroll_area)
|
||||
self.notebook.addTab(self.properties_tab, _("Properties"))
|
||||
|
||||
# ########################################################################
|
||||
# ########################## TOOL Tab # ##################################
|
||||
|
@ -230,20 +230,39 @@ class GerberObjectUI(ObjectUI):
|
||||
grid0.addWidget(self.plot_lbl, 2, 0)
|
||||
grid0.addWidget(self.plot_cb, 2, 1)
|
||||
|
||||
# generate follow
|
||||
# Generate 'Follow'
|
||||
self.follow_cb = FCCheckBox('%s' % _("Follow"))
|
||||
self.follow_cb.setToolTip(_("Generate a 'Follow' geometry.\n"
|
||||
"This means that it will cut through\n"
|
||||
"the middle of the trace."))
|
||||
grid0.addWidget(self.follow_cb, 2, 2)
|
||||
|
||||
# Editor
|
||||
self.editor_button = QtWidgets.QPushButton(_('Gerber Editor'))
|
||||
self.editor_button.setIcon(QtGui.QIcon(self.app.resource_location + '/edit_file32.png'))
|
||||
self.editor_button.setToolTip(
|
||||
_("Edit an Gerber object.")
|
||||
)
|
||||
self.editor_button.setStyleSheet("""
|
||||
QPushButton
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
""")
|
||||
grid0.addWidget(self.editor_button, 4, 0, 1, 3)
|
||||
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
grid0.addWidget(separator_line, 6, 0, 1, 3)
|
||||
|
||||
# ### Gerber Apertures ####
|
||||
self.apertures_table_label = QtWidgets.QLabel('%s:' % _('Apertures'))
|
||||
self.apertures_table_label.setToolTip(
|
||||
_("Apertures Table for the Gerber Object.")
|
||||
)
|
||||
|
||||
grid0.addWidget(self.apertures_table_label, 4, 0)
|
||||
grid0.addWidget(self.apertures_table_label, 8, 0)
|
||||
|
||||
# Aperture Table Visibility CB
|
||||
self.aperture_table_visibility_cb = FCCheckBox()
|
||||
@ -251,10 +270,10 @@ class GerberObjectUI(ObjectUI):
|
||||
_("Toggle the display of the Tools Table.")
|
||||
)
|
||||
# self.aperture_table_visibility_cb.setLayoutDirection(QtCore.Qt.RightToLeft)
|
||||
grid0.addWidget(self.aperture_table_visibility_cb, 4, 1)
|
||||
grid0.addWidget(self.aperture_table_visibility_cb, 8, 1)
|
||||
|
||||
hlay_plot = QtWidgets.QHBoxLayout()
|
||||
grid0.addLayout(hlay_plot, 4, 2)
|
||||
grid0.addLayout(hlay_plot, 8, 2)
|
||||
|
||||
# Aperture Mark all CB
|
||||
self.mark_all_cb = FCCheckBox(_('Mark All'))
|
||||
@ -270,7 +289,7 @@ class GerberObjectUI(ObjectUI):
|
||||
|
||||
# Apertures Table
|
||||
self.apertures_table = FCTable()
|
||||
grid0.addWidget(self.apertures_table, 6, 0, 1, 3)
|
||||
grid0.addWidget(self.apertures_table, 10, 0, 1, 3)
|
||||
|
||||
self.apertures_table.setColumnCount(6)
|
||||
self.apertures_table.setHorizontalHeaderLabels(['#', _('Code'), _('Type'), _('Size'), _('Dim'), 'M'])
|
||||
@ -303,26 +322,7 @@ class GerberObjectUI(ObjectUI):
|
||||
"Clicking this will create the buffered geometry\n"
|
||||
"required for isolation.")
|
||||
)
|
||||
grid0.addWidget(self.create_buffer_button, 8, 0, 1, 3)
|
||||
|
||||
# Editor
|
||||
self.editor_button = QtWidgets.QPushButton(_('Gerber Editor'))
|
||||
self.editor_button.setIcon(QtGui.QIcon(self.app.resource_location + '/edit_file32.png'))
|
||||
self.editor_button.setToolTip(
|
||||
_("Edit an Gerber object.")
|
||||
)
|
||||
self.editor_button.setStyleSheet("""
|
||||
QPushButton
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
""")
|
||||
grid0.addWidget(self.editor_button, 10, 0, 1, 3)
|
||||
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
grid0.addWidget(separator_line, 12, 0, 1, 3)
|
||||
grid0.addWidget(self.create_buffer_button, 12, 0, 1, 3)
|
||||
|
||||
self.tool_lbl = QtWidgets.QLabel('<b>%s</b>' % _("TOOLS"))
|
||||
grid0.addWidget(self.tool_lbl, 14, 0, 1, 3)
|
||||
@ -487,33 +487,30 @@ class ExcellonObjectUI(ObjectUI):
|
||||
parent=parent,
|
||||
app=self.app)
|
||||
|
||||
grid0 = QtWidgets.QGridLayout()
|
||||
grid0.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
|
||||
grid0.setColumnStretch(0, 0)
|
||||
grid0.setColumnStretch(1, 1)
|
||||
self.custom_box.addLayout(grid0)
|
||||
|
||||
# Plot options
|
||||
grid_h = QtWidgets.QGridLayout()
|
||||
grid_h.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
|
||||
self.custom_box.addLayout(grid_h)
|
||||
grid_h.setColumnStretch(0, 0)
|
||||
grid_h.setColumnStretch(1, 1)
|
||||
|
||||
self.plot_options_label = QtWidgets.QLabel("<b>%s:</b>" % _("Plot Options"))
|
||||
# self.plot_options_label.setMinimumWidth(90)
|
||||
|
||||
grid_h.addWidget(self.plot_options_label, 0, 0)
|
||||
|
||||
# Solid CB
|
||||
self.solid_cb = FCCheckBox(label=_('Solid'))
|
||||
self.solid_cb.setToolTip(
|
||||
_("Solid circles.")
|
||||
)
|
||||
# self.solid_cb.setMinimumWidth(50)
|
||||
grid_h.addWidget(self.solid_cb, 0, 1)
|
||||
|
||||
# Multicolored CB
|
||||
self.multicolored_cb = FCCheckBox(label=_('Multi-Color'))
|
||||
self.multicolored_cb.setToolTip(
|
||||
_("Draw polygons in different colors.")
|
||||
)
|
||||
# self.multicolored_cb.setMinimumWidth(55)
|
||||
grid_h.addWidget(self.multicolored_cb, 0, 2)
|
||||
|
||||
grid0.addWidget(self.plot_options_label, 0, 0)
|
||||
grid0.addWidget(self.solid_cb, 0, 1)
|
||||
grid0.addWidget(self.multicolored_cb, 0, 2)
|
||||
|
||||
# ## Object name
|
||||
self.name_hlay = QtWidgets.QHBoxLayout()
|
||||
@ -524,7 +521,22 @@ class ExcellonObjectUI(ObjectUI):
|
||||
self.name_hlay.addWidget(name_label)
|
||||
self.name_hlay.addWidget(self.name_entry)
|
||||
|
||||
grid_h.addLayout(self.name_hlay, 1, 0, 1, 3)
|
||||
grid0.addLayout(self.name_hlay, 2, 0, 1, 3)
|
||||
|
||||
# Editor
|
||||
self.editor_button = QtWidgets.QPushButton(_('Excellon Editor'))
|
||||
self.editor_button.setIcon(QtGui.QIcon(self.app.resource_location + '/edit_file32.png'))
|
||||
|
||||
self.editor_button.setToolTip(
|
||||
_("Edit an Excellon object.")
|
||||
)
|
||||
self.editor_button.setStyleSheet("""
|
||||
QPushButton
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
""")
|
||||
grid0.addWidget(self.editor_button, 4, 0, 1, 3)
|
||||
|
||||
# ### Tools Drills ####
|
||||
self.tools_table_label = QtWidgets.QLabel('<b>%s</b>' % _('Tools Table'))
|
||||
@ -549,12 +561,17 @@ class ExcellonObjectUI(ObjectUI):
|
||||
hlay_plot.addStretch()
|
||||
hlay_plot.addWidget(self.plot_cb)
|
||||
|
||||
grid_h.addWidget(self.tools_table_label, 2, 0)
|
||||
grid_h.addWidget(self.table_visibility_cb, 2, 1)
|
||||
grid_h.addLayout(hlay_plot, 2, 2)
|
||||
grid0.addWidget(self.tools_table_label, 6, 0)
|
||||
grid0.addWidget(self.table_visibility_cb, 6, 1)
|
||||
grid0.addLayout(hlay_plot, 6, 2)
|
||||
|
||||
# #############################################################################################################
|
||||
# #############################################################################################################
|
||||
# add a frame and inside add a vertical box layout. Inside this vbox layout I add all the Drills widgets
|
||||
# this way I can hide/show the frame
|
||||
# #############################################################################################################
|
||||
# #############################################################################################################
|
||||
|
||||
self.drills_frame = QtWidgets.QFrame()
|
||||
self.drills_frame.setContentsMargins(0, 0, 0, 0)
|
||||
self.custom_box.addWidget(self.drills_frame)
|
||||
@ -605,21 +622,6 @@ class ExcellonObjectUI(ObjectUI):
|
||||
)
|
||||
self.tools_box.addWidget(self.autoload_db_cb)
|
||||
|
||||
# Editor
|
||||
self.editor_button = QtWidgets.QPushButton(_('Excellon Editor'))
|
||||
self.editor_button.setIcon(QtGui.QIcon(self.app.resource_location + '/edit_file32.png'))
|
||||
|
||||
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 ###########################################
|
||||
# #################################################################
|
||||
@ -789,7 +791,7 @@ class GeometryObjectUI(ObjectUI):
|
||||
|
||||
# ## Object name
|
||||
self.name_hlay = QtWidgets.QHBoxLayout()
|
||||
grid_header.addLayout(self.name_hlay, 1, 0, 1, 3)
|
||||
grid_header.addLayout(self.name_hlay, 2, 0, 1, 3)
|
||||
|
||||
name_label = QtWidgets.QLabel("<b>%s:</b>" % _("Name"))
|
||||
self.name_entry = FCEntry()
|
||||
@ -797,6 +799,21 @@ class GeometryObjectUI(ObjectUI):
|
||||
self.name_hlay.addWidget(name_label)
|
||||
self.name_hlay.addWidget(self.name_entry)
|
||||
|
||||
# Editor
|
||||
self.editor_button = QtWidgets.QPushButton(_('Geometry Editor'))
|
||||
self.editor_button.setIcon(QtGui.QIcon(self.app.resource_location + '/edit_file32.png'))
|
||||
|
||||
self.editor_button.setToolTip(
|
||||
_("Edit an Geometry object.")
|
||||
)
|
||||
self.editor_button.setStyleSheet("""
|
||||
QPushButton
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
""")
|
||||
grid_header.addWidget(self.editor_button, 4, 0, 1, 3)
|
||||
|
||||
# add a frame and inside add a vertical box layout. Inside this vbox layout I add all the Tools widgets
|
||||
# this way I can hide/show the frame
|
||||
self.geo_tools_frame = QtWidgets.QFrame()
|
||||
@ -907,24 +924,6 @@ class GeometryObjectUI(ObjectUI):
|
||||
"for the corresponding tool."
|
||||
))
|
||||
|
||||
# self.geo_tools_table.setSortingEnabled(False)
|
||||
# self.geo_tools_table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
|
||||
|
||||
# Editor
|
||||
self.editor_button = QtWidgets.QPushButton(_('Geometry Editor'))
|
||||
self.editor_button.setIcon(QtGui.QIcon(self.app.resource_location + '/edit_file32.png'))
|
||||
|
||||
self.editor_button.setToolTip(
|
||||
_("Edit an Geometry object.")
|
||||
)
|
||||
self.editor_button.setStyleSheet("""
|
||||
QPushButton
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
""")
|
||||
grid0.addWidget(self.editor_button, 3, 0, 1, 2)
|
||||
|
||||
# Tool Offset
|
||||
grid1 = QtWidgets.QGridLayout()
|
||||
self.geo_table_box.addLayout(grid1)
|
||||
@ -953,10 +952,10 @@ class GeometryObjectUI(ObjectUI):
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
grid1.addWidget(separator_line, 1, 0, 1, 2)
|
||||
|
||||
self.tool_sel_label = QtWidgets.QLabel('<b>%s</b>' % _("New Tool"))
|
||||
self.tool_sel_label = QtWidgets.QLabel('<b>%s</b>' % _("Add from DB"))
|
||||
grid1.addWidget(self.tool_sel_label, 2, 0, 1, 2)
|
||||
|
||||
self.addtool_entry_lbl = QtWidgets.QLabel('<b>%s:</b>' % _('Tool Dia'))
|
||||
self.addtool_entry_lbl = QtWidgets.QLabel('%s:' % _('Tool Dia'))
|
||||
self.addtool_entry_lbl.setToolTip(
|
||||
_("Diameter for the new tool")
|
||||
)
|
||||
@ -970,14 +969,15 @@ class GeometryObjectUI(ObjectUI):
|
||||
|
||||
bhlay = QtWidgets.QHBoxLayout()
|
||||
|
||||
self.addtool_btn = QtWidgets.QPushButton(_('Add'))
|
||||
self.addtool_btn = QtWidgets.QPushButton(_('Search and Add'))
|
||||
self.addtool_btn.setIcon(QtGui.QIcon(self.app.resource_location + '/plus16.png'))
|
||||
self.addtool_btn.setToolTip(
|
||||
_("Add a new tool to the Tool Table\n"
|
||||
"with the diameter specified above.")
|
||||
)
|
||||
|
||||
self.addtool_from_db_btn = QtWidgets.QPushButton(_('Add from DB'))
|
||||
self.addtool_from_db_btn = QtWidgets.QPushButton(_('Pick from DB'))
|
||||
self.addtool_from_db_btn.setIcon(QtGui.QIcon(self.app.resource_location + '/search_db32.png'))
|
||||
self.addtool_from_db_btn.setToolTip(
|
||||
_("Add a new tool to the Tool Table\n"
|
||||
"from the Tool Database.\n"
|
||||
@ -1296,15 +1296,15 @@ class GeometryObjectUI(ObjectUI):
|
||||
# ################# GRID LAYOUT 4 ###############################
|
||||
# #################################################################
|
||||
|
||||
grid4 = QtWidgets.QGridLayout()
|
||||
grid4.setColumnStretch(0, 0)
|
||||
grid4.setColumnStretch(1, 1)
|
||||
self.geo_param_box.addLayout(grid4)
|
||||
self.grid4 = QtWidgets.QGridLayout()
|
||||
self.grid4.setColumnStretch(0, 0)
|
||||
self.grid4.setColumnStretch(1, 1)
|
||||
self.geo_param_box.addLayout(self.grid4)
|
||||
|
||||
separator_line2 = QtWidgets.QFrame()
|
||||
separator_line2.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
separator_line2.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
grid4.addWidget(separator_line2, 0, 0, 1, 2)
|
||||
self.grid4.addWidget(separator_line2, 0, 0, 1, 2)
|
||||
|
||||
self.apply_param_to_all = FCButton(_("Apply parameters to all tools"))
|
||||
self.apply_param_to_all.setIcon(QtGui.QIcon(self.app.resource_location + '/param_all32.png'))
|
||||
@ -1312,19 +1312,19 @@ class GeometryObjectUI(ObjectUI):
|
||||
_("The parameters in the current form will be applied\n"
|
||||
"on all the tools from the Tool Table.")
|
||||
)
|
||||
grid4.addWidget(self.apply_param_to_all, 1, 0, 1, 2)
|
||||
self.grid4.addWidget(self.apply_param_to_all, 1, 0, 1, 2)
|
||||
|
||||
separator_line2 = QtWidgets.QFrame()
|
||||
separator_line2.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
separator_line2.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
grid4.addWidget(separator_line2, 2, 0, 1, 2)
|
||||
self.grid4.addWidget(separator_line2, 2, 0, 1, 2)
|
||||
|
||||
# General Parameters
|
||||
self.gen_param_label = QtWidgets.QLabel('<b>%s</b>' % _("Common Parameters"))
|
||||
self.gen_param_label.setToolTip(
|
||||
_("Parameters that are common for all tools.")
|
||||
)
|
||||
grid4.addWidget(self.gen_param_label, 3, 0, 1, 2)
|
||||
self.grid4.addWidget(self.gen_param_label, 3, 0, 1, 2)
|
||||
|
||||
# Tool change Z
|
||||
self.toolchangeg_cb = FCCheckBox('%s:' % _("Tool change Z"))
|
||||
@ -1351,8 +1351,8 @@ class GeometryObjectUI(ObjectUI):
|
||||
self.toolchangez_entry.setSingleStep(0.1)
|
||||
self.ois_tcz_geo = OptionalInputSection(self.toolchangeg_cb, [self.toolchangez_entry])
|
||||
|
||||
grid4.addWidget(self.toolchangeg_cb, 6, 0)
|
||||
grid4.addWidget(self.toolchangez_entry, 6, 1)
|
||||
self.grid4.addWidget(self.toolchangeg_cb, 6, 0)
|
||||
self.grid4.addWidget(self.toolchangez_entry, 6, 1)
|
||||
|
||||
# The Z value for the start move
|
||||
# startzlabel = QtWidgets.QLabel('Start move Z:')
|
||||
@ -1381,8 +1381,8 @@ class GeometryObjectUI(ObjectUI):
|
||||
|
||||
self.endz_entry.setSingleStep(0.1)
|
||||
|
||||
grid4.addWidget(self.endz_label, 9, 0)
|
||||
grid4.addWidget(self.endz_entry, 9, 1)
|
||||
self.grid4.addWidget(self.endz_label, 9, 0)
|
||||
self.grid4.addWidget(self.endz_entry, 9, 1)
|
||||
|
||||
# End Move X,Y
|
||||
endmove_xy_label = QtWidgets.QLabel('%s:' % _('End move X,Y'))
|
||||
@ -1394,8 +1394,8 @@ class GeometryObjectUI(ObjectUI):
|
||||
self.endxy_entry = NumericalEvalTupleEntry(border_color='#0069A9')
|
||||
self.endxy_entry.setPlaceholderText(_("X,Y coordinates"))
|
||||
|
||||
grid4.addWidget(endmove_xy_label, 10, 0)
|
||||
grid4.addWidget(self.endxy_entry, 10, 1)
|
||||
self.grid4.addWidget(endmove_xy_label, 10, 0)
|
||||
self.grid4.addWidget(self.endxy_entry, 10, 1)
|
||||
|
||||
# preprocessor selection
|
||||
pp_label = QtWidgets.QLabel('%s:' % _("Preprocessor"))
|
||||
@ -1406,10 +1406,10 @@ class GeometryObjectUI(ObjectUI):
|
||||
self.pp_geometry_name_cb = FCComboBox()
|
||||
self.pp_geometry_name_cb.setFocusPolicy(QtCore.Qt.StrongFocus)
|
||||
|
||||
grid4.addWidget(pp_label, 11, 0)
|
||||
grid4.addWidget(self.pp_geometry_name_cb, 11, 1)
|
||||
self.grid4.addWidget(pp_label, 11, 0)
|
||||
self.grid4.addWidget(self.pp_geometry_name_cb, 11, 1)
|
||||
|
||||
# grid4.addWidget(QtWidgets.QLabel(''), 12, 0, 1, 2)
|
||||
# self.grid4.addWidget(QtWidgets.QLabel(''), 12, 0, 1, 2)
|
||||
|
||||
# ------------------------------------------------------------------------------------------------------------
|
||||
# ------------------------- EXCLUSION AREAS ------------------------------------------------------------------
|
||||
@ -1424,11 +1424,11 @@ class GeometryObjectUI(ObjectUI):
|
||||
"is forbidden."
|
||||
)
|
||||
)
|
||||
grid4.addWidget(self.exclusion_cb, 12, 0, 1, 2)
|
||||
self.grid4.addWidget(self.exclusion_cb, 12, 0, 1, 2)
|
||||
|
||||
self.exclusion_frame = QtWidgets.QFrame()
|
||||
self.exclusion_frame.setContentsMargins(0, 0, 0, 0)
|
||||
grid4.addWidget(self.exclusion_frame, 14, 0, 1, 2)
|
||||
self.grid4.addWidget(self.exclusion_frame, 14, 0, 1, 2)
|
||||
|
||||
self.exclusion_box = QtWidgets.QVBoxLayout()
|
||||
self.exclusion_box.setContentsMargins(0, 0, 0, 0)
|
||||
@ -1519,7 +1519,7 @@ class GeometryObjectUI(ObjectUI):
|
||||
"Will add a Paint section at the end of the GCode.\n"
|
||||
"A metallic brush will clean the material after milling."))
|
||||
self.polish_cb.setObjectName("g_polish")
|
||||
grid4.addWidget(self.polish_cb, 15, 0, 1, 2)
|
||||
self.grid4.addWidget(self.polish_cb, 15, 0, 1, 2)
|
||||
|
||||
# Polish Tool Diameter
|
||||
self.polish_dia_lbl = QtWidgets.QLabel('%s:' % _('Tool Dia'))
|
||||
@ -1531,8 +1531,8 @@ class GeometryObjectUI(ObjectUI):
|
||||
self.polish_dia_entry.set_range(0.000, 9999.9999)
|
||||
self.polish_dia_entry.setObjectName("g_polish_dia")
|
||||
|
||||
grid4.addWidget(self.polish_dia_lbl, 16, 0)
|
||||
grid4.addWidget(self.polish_dia_entry, 16, 1)
|
||||
self.grid4.addWidget(self.polish_dia_lbl, 16, 0)
|
||||
self.grid4.addWidget(self.polish_dia_entry, 16, 1)
|
||||
|
||||
# Polish Pressure
|
||||
self.polish_pressure_lbl = QtWidgets.QLabel('%s:' % _('Pressure'))
|
||||
@ -1545,8 +1545,8 @@ class GeometryObjectUI(ObjectUI):
|
||||
self.polish_pressure_entry.set_range(-9999.9999, 9999.9999)
|
||||
self.polish_pressure_entry.setObjectName("g_polish_pressure")
|
||||
|
||||
grid4.addWidget(self.polish_pressure_lbl, 17, 0)
|
||||
grid4.addWidget(self.polish_pressure_entry, 17, 1)
|
||||
self.grid4.addWidget(self.polish_pressure_lbl, 17, 0)
|
||||
self.grid4.addWidget(self.polish_pressure_entry, 17, 1)
|
||||
|
||||
# Polish Overlap
|
||||
self.polish_over_lbl = QtWidgets.QLabel('%s:' % _('Overlap'))
|
||||
@ -1560,8 +1560,8 @@ class GeometryObjectUI(ObjectUI):
|
||||
self.polish_over_entry.setSingleStep(0.1)
|
||||
self.polish_over_entry.setObjectName("g_polish_overlap")
|
||||
|
||||
grid4.addWidget(self.polish_over_lbl, 18, 0)
|
||||
grid4.addWidget(self.polish_over_entry, 18, 1)
|
||||
self.grid4.addWidget(self.polish_over_lbl, 18, 0)
|
||||
self.grid4.addWidget(self.polish_over_entry, 18, 1)
|
||||
|
||||
# Polish Method
|
||||
self.polish_method_lbl = QtWidgets.QLabel('%s:' % _('Method'))
|
||||
@ -1578,8 +1578,8 @@ class GeometryObjectUI(ObjectUI):
|
||||
)
|
||||
self.polish_method_combo.setObjectName('g_polish_method')
|
||||
|
||||
grid4.addWidget(self.polish_method_lbl, 20, 0)
|
||||
grid4.addWidget(self.polish_method_combo, 20, 1)
|
||||
self.grid4.addWidget(self.polish_method_lbl, 20, 0)
|
||||
self.grid4.addWidget(self.polish_method_combo, 20, 1)
|
||||
|
||||
self.polish_dia_lbl.hide()
|
||||
self.polish_dia_entry.hide()
|
||||
@ -1607,7 +1607,7 @@ class GeometryObjectUI(ObjectUI):
|
||||
separator_line2 = QtWidgets.QFrame()
|
||||
separator_line2.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
separator_line2.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
grid4.addWidget(separator_line2, 22, 0, 1, 2)
|
||||
self.grid4.addWidget(separator_line2, 22, 0, 1, 2)
|
||||
|
||||
# Button
|
||||
self.generate_cnc_button = QtWidgets.QPushButton(_('Generate CNCJob object'))
|
||||
@ -1625,9 +1625,9 @@ class GeometryObjectUI(ObjectUI):
|
||||
font-weight: bold;
|
||||
}
|
||||
""")
|
||||
grid4.addWidget(self.generate_cnc_button, 24, 0, 1, 2)
|
||||
self.grid4.addWidget(self.generate_cnc_button, 24, 0, 1, 2)
|
||||
|
||||
grid4.addWidget(QtWidgets.QLabel(''), 26, 0, 1, 2)
|
||||
self.grid4.addWidget(QtWidgets.QLabel(''), 26, 0, 1, 2)
|
||||
|
||||
# ##############
|
||||
# Paint area ##
|
||||
@ -1636,7 +1636,7 @@ class GeometryObjectUI(ObjectUI):
|
||||
self.tools_label.setToolTip(
|
||||
_("Launch Paint Tool in Tools Tab.")
|
||||
)
|
||||
grid4.addWidget(self.tools_label, 28, 0, 1, 2)
|
||||
self.grid4.addWidget(self.tools_label, 28, 0, 1, 2)
|
||||
|
||||
# Paint Button
|
||||
self.paint_tool_button = QtWidgets.QPushButton(_('Paint Tool'))
|
||||
@ -1655,7 +1655,7 @@ class GeometryObjectUI(ObjectUI):
|
||||
font-weight: bold;
|
||||
}
|
||||
""")
|
||||
grid4.addWidget(self.paint_tool_button, 30, 0, 1, 2)
|
||||
self.grid4.addWidget(self.paint_tool_button, 30, 0, 1, 2)
|
||||
|
||||
# NCC Tool
|
||||
self.generate_ncc_button = QtWidgets.QPushButton(_('NCC Tool'))
|
||||
@ -1670,7 +1670,7 @@ class GeometryObjectUI(ObjectUI):
|
||||
font-weight: bold;
|
||||
}
|
||||
""")
|
||||
grid4.addWidget(self.generate_ncc_button, 32, 0, 1, 2)
|
||||
self.grid4.addWidget(self.generate_ncc_button, 32, 0, 1, 2)
|
||||
|
||||
|
||||
class CNCObjectUI(ObjectUI):
|
||||
@ -1732,7 +1732,7 @@ class CNCObjectUI(ObjectUI):
|
||||
f_lay.addWidget(self.cncplot_method_combo, 0, 1, 1, 2)
|
||||
|
||||
self.name_hlay = QtWidgets.QHBoxLayout()
|
||||
f_lay.addLayout(self.name_hlay, 1, 0, 1, 3)
|
||||
f_lay.addLayout(self.name_hlay, 2, 0, 1, 3)
|
||||
|
||||
# ## Object name
|
||||
name_label = QtWidgets.QLabel("<b>%s:</b>" % _("Name"))
|
||||
@ -1742,6 +1742,21 @@ class CNCObjectUI(ObjectUI):
|
||||
self.name_hlay.addWidget(name_label)
|
||||
self.name_hlay.addWidget(self.name_entry)
|
||||
|
||||
# Editor
|
||||
self.editor_button = FCButton(_('GCode Editor'))
|
||||
self.editor_button.setIcon(QtGui.QIcon(self.app.resource_location + '/edit_file32.png'))
|
||||
|
||||
self.editor_button.setToolTip(
|
||||
_("Edit an GCode object.")
|
||||
)
|
||||
self.editor_button.setStyleSheet("""
|
||||
QPushButton
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
""")
|
||||
f_lay.addWidget(self.editor_button, 4, 0, 1, 3)
|
||||
|
||||
# Annotation
|
||||
self.annotation_cb = FCCheckBox(_("Display Annotation"))
|
||||
self.annotation_cb.setToolTip(
|
||||
@ -1749,12 +1764,12 @@ class CNCObjectUI(ObjectUI):
|
||||
"When checked it will display numbers in order for each end\n"
|
||||
"of a travel line.")
|
||||
)
|
||||
f_lay.addWidget(self.annotation_cb, 2, 0, 1, 3)
|
||||
f_lay.addWidget(self.annotation_cb, 6, 0, 1, 3)
|
||||
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
f_lay.addWidget(separator_line, 3, 0, 1, 3)
|
||||
f_lay.addWidget(separator_line, 8, 0, 1, 3)
|
||||
|
||||
# Travelled Distance
|
||||
self.t_distance_label = QtWidgets.QLabel("<b>%s:</b>" % _("Travelled distance"))
|
||||
@ -1765,9 +1780,9 @@ class CNCObjectUI(ObjectUI):
|
||||
self.t_distance_entry = FCEntry()
|
||||
self.units_label = QtWidgets.QLabel()
|
||||
|
||||
f_lay.addWidget(self.t_distance_label, 5, 0)
|
||||
f_lay.addWidget(self.t_distance_entry, 5, 1)
|
||||
f_lay.addWidget(self.units_label, 5, 2)
|
||||
f_lay.addWidget(self.t_distance_label, 10, 0)
|
||||
f_lay.addWidget(self.t_distance_entry, 10, 1)
|
||||
f_lay.addWidget(self.units_label, 10, 2)
|
||||
|
||||
# Estimated Time
|
||||
self.t_time_label = QtWidgets.QLabel("<b>%s:</b>" % _("Estimated time"))
|
||||
@ -1778,9 +1793,9 @@ class CNCObjectUI(ObjectUI):
|
||||
self.t_time_entry = FCEntry()
|
||||
self.units_time_label = QtWidgets.QLabel()
|
||||
|
||||
f_lay.addWidget(self.t_time_label, 7, 0)
|
||||
f_lay.addWidget(self.t_time_entry, 7, 1)
|
||||
f_lay.addWidget(self.units_time_label, 7, 2)
|
||||
f_lay.addWidget(self.t_time_label, 12, 0)
|
||||
f_lay.addWidget(self.t_time_entry, 12, 1)
|
||||
f_lay.addWidget(self.units_time_label, 12, 2)
|
||||
|
||||
self.t_distance_label.hide()
|
||||
self.t_distance_entry.setVisible(False)
|
||||
@ -1790,7 +1805,7 @@ class CNCObjectUI(ObjectUI):
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
f_lay.addWidget(separator_line, 9, 0, 1, 3)
|
||||
f_lay.addWidget(separator_line, 14, 0, 1, 3)
|
||||
|
||||
hlay = QtWidgets.QHBoxLayout()
|
||||
self.custom_box.addLayout(hlay)
|
||||
@ -1854,21 +1869,6 @@ class CNCObjectUI(ObjectUI):
|
||||
)
|
||||
self.custom_box.addWidget(self.updateplot_button)
|
||||
|
||||
# Editor
|
||||
self.editor_button = FCButton(_('GCode Editor'))
|
||||
self.editor_button.setIcon(QtGui.QIcon(self.app.resource_location + '/edit_file32.png'))
|
||||
|
||||
self.editor_button.setToolTip(
|
||||
_("Edit an GCode 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)
|
||||
|
@ -427,7 +427,7 @@ class AppObject(QtCore.QObject):
|
||||
# #############################################################################################################
|
||||
self.app.shell._edit.set_model_data(self.app.myKeywords)
|
||||
|
||||
if auto_select:
|
||||
if auto_select or self.app.ui.notebook.currentWidget() is self.app.ui.properties_tab:
|
||||
# select the just opened object but deselect the previous ones
|
||||
self.app.collection.set_all_inactive()
|
||||
self.app.collection.set_active(obj.options["name"])
|
||||
|
@ -693,7 +693,8 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
elif isinstance(current_widget, FCComboBox):
|
||||
current_widget.currentIndexChanged.connect(self.gui_form_to_storage)
|
||||
elif isinstance(current_widget, FloatEntry) or isinstance(current_widget, LengthEntry) or \
|
||||
isinstance(current_widget, FCEntry) or isinstance(current_widget, IntEntry):
|
||||
isinstance(current_widget, FCEntry) or isinstance(current_widget, IntEntry) or \
|
||||
isinstance(current_widget, NumericalEvalTupleEntry):
|
||||
current_widget.editingFinished.connect(self.gui_form_to_storage)
|
||||
elif isinstance(current_widget, FCSpinner) or isinstance(current_widget, FCDoubleSpinner):
|
||||
current_widget.returnPressed.connect(self.gui_form_to_storage)
|
||||
@ -741,7 +742,8 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
except (TypeError, AttributeError):
|
||||
pass
|
||||
elif isinstance(current_widget, LengthEntry) or isinstance(current_widget, IntEntry) or \
|
||||
isinstance(current_widget, FCEntry) or isinstance(current_widget, FloatEntry):
|
||||
isinstance(current_widget, FCEntry) or isinstance(current_widget, FloatEntry) or \
|
||||
isinstance(current_widget, NumericalEvalTupleEntry):
|
||||
try:
|
||||
current_widget.editingFinished.disconnect(self.gui_form_to_storage)
|
||||
except (TypeError, AttributeError):
|
||||
@ -1475,13 +1477,11 @@ class GeometryObject(FlatCAMObj, Geometry):
|
||||
widget_changed = self.sender()
|
||||
try:
|
||||
widget_idx = self.ui.grid3.indexOf(widget_changed)
|
||||
except Exception as e:
|
||||
log.debug("GeometryObject.gui_form_to_storage() -- wdg index -> %s" % str(e))
|
||||
return
|
||||
|
||||
# those are the indexes for the V-Tip Dia and V-Tip Angle, if edited calculate the new Cut Z
|
||||
if widget_idx == 1 or widget_idx == 3:
|
||||
self.update_cutz()
|
||||
except Exception as e:
|
||||
log.debug("GeometryObject.gui_form_to_storage() -- wdg index -> %s" % str(e))
|
||||
|
||||
# the original connect() function of the OptionalInputSelection is no longer working because of the
|
||||
# ui_diconnect() so I use this 'hack'
|
||||
|
@ -215,7 +215,7 @@ class FlatCAMObj(QtCore.QObject):
|
||||
|
||||
self.app.ui.selected_scroll_area.setWidget(self.ui)
|
||||
# self.ui.setMinimumWidth(100)
|
||||
# self.ui.setMaximumWidth(self.app.ui.selected_tab.sizeHint().width())
|
||||
# self.ui.setMaximumWidth(self.app.ui.properties_tab.sizeHint().width())
|
||||
|
||||
self.muted_ui = False
|
||||
|
||||
|
@ -1013,7 +1013,7 @@ class ObjectCollection(QtCore.QAbstractItemModel):
|
||||
def on_row_activated(self, index):
|
||||
if index.isValid():
|
||||
if index.internalPointer().parent_item != self.root_item:
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
self.on_item_activated(index)
|
||||
|
||||
def on_row_selected(self, obj_name):
|
||||
|
@ -1960,8 +1960,8 @@ class ToolDrilling(AppTool, Excellon):
|
||||
with self.app.proc_container.new(_("Generating CNC Code")):
|
||||
a_obj.app_obj.new_object("cncjob", job_name, job_init)
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
|
||||
# Create promise for the new name.
|
||||
self.app.collection.promise(job_name)
|
||||
|
@ -1619,8 +1619,8 @@ class ToolIsolation(AppTool, Gerber):
|
||||
if prog_plot == 'progressive':
|
||||
self.temp_shapes.clear(update=True)
|
||||
|
||||
# Switch notebook to Selected page
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
|
||||
def combined_rest(self, iso_obj, iso2geo, tools_storage, lim_area, negative_dia=None, plot=True):
|
||||
"""
|
||||
@ -3052,9 +3052,7 @@ class IsoUI:
|
||||
# ### Tool Diameter ####
|
||||
self.new_tooldia_lbl = FCLabel('%s:' % _('Tool Dia'))
|
||||
self.new_tooldia_lbl.setToolTip(
|
||||
_("Diameter for the new tool to add in the Tool Table.\n"
|
||||
"If the tool is V-shape type then this value is automatically\n"
|
||||
"calculated from the other parameters.")
|
||||
_("Diameter for the new tool")
|
||||
)
|
||||
self.grid3.addWidget(self.new_tooldia_lbl, 2, 0)
|
||||
|
||||
|
@ -2501,8 +2501,8 @@ class NonCopperClear(AppTool, Gerber):
|
||||
else:
|
||||
a_obj.proc_container.view.set_idle()
|
||||
|
||||
# focus on Selected Tab
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
# focus on Properties Tab
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
|
||||
if run_threaded:
|
||||
# Promise object with the new name
|
||||
@ -3487,8 +3487,8 @@ class NonCopperClear(AppTool, Gerber):
|
||||
else:
|
||||
app_obj.proc_container.view.set_idle()
|
||||
|
||||
# focus on Selected Tab
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
# focus on Properties Tab
|
||||
self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
|
||||
if run_threaded:
|
||||
# Promise object with the new name
|
||||
|
@ -2175,8 +2175,8 @@ class ToolPaint(AppTool, Gerber):
|
||||
self.app.inform.emit('[ERROR] %s' % _("Paint failed."))
|
||||
return
|
||||
|
||||
# focus on Selected Tab
|
||||
# self.app.ui.notebook.setCurrentWidget(self.app.ui.selected_tab)
|
||||
# focus on Properties Tab
|
||||
# self.app.ui.notebook.setCurrentWidget(self.app.ui.properties_tab)
|
||||
|
||||
self.app.inform.emit('[success] %s' % _("Paint Done."))
|
||||
|
||||
|
75
app_Main.py
75
app_Main.py
@ -2444,8 +2444,8 @@ class App(QtCore.QObject):
|
||||
|
||||
# edited_obj.set_ui(edited_obj.ui_type(decimals=self.decimals))
|
||||
# edited_obj.build_ui()
|
||||
# Switch notebook to Selected page
|
||||
# self.ui.notebook.setCurrentWidget(self.ui.selected_tab)
|
||||
# Switch notebook to Properties page
|
||||
# self.ui.notebook.setCurrentWidget(self.ui.properties_tab)
|
||||
else:
|
||||
# show the Tools Toolbar
|
||||
tools_tb = self.ui.toolbartools
|
||||
@ -4473,8 +4473,8 @@ class App(QtCore.QObject):
|
||||
|
||||
notebook_widget_name = self.ui.notebook.currentWidget().objectName()
|
||||
|
||||
# work only if the notebook tab on focus is the Selected_Tab and only if the object is Geometry
|
||||
if notebook_widget_name == 'selected_tab':
|
||||
# work only if the notebook tab on focus is the properties_tab and only if the object is Geometry
|
||||
if notebook_widget_name == 'properties_tab':
|
||||
if self.collection.get_active().kind == 'geometry':
|
||||
# Tool add works for Geometry only if Advanced is True in Preferences
|
||||
if self.defaults["global_app_level"] == 'a':
|
||||
@ -4526,8 +4526,8 @@ class App(QtCore.QObject):
|
||||
def on_delete_keypress(self):
|
||||
notebook_widget_name = self.ui.notebook.currentWidget().objectName()
|
||||
|
||||
# work only if the notebook tab on focus is the Selected_Tab and only if the object is Geometry
|
||||
if notebook_widget_name == 'selected_tab':
|
||||
# work only if the notebook tab on focus is the properties_tab and only if the object is Geometry
|
||||
if notebook_widget_name == 'properties_tab':
|
||||
if str(type(self.collection.get_active())) == "<class 'FlatCAMObj.GeometryObject'>":
|
||||
self.collection.get_active().on_tool_delete()
|
||||
|
||||
@ -6209,7 +6209,7 @@ class App(QtCore.QObject):
|
||||
if name == 'project':
|
||||
self.ui.notebook.setCurrentWidget(self.ui.project_tab)
|
||||
elif name == 'selected':
|
||||
self.ui.notebook.setCurrentWidget(self.ui.selected_tab)
|
||||
self.ui.notebook.setCurrentWidget(self.ui.properties_tab)
|
||||
elif name == 'tool':
|
||||
self.ui.notebook.setCurrentWidget(self.ui.tool_tab)
|
||||
|
||||
@ -6459,7 +6459,7 @@ class App(QtCore.QObject):
|
||||
if self.doubleclick is True:
|
||||
self.doubleclick = False
|
||||
if self.collection.get_selected():
|
||||
self.ui.notebook.setCurrentWidget(self.ui.selected_tab)
|
||||
self.ui.notebook.setCurrentWidget(self.ui.properties_tab)
|
||||
if self.ui.splitter.sizes()[0] == 0:
|
||||
self.ui.splitter.setSizes([1, 1])
|
||||
try:
|
||||
@ -9686,8 +9686,7 @@ class App(QtCore.QObject):
|
||||
# label = QtWidgets.QLabel("Choose an item from Project")
|
||||
# label.setAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignVCenter)
|
||||
|
||||
sel_title = QtWidgets.QTextEdit(
|
||||
_('<b>Shortcut Key List</b>'))
|
||||
sel_title = QtWidgets.QTextEdit(_('<b>Shortcut Key List</b>'))
|
||||
sel_title.setTextInteractionFlags(QtCore.Qt.NoTextInteraction)
|
||||
sel_title.setFrameStyle(QtWidgets.QFrame.NoFrame)
|
||||
|
||||
@ -9699,50 +9698,6 @@ class App(QtCore.QObject):
|
||||
|
||||
tsize = fsize + int(fsize / 2)
|
||||
|
||||
# selected_text = (_('''
|
||||
# <p><span style="font-size:{tsize}px"><strong>Selected Tab - Choose an Item from Project Tab</strong></span>
|
||||
# </p>
|
||||
#
|
||||
# <p><span style="font-size:{fsize}px"><strong>Details</strong>:<br />
|
||||
# The normal flow when working in FlatCAM is the following:</span></p>
|
||||
#
|
||||
# <ol>
|
||||
# <li><span style="font-size:{fsize}px">Loat/Import a Gerber, Excellon, Gcode, DXF, Raster Image or SVG
|
||||
# file into
|
||||
# FlatCAM using either the menu's, toolbars, key shortcuts or
|
||||
# even dragging and dropping the files on the appGUI.<br />
|
||||
# <br />
|
||||
# You can also load a <strong>FlatCAM project</strong> by double clicking on the project file, drag &
|
||||
# drop of the
|
||||
# file into the FLATCAM appGUI or through the menu/toolbar links offered within the app.</span><br />
|
||||
# </li>
|
||||
# <li><span style="font-size:{fsize}px">Once an object is available in the Project Tab, by selecting it
|
||||
# and then
|
||||
# focusing on <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's kind: Gerber, Excellon, Geometry or CNCJob object.<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 />
|
||||
# <br />
|
||||
# You can change the parameters in this screen and the flow direction is like this:<br />
|
||||
# <br />
|
||||
# <strong>Gerber/Excellon Object</strong> -> Change Param -> Generate Geometry ->
|
||||
# <strong> Geometry Object
|
||||
# </strong>-> Add tools (change param in Selected Tab) -> Generate CNCJob -><strong> CNCJob Object
|
||||
# </strong>-> Verify GCode (through Edit CNC Code) and/or append/prepend to GCode (again, done in
|
||||
# <strong>SELECTED TAB) </strong>-> Save GCode</span></li>
|
||||
# </ol>
|
||||
#
|
||||
# <p><span style="font-size:{fsize}px">A list of key shortcuts is available through an menu entry in
|
||||
# <strong>Help -> Shortcuts List</strong> or through it's own key shortcut:
|
||||
# <strong>F3</strong>.</span></p>
|
||||
#
|
||||
# ''').format(fsize=fsize, tsize=tsize))
|
||||
|
||||
selected_text = '''
|
||||
<p><span style="font-size:{tsize}px"><strong>{title}</strong></span></p>
|
||||
|
||||
@ -9767,7 +9722,7 @@ class App(QtCore.QObject):
|
||||
|
||||
<p><span style="font-size:{fsize}px">{s8}</span></p>
|
||||
'''.format(
|
||||
title=_("Selected Tab - Choose an Item from Project Tab"),
|
||||
title=_("Properties Tab - Choose an Item from Project Tab"),
|
||||
subtitle=_("Details"),
|
||||
|
||||
s1=_("The normal flow when working with the application is the following:"),
|
||||
@ -9778,13 +9733,13 @@ class App(QtCore.QObject):
|
||||
"drag and drop of the file into the GUI or through the menu (or toolbar) "
|
||||
"actions offered within the app."),
|
||||
s4=_("Once an object is available in the Project Tab, by selecting it and then focusing "
|
||||
"on 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 its kind: "
|
||||
"on Properties TAB (more simpler is to double click the object name in the Project Tab, "
|
||||
"Properties TAB will be updated with the object properties according to its kind: "
|
||||
"Gerber, Excellon, Geometry or CNCJob object."),
|
||||
s5=_("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."),
|
||||
"and the Properties TAB is in focus, again the object properties will be displayed into the "
|
||||
"Properties Tab. Alternatively, double clicking on the object on the canvas will bring "
|
||||
"the Properties TAB and populate it even if it was out of focus."),
|
||||
s6=_("You can change the parameters in this screen and the flow direction is like this:"),
|
||||
s7=_("Gerber/Excellon Object --> Change Parameter --> Generate Geometry --> Geometry Object --> "
|
||||
"Add tools (change param in Selected Tab) --> Generate CNCJob --> CNCJob Object --> "
|
||||
|
Loading…
Reference in New Issue
Block a user