- moved all Excellon Advanced Prefeences to Drilling Tool Preferences

- updated Drilling Tool to use the new settings
- updated the Excellon Editor: the default_data dict is populated now on Editor entry
- Excellon Editor: added a new functionality: conversion of slots to drills
- Excellon UI: added a new feature that is grouped in Advanced Settings: a toggle tools table visibility checkbox
This commit is contained in:
Marius Stanciu
2020-07-11 01:42:44 +03:00
parent f53ffe54d9
commit 13bcc036df
10 changed files with 1177 additions and 1066 deletions

View File

@@ -255,9 +255,7 @@ class GerberObjectUI(ObjectUI):
# Aperture Table Visibility CB
self.aperture_table_visibility_cb = FCCheckBox()
self.aperture_table_visibility_cb.setToolTip(
_("Toggle the display of the Gerber Apertures Table.\n"
"When unchecked, it will delete all mark shapes\n"
"that are drawn on canvas.")
_("Toggle the display of the Tools Table.")
)
# self.aperture_table_visibility_cb.setLayoutDirection(QtCore.Qt.RightToLeft)
hlay_plot.addWidget(self.aperture_table_visibility_cb)
@@ -507,7 +505,7 @@ class ExcellonObjectUI(ObjectUI):
grid_h.setColumnStretch(1, 1)
self.plot_options_label = QtWidgets.QLabel("<b>%s:</b>" % _("Plot Options"))
self.plot_options_label.setMinimumWidth(90)
# self.plot_options_label.setMinimumWidth(90)
grid_h.addWidget(self.plot_options_label, 0, 0)
@@ -516,7 +514,7 @@ class ExcellonObjectUI(ObjectUI):
self.solid_cb.setToolTip(
_("Solid circles.")
)
self.solid_cb.setMinimumWidth(50)
# self.solid_cb.setMinimumWidth(50)
grid_h.addWidget(self.solid_cb, 0, 1)
# Multicolored CB
@@ -524,12 +522,11 @@ class ExcellonObjectUI(ObjectUI):
self.multicolored_cb.setToolTip(
_("Draw polygons in different colors.")
)
self.multicolored_cb.setMinimumWidth(55)
# self.multicolored_cb.setMinimumWidth(55)
grid_h.addWidget(self.multicolored_cb, 0, 2)
# ## Object name
self.name_hlay = QtWidgets.QHBoxLayout()
grid_h.addLayout(self.name_hlay, 1, 0, 1, 3)
name_label = QtWidgets.QLabel("<b>%s:</b>" % _("Name"))
self.name_entry = FCEntry()
@@ -537,6 +534,35 @@ 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)
# ### Tools Drills ####
self.tools_table_label = QtWidgets.QLabel('<b>%s</b>' % _('Tools Table'))
self.tools_table_label.setToolTip(
_("Tools in this Excellon object\n"
"when are used for drilling.")
)
# Table Visibility CB
self.table_visibility_cb = FCCheckBox()
self.table_visibility_cb.setToolTip(
_("Toggle the display of the Tools Table.")
)
# Plot CB
hlay_plot = QtWidgets.QHBoxLayout()
self.plot_cb = FCCheckBox(_('Plot'))
self.plot_cb.setToolTip(
_("Plot (show) this object.")
)
self.plot_cb.setLayoutDirection(QtCore.Qt.RightToLeft)
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)
# 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()
@@ -546,26 +572,6 @@ class ExcellonObjectUI(ObjectUI):
self.tools_box.setContentsMargins(0, 0, 0, 0)
self.drills_frame.setLayout(self.tools_box)
hlay_plot = QtWidgets.QHBoxLayout()
self.tools_box.addLayout(hlay_plot)
# ### Tools Drills ####
self.tools_table_label = QtWidgets.QLabel('<b>%s:</b>' % _('Tools Table'))
self.tools_table_label.setToolTip(
_("Tools in this Excellon object\n"
"when are used for drilling.")
)
hlay_plot.addWidget(self.tools_table_label)
# Plot CB
self.plot_cb = FCCheckBox(_('Plot'))
self.plot_cb.setToolTip(
_("Plot (show) this object.")
)
self.plot_cb.setLayoutDirection(QtCore.Qt.RightToLeft)
hlay_plot.addStretch()
hlay_plot.addWidget(self.plot_cb)
self.tools_table = FCTable()
self.tools_table.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
self.tools_table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)