- all tuple entries in the Preferences UI are now protected against letter entry
- all entries in the Preferences UI that have numerical entry are protected now against letters - cleaned the Preferences UI in the Gerber area
This commit is contained in:
@@ -63,85 +63,6 @@ class GerberAdvOptPrefGroupUI(OptionsGroupUI):
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
grid0.addWidget(separator_line, 2, 0, 1, 2)
|
||||
|
||||
# Tool Type
|
||||
self.tool_type_label = QtWidgets.QLabel('<b>%s</b>' % _('Tool Type'))
|
||||
self.tool_type_label.setToolTip(
|
||||
_("Choose which tool to use for Gerber isolation:\n"
|
||||
"'Circular' or 'V-shape'.\n"
|
||||
"When the 'V-shape' is selected then the tool\n"
|
||||
"diameter will depend on the chosen cut depth.")
|
||||
)
|
||||
self.tool_type_radio = RadioSet([{'label': 'Circular', 'value': 'circular'},
|
||||
{'label': 'V-Shape', 'value': 'v'}])
|
||||
|
||||
grid0.addWidget(self.tool_type_label, 3, 0)
|
||||
grid0.addWidget(self.tool_type_radio, 3, 1, 1, 2)
|
||||
|
||||
# Tip Dia
|
||||
self.tipdialabel = QtWidgets.QLabel('%s:' % _('V-Tip Dia'))
|
||||
self.tipdialabel.setToolTip(
|
||||
_("The tip diameter for V-Shape Tool")
|
||||
)
|
||||
self.tipdia_spinner = FCDoubleSpinner()
|
||||
self.tipdia_spinner.set_precision(self.decimals)
|
||||
self.tipdia_spinner.set_range(-99.9999, 99.9999)
|
||||
self.tipdia_spinner.setSingleStep(0.1)
|
||||
self.tipdia_spinner.setWrapping(True)
|
||||
grid0.addWidget(self.tipdialabel, 4, 0)
|
||||
grid0.addWidget(self.tipdia_spinner, 4, 1, 1, 2)
|
||||
|
||||
# Tip Angle
|
||||
self.tipanglelabel = QtWidgets.QLabel('%s:' % _('V-Tip Angle'))
|
||||
self.tipanglelabel.setToolTip(
|
||||
_("The tip angle for V-Shape Tool.\n"
|
||||
"In degree.")
|
||||
)
|
||||
self.tipangle_spinner = FCSpinner()
|
||||
self.tipangle_spinner.set_range(1, 180)
|
||||
self.tipangle_spinner.set_step(5)
|
||||
self.tipangle_spinner.setWrapping(True)
|
||||
grid0.addWidget(self.tipanglelabel, 5, 0)
|
||||
grid0.addWidget(self.tipangle_spinner, 5, 1, 1, 2)
|
||||
|
||||
# Cut Z
|
||||
self.cutzlabel = QtWidgets.QLabel('%s:' % _('Cut Z'))
|
||||
self.cutzlabel.setToolTip(
|
||||
_("Cutting depth (negative)\n"
|
||||
"below the copper surface.")
|
||||
)
|
||||
self.cutz_spinner = FCDoubleSpinner()
|
||||
self.cutz_spinner.set_precision(self.decimals)
|
||||
self.cutz_spinner.set_range(-99.9999, 0.0000)
|
||||
self.cutz_spinner.setSingleStep(0.1)
|
||||
self.cutz_spinner.setWrapping(True)
|
||||
|
||||
grid0.addWidget(self.cutzlabel, 6, 0)
|
||||
grid0.addWidget(self.cutz_spinner, 6, 1, 1, 2)
|
||||
|
||||
# Isolation Type
|
||||
self.iso_type_label = QtWidgets.QLabel('%s:' % _('Isolation Type'))
|
||||
self.iso_type_label.setToolTip(
|
||||
_("Choose how the isolation will be executed:\n"
|
||||
"- 'Full' -> complete isolation of polygons\n"
|
||||
"- 'Ext' -> will isolate only on the outside\n"
|
||||
"- 'Int' -> will isolate only on the inside\n"
|
||||
"'Exterior' isolation is almost always possible\n"
|
||||
"(with the right tool) but 'Interior'\n"
|
||||
"isolation can be done only when there is an opening\n"
|
||||
"inside of the polygon (e.g polygon is a 'doughnut' shape).")
|
||||
)
|
||||
self.iso_type_radio = RadioSet([{'label': _('Full'), 'value': 'full'},
|
||||
{'label': _('Exterior'), 'value': 'ext'},
|
||||
{'label': _('Interior'), 'value': 'int'}])
|
||||
|
||||
grid0.addWidget(self.iso_type_label, 7, 0,)
|
||||
grid0.addWidget(self.iso_type_radio, 7, 1, 1, 2)
|
||||
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
grid0.addWidget(separator_line, 8, 0, 1, 2)
|
||||
|
||||
# Buffering Type
|
||||
buffering_label = QtWidgets.QLabel('%s:' % _('Buffering'))
|
||||
buffering_label.setToolTip(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt5.QtCore import QSettings
|
||||
|
||||
from AppGUI.GUIElements import FCSpinner, FCDoubleSpinner, FCComboBox, FCEntry, RadioSet
|
||||
from AppGUI.GUIElements import FCSpinner, FCDoubleSpinner, FCComboBox, FCEntry, RadioSet, NumericalEvalTupleEntry
|
||||
from AppGUI.preferences.OptionsGroupUI import OptionsGroupUI
|
||||
|
||||
import gettext
|
||||
@@ -109,8 +109,9 @@ class GerberEditorPrefGroupUI(OptionsGroupUI):
|
||||
"The value of the diameter has to use the dot decimals separator.\n"
|
||||
"Valid values: 0.3, 1.0")
|
||||
)
|
||||
self.adddim_entry = NumericalEvalTupleEntry(border_color='#0069A9')
|
||||
|
||||
grid0.addWidget(self.adddim_label, 5, 0)
|
||||
self.adddim_entry = FCEntry()
|
||||
grid0.addWidget(self.adddim_entry, 5, 1)
|
||||
|
||||
self.grb_array_linear_label = QtWidgets.QLabel('<b>%s:</b>' % _('Linear Pad Array'))
|
||||
|
||||
@@ -28,96 +28,6 @@ class GerberOptPrefGroupUI(OptionsGroupUI):
|
||||
|
||||
self.setTitle(str(_("Gerber Options")))
|
||||
|
||||
# ## Isolation Routing
|
||||
self.isolation_routing_label = QtWidgets.QLabel("<b>%s:</b>" % _("Isolation Routing"))
|
||||
self.isolation_routing_label.setToolTip(
|
||||
_("Create a Geometry object with\n"
|
||||
"toolpaths to cut outside polygons.")
|
||||
)
|
||||
self.layout.addWidget(self.isolation_routing_label)
|
||||
|
||||
# Cutting Tool Diameter
|
||||
grid0 = QtWidgets.QGridLayout()
|
||||
self.layout.addLayout(grid0)
|
||||
|
||||
tdlabel = QtWidgets.QLabel('%s:' % _('Tool dia'))
|
||||
tdlabel.setToolTip(
|
||||
_("Diameter of the cutting tool.")
|
||||
)
|
||||
grid0.addWidget(tdlabel, 0, 0)
|
||||
self.iso_tool_dia_entry = FCDoubleSpinner()
|
||||
self.iso_tool_dia_entry.set_precision(self.decimals)
|
||||
self.iso_tool_dia_entry.setSingleStep(0.1)
|
||||
self.iso_tool_dia_entry.set_range(-9999, 9999)
|
||||
|
||||
grid0.addWidget(self.iso_tool_dia_entry, 0, 1)
|
||||
|
||||
# Nr of passes
|
||||
passlabel = QtWidgets.QLabel('%s:' % _('# Passes'))
|
||||
passlabel.setToolTip(
|
||||
_("Width of the isolation gap in\n"
|
||||
"number (integer) of tool widths.")
|
||||
)
|
||||
self.iso_width_entry = FCSpinner()
|
||||
self.iso_width_entry.set_range(1, 999)
|
||||
|
||||
grid0.addWidget(passlabel, 1, 0)
|
||||
grid0.addWidget(self.iso_width_entry, 1, 1)
|
||||
|
||||
# Pass overlap
|
||||
overlabel = QtWidgets.QLabel('%s:' % _('Pass overlap'))
|
||||
overlabel.setToolTip(
|
||||
_("How much (percentage) of the tool width to overlap each tool pass.")
|
||||
)
|
||||
self.iso_overlap_entry = FCDoubleSpinner(suffix='%')
|
||||
self.iso_overlap_entry.set_precision(self.decimals)
|
||||
self.iso_overlap_entry.setWrapping(True)
|
||||
self.iso_overlap_entry.setRange(0.0000, 99.9999)
|
||||
self.iso_overlap_entry.setSingleStep(0.1)
|
||||
|
||||
grid0.addWidget(overlabel, 2, 0)
|
||||
grid0.addWidget(self.iso_overlap_entry, 2, 1)
|
||||
|
||||
# Isolation Scope
|
||||
self.select_label = QtWidgets.QLabel('%s:' % _('Selection'))
|
||||
self.select_label.setToolTip(
|
||||
_("Isolation scope. Choose what to isolate:\n"
|
||||
"- 'All' -> Isolate all the polygons in the object\n"
|
||||
"- 'Selection' -> Isolate a selection of polygons.\n"
|
||||
"- 'Reference Object' - will process the area specified by another object.")
|
||||
)
|
||||
self.select_combo = FCComboBox()
|
||||
self.select_combo.addItems(
|
||||
[_("All"), _("Area Selection"), _("Reference Object")]
|
||||
)
|
||||
|
||||
grid0.addWidget(self.select_label, 3, 0)
|
||||
grid0.addWidget(self.select_combo, 3, 1, 1, 2)
|
||||
|
||||
# Milling Type
|
||||
milling_type_label = QtWidgets.QLabel('%s:' % _('Milling Type'))
|
||||
milling_type_label.setToolTip(
|
||||
_("Milling type:\n"
|
||||
"- climb / best for precision milling and to reduce tool usage\n"
|
||||
"- conventional / useful when there is no backlash compensation")
|
||||
)
|
||||
grid0.addWidget(milling_type_label, 4, 0)
|
||||
self.milling_type_radio = RadioSet([{'label': _('Climb'), 'value': 'cl'},
|
||||
{'label': _('Conventional'), 'value': 'cv'}])
|
||||
grid0.addWidget(self.milling_type_radio, 4, 1)
|
||||
|
||||
# Combine passes
|
||||
self.combine_passes_cb = FCCheckBox(label=_('Combine Passes'))
|
||||
self.combine_passes_cb.setToolTip(
|
||||
_("Combine all passes into one object")
|
||||
)
|
||||
grid0.addWidget(self.combine_passes_cb, 5, 0, 1, 2)
|
||||
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
grid0.addWidget(separator_line, 6, 0, 1, 2)
|
||||
|
||||
# ## Clear non-copper regions
|
||||
self.clearcopper_label = QtWidgets.QLabel("<b>%s:</b>" % _("Non-copper regions"))
|
||||
self.clearcopper_label.setToolTip(
|
||||
|
||||
@@ -44,6 +44,7 @@ class GerberPreferencesUI(QtWidgets.QWidget):
|
||||
self.vlay = QtWidgets.QVBoxLayout()
|
||||
self.vlay.addWidget(self.gerber_opt_group)
|
||||
self.vlay.addWidget(self.gerber_exp_group)
|
||||
self.vlay.addStretch()
|
||||
|
||||
self.layout.addWidget(self.gerber_gen_group)
|
||||
self.layout.addLayout(self.vlay)
|
||||
|
||||
Reference in New Issue
Block a user