- clicking the splash screen will close it; also if an error is triggered, the error message will pop over the splash screen
- the Aperture Table in the Gerber Editor is no longer extended to show all apertures at once - in Preferences: Excellon, Geometry and CNCJob tabs, updated the UI to the new design
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
from appGUI.GUIElements import FCCheckBox, FCLabel, FCGridLayout
|
||||
from appGUI.GUIElements import FCCheckBox, FCLabel, FCGridLayout, FCFrame
|
||||
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
|
||||
import gettext
|
||||
import appTranslation as fcTranslate
|
||||
@@ -21,11 +21,10 @@ class ExcellonAdvOptPrefGroupUI(OptionsGroupUI):
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# #######################
|
||||
# ## ADVANCED OPTIONS ###
|
||||
# #######################
|
||||
|
||||
self.exc_label = FCLabel('<b>%s:</b>' % _('Advanced Options'))
|
||||
# #############################################################################################################
|
||||
# PARAMETERS Frame
|
||||
# #############################################################################################################
|
||||
self.exc_label = FCLabel('<span style="color:indigo;"><b>%s</b></span>' % _('Advanced Options'))
|
||||
self.exc_label.setToolTip(
|
||||
_("A list of advanced parameters.\n"
|
||||
"Those parameters are available only for\n"
|
||||
@@ -33,15 +32,18 @@ class ExcellonAdvOptPrefGroupUI(OptionsGroupUI):
|
||||
)
|
||||
self.layout.addWidget(self.exc_label)
|
||||
|
||||
grid0 = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
self.layout.addLayout(grid0)
|
||||
param_frame = FCFrame()
|
||||
self.layout.addWidget(param_frame)
|
||||
|
||||
param_grid = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
param_frame.setLayout(param_grid)
|
||||
|
||||
# Table Visibility CB
|
||||
self.table_visibility_cb = FCCheckBox(label=_('Table Show/Hide'))
|
||||
self.table_visibility_cb.setToolTip(
|
||||
_("Toggle the display of the Tools Table.")
|
||||
)
|
||||
grid0.addWidget(self.table_visibility_cb, 0, 0, 1, 2)
|
||||
param_grid.addWidget(self.table_visibility_cb, 0, 0, 1, 2)
|
||||
|
||||
# Auto Load Tools from DB
|
||||
self.autoload_db_cb = FCCheckBox('%s' % _("Auto load from DB"))
|
||||
@@ -49,6 +51,6 @@ class ExcellonAdvOptPrefGroupUI(OptionsGroupUI):
|
||||
_("Automatic replacement of the tools from related application tools\n"
|
||||
"with tools from DB that have a close diameter value.")
|
||||
)
|
||||
grid0.addWidget(self.autoload_db_cb, 1, 0, 1, 2)
|
||||
param_grid.addWidget(self.autoload_db_cb, 2, 0, 1, 2)
|
||||
|
||||
self.layout.addStretch()
|
||||
# self.layout.addStretch()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
from appGUI.GUIElements import FCSpinner, FCDoubleSpinner, RadioSet, FCLabel, FCGridLayout
|
||||
from appGUI.GUIElements import FCSpinner, FCDoubleSpinner, RadioSet, FCLabel, FCGridLayout, FCFrame
|
||||
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
|
||||
|
||||
import gettext
|
||||
@@ -20,15 +20,20 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# Excellon Editor Parameters
|
||||
self.param_label = FCLabel("<b>%s:</b>" % _("Parameters"))
|
||||
# #############################################################################################################
|
||||
# PARAMETERS Frame
|
||||
# #############################################################################################################
|
||||
self.param_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Parameters"))
|
||||
self.param_label.setToolTip(
|
||||
_("A list of Excellon Editor parameters.")
|
||||
)
|
||||
self.layout.addWidget(self.param_label)
|
||||
|
||||
grid0 = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
self.layout.addLayout(grid0)
|
||||
param_frame = FCFrame()
|
||||
self.layout.addWidget(param_frame)
|
||||
|
||||
param_grid = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
param_frame.setLayout(param_grid)
|
||||
|
||||
# Selection Limit
|
||||
self.sel_limit_label = FCLabel('%s:' % _("Selection limit"))
|
||||
@@ -42,8 +47,8 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
|
||||
self.sel_limit_entry = FCSpinner()
|
||||
self.sel_limit_entry.set_range(0, 99999)
|
||||
|
||||
grid0.addWidget(self.sel_limit_label, 0, 0)
|
||||
grid0.addWidget(self.sel_limit_entry, 0, 1)
|
||||
param_grid.addWidget(self.sel_limit_label, 0, 0)
|
||||
param_grid.addWidget(self.sel_limit_entry, 0, 1)
|
||||
|
||||
# New Diameter
|
||||
self.addtool_entry_lbl = FCLabel('%s:' % _('New Dia'))
|
||||
@@ -55,8 +60,8 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
|
||||
self.addtool_entry.set_range(0.000001, 99.9999)
|
||||
self.addtool_entry.set_precision(self.decimals)
|
||||
|
||||
grid0.addWidget(self.addtool_entry_lbl, 1, 0)
|
||||
grid0.addWidget(self.addtool_entry, 1, 1)
|
||||
param_grid.addWidget(self.addtool_entry_lbl, 2, 0)
|
||||
param_grid.addWidget(self.addtool_entry, 2, 1)
|
||||
|
||||
# Number of drill holes in a drill array
|
||||
self.drill_array_size_label = FCLabel('%s:' % _('Nr of drills'))
|
||||
@@ -68,11 +73,20 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
|
||||
self.drill_array_size_entry = FCSpinner()
|
||||
self.drill_array_size_entry.set_range(0, 9999)
|
||||
|
||||
grid0.addWidget(self.drill_array_size_label, 2, 0)
|
||||
grid0.addWidget(self.drill_array_size_entry, 2, 1)
|
||||
param_grid.addWidget(self.drill_array_size_label, 4, 0)
|
||||
param_grid.addWidget(self.drill_array_size_entry, 4, 1)
|
||||
|
||||
self.drill_array_linear_label = FCLabel('<b>%s:</b>' % _('Linear Drill Array'))
|
||||
grid0.addWidget(self.drill_array_linear_label, 3, 0, 1, 2)
|
||||
# #############################################################################################################
|
||||
# Linear Array Frame
|
||||
# #############################################################################################################
|
||||
self.drill_array_linear_label = FCLabel('<span style="color:brown;"><b>%s</b></span>' % _('Linear Drill Array'))
|
||||
self.layout.addWidget(self.drill_array_linear_label)
|
||||
|
||||
lin_frame = FCFrame()
|
||||
self.layout.addWidget(lin_frame)
|
||||
|
||||
lin_grid = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
lin_frame.setLayout(lin_grid)
|
||||
|
||||
# Linear Drill Array direction
|
||||
self.drill_axis_label = FCLabel('%s:' % _('Linear Direction'))
|
||||
@@ -85,10 +99,10 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
|
||||
# self.drill_axis_label.setMinimumWidth(100)
|
||||
self.drill_axis_radio = RadioSet([{'label': _('X'), 'value': 'X'},
|
||||
{'label': _('Y'), 'value': 'Y'},
|
||||
{'label': _('Angle'), 'value': 'A'}])
|
||||
{'label': _('Angle'), 'value': 'A'}], compact=True)
|
||||
|
||||
grid0.addWidget(self.drill_axis_label, 4, 0)
|
||||
grid0.addWidget(self.drill_axis_radio, 4, 1)
|
||||
lin_grid.addWidget(self.drill_axis_label, 0, 0)
|
||||
lin_grid.addWidget(self.drill_axis_radio, 0, 1)
|
||||
|
||||
# Linear Drill Array pitch distance
|
||||
self.drill_pitch_label = FCLabel('%s:' % _('Pitch'))
|
||||
@@ -100,8 +114,8 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
|
||||
self.drill_pitch_entry.set_range(0, 910000.0000)
|
||||
self.drill_pitch_entry.set_precision(self.decimals)
|
||||
|
||||
grid0.addWidget(self.drill_pitch_label, 5, 0)
|
||||
grid0.addWidget(self.drill_pitch_entry, 5, 1)
|
||||
lin_grid.addWidget(self.drill_pitch_label, 2, 0)
|
||||
lin_grid.addWidget(self.drill_pitch_entry, 2, 1)
|
||||
|
||||
# Linear Drill Array custom angle
|
||||
self.drill_angle_label = FCLabel('%s:' % _('Angle'))
|
||||
@@ -114,11 +128,20 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
|
||||
self.drill_angle_entry.setWrapping(True)
|
||||
self.drill_angle_entry.setSingleStep(5)
|
||||
|
||||
grid0.addWidget(self.drill_angle_label, 6, 0)
|
||||
grid0.addWidget(self.drill_angle_entry, 6, 1)
|
||||
lin_grid.addWidget(self.drill_angle_label, 4, 0)
|
||||
lin_grid.addWidget(self.drill_angle_entry, 4, 1)
|
||||
|
||||
self.drill_array_circ_label = FCLabel('<b>%s:</b>' % _('Circular Drill Array'))
|
||||
grid0.addWidget(self.drill_array_circ_label, 7, 0, 1, 2)
|
||||
# #############################################################################################################
|
||||
# Circular Array Frame
|
||||
# #############################################################################################################
|
||||
self.drill_array_circ_label = FCLabel('<span style="color:green;"><b>%s</b></span>' % _('Circular Drill Array'))
|
||||
self.layout.addWidget(self.drill_array_circ_label)
|
||||
|
||||
circ_frame = FCFrame()
|
||||
self.layout.addWidget(circ_frame)
|
||||
|
||||
circ_grid = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
circ_frame.setLayout(circ_grid)
|
||||
|
||||
# Circular Drill Array direction
|
||||
self.drill_circular_direction_label = FCLabel('%s:' % _('Circular Direction'))
|
||||
@@ -128,10 +151,10 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
|
||||
)
|
||||
|
||||
self.drill_circular_dir_radio = RadioSet([{'label': _('CW'), 'value': 'CW'},
|
||||
{'label': _('CCW'), 'value': 'CCW'}])
|
||||
{'label': _('CCW'), 'value': 'CCW'}], compact=True)
|
||||
|
||||
grid0.addWidget(self.drill_circular_direction_label, 8, 0)
|
||||
grid0.addWidget(self.drill_circular_dir_radio, 8, 1)
|
||||
circ_grid.addWidget(self.drill_circular_direction_label, 0, 0)
|
||||
circ_grid.addWidget(self.drill_circular_dir_radio, 0, 1)
|
||||
|
||||
# Circular Drill Array Angle
|
||||
self.drill_circular_angle_label = FCLabel('%s:' % _('Circular Angle'))
|
||||
@@ -144,13 +167,20 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
|
||||
self.drill_circular_angle_entry.setWrapping(True)
|
||||
self.drill_circular_angle_entry.setSingleStep(5)
|
||||
|
||||
grid0.addWidget(self.drill_circular_angle_label, 9, 0)
|
||||
grid0.addWidget(self.drill_circular_angle_entry, 9, 1)
|
||||
circ_grid.addWidget(self.drill_circular_angle_label, 2, 0)
|
||||
circ_grid.addWidget(self.drill_circular_angle_entry, 2, 1)
|
||||
|
||||
# ##### SLOTS #####
|
||||
# #################
|
||||
self.drill_array_circ_label = FCLabel('<b>%s:</b>' % _('Slots'))
|
||||
grid0.addWidget(self.drill_array_circ_label, 10, 0, 1, 2)
|
||||
# #############################################################################################################
|
||||
# Slots Frame
|
||||
# #############################################################################################################
|
||||
self.drill_array_circ_label = FCLabel('<span style="color:darkorange;"><b>%s</b></span>' % _('Slots'))
|
||||
self.layout.addWidget(self.drill_array_circ_label)
|
||||
|
||||
slots_frame = FCFrame()
|
||||
self.layout.addWidget(slots_frame)
|
||||
|
||||
slots_grid = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
slots_frame.setLayout(slots_grid)
|
||||
|
||||
# Slot length
|
||||
self.slot_length_label = FCLabel('%s:' % _('Length'))
|
||||
@@ -165,8 +195,8 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
|
||||
self.slot_length_entry.setWrapping(True)
|
||||
self.slot_length_entry.setSingleStep(1)
|
||||
|
||||
grid0.addWidget(self.slot_length_label, 11, 0)
|
||||
grid0.addWidget(self.slot_length_entry, 11, 1)
|
||||
slots_grid.addWidget(self.slot_length_label, 0, 0)
|
||||
slots_grid.addWidget(self.slot_length_entry, 0, 1)
|
||||
|
||||
# Slot direction
|
||||
self.slot_axis_label = FCLabel('%s:' % _('Direction'))
|
||||
@@ -180,9 +210,9 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
|
||||
|
||||
self.slot_axis_radio = RadioSet([{'label': _('X'), 'value': 'X'},
|
||||
{'label': _('Y'), 'value': 'Y'},
|
||||
{'label': _('Angle'), 'value': 'A'}])
|
||||
grid0.addWidget(self.slot_axis_label, 12, 0)
|
||||
grid0.addWidget(self.slot_axis_radio, 12, 1)
|
||||
{'label': _('Angle'), 'value': 'A'}], compact=True)
|
||||
slots_grid.addWidget(self.slot_axis_label, 2, 0)
|
||||
slots_grid.addWidget(self.slot_axis_radio, 2, 1)
|
||||
|
||||
# Slot custom angle
|
||||
self.slot_angle_label = FCLabel('%s:' % _('Angle'))
|
||||
@@ -200,14 +230,20 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
|
||||
self.slot_angle_spinner.setRange(-359.99, 360.00)
|
||||
self.slot_angle_spinner.setSingleStep(5)
|
||||
|
||||
grid0.addWidget(self.slot_angle_label, 13, 0)
|
||||
grid0.addWidget(self.slot_angle_spinner, 13, 1)
|
||||
slots_grid.addWidget(self.slot_angle_label, 4, 0)
|
||||
slots_grid.addWidget(self.slot_angle_spinner, 4, 1)
|
||||
|
||||
# #### SLOTS ARRAY #######
|
||||
# ########################
|
||||
# #############################################################################################################
|
||||
# Slots Array Frame
|
||||
# #############################################################################################################
|
||||
self.slot_array_linear_label = FCLabel('<span style="color:magenta;"><b>%s</b></span>' % _('Linear Slot Array'))
|
||||
self.layout.addWidget(self.slot_array_linear_label)
|
||||
|
||||
self.slot_array_linear_label = FCLabel('<b>%s:</b>' % _('Linear Slot Array'))
|
||||
grid0.addWidget(self.slot_array_linear_label, 14, 0, 1, 2)
|
||||
slot_array_frame = FCFrame()
|
||||
self.layout.addWidget(slot_array_frame)
|
||||
|
||||
slot_array_grid = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
slot_array_frame.setLayout(slot_array_grid)
|
||||
|
||||
# Number of slot holes in a drill array
|
||||
self.slot_array_size_label = FCLabel('%s:' % _('Nr of slots'))
|
||||
@@ -219,8 +255,8 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
|
||||
self.slot_array_size_entry = FCSpinner()
|
||||
self.slot_array_size_entry.set_range(0, 999999)
|
||||
|
||||
grid0.addWidget(self.slot_array_size_label, 15, 0)
|
||||
grid0.addWidget(self.slot_array_size_entry, 15, 1)
|
||||
slot_array_grid.addWidget(self.slot_array_size_label, 0, 0)
|
||||
slot_array_grid.addWidget(self.slot_array_size_entry, 0, 1)
|
||||
|
||||
# Linear Slot Array direction
|
||||
self.slot_array_axis_label = FCLabel('%s:' % _('Linear Direction'))
|
||||
@@ -233,10 +269,10 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
|
||||
# self.slot_axis_label.setMinimumWidth(100)
|
||||
self.slot_array_axis_radio = RadioSet([{'label': _('X'), 'value': 'X'},
|
||||
{'label': _('Y'), 'value': 'Y'},
|
||||
{'label': _('Angle'), 'value': 'A'}])
|
||||
{'label': _('Angle'), 'value': 'A'}], compact=True)
|
||||
|
||||
grid0.addWidget(self.slot_array_axis_label, 16, 0)
|
||||
grid0.addWidget(self.slot_array_axis_radio, 16, 1)
|
||||
slot_array_grid.addWidget(self.slot_array_axis_label, 2, 0)
|
||||
slot_array_grid.addWidget(self.slot_array_axis_radio, 2, 1)
|
||||
|
||||
# Linear Slot Array pitch distance
|
||||
self.slot_array_pitch_label = FCLabel('%s:' % _('Pitch'))
|
||||
@@ -250,8 +286,8 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
|
||||
self.slot_array_pitch_entry.setRange(0, 999999)
|
||||
self.slot_array_pitch_entry.setSingleStep(1)
|
||||
|
||||
grid0.addWidget(self.slot_array_pitch_label, 17, 0)
|
||||
grid0.addWidget(self.slot_array_pitch_entry, 17, 1)
|
||||
slot_array_grid.addWidget(self.slot_array_pitch_label, 4, 0)
|
||||
slot_array_grid.addWidget(self.slot_array_pitch_entry, 4, 1)
|
||||
|
||||
# Linear Slot Array custom angle
|
||||
self.slot_array_angle_label = FCLabel('%s:' % _('Angle'))
|
||||
@@ -264,11 +300,20 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
|
||||
self.slot_array_angle_entry.setRange(-360, 360)
|
||||
self.slot_array_angle_entry.setSingleStep(5)
|
||||
|
||||
grid0.addWidget(self.slot_array_angle_label, 18, 0)
|
||||
grid0.addWidget(self.slot_array_angle_entry, 18, 1)
|
||||
slot_array_grid.addWidget(self.slot_array_angle_label, 6, 0)
|
||||
slot_array_grid.addWidget(self.slot_array_angle_entry, 6, 1)
|
||||
|
||||
self.slot_array_circ_label = FCLabel('<b>%s:</b>' % _('Circular Slot Array'))
|
||||
grid0.addWidget(self.slot_array_circ_label, 19, 0, 1, 2)
|
||||
# #############################################################################################################
|
||||
# Circular Slot Array Frame
|
||||
# #############################################################################################################
|
||||
self.slot_array_circ_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _('Circular Slot Array'))
|
||||
self.layout.addWidget(self.slot_array_circ_label)
|
||||
|
||||
circ_slot_frame = FCFrame()
|
||||
self.layout.addWidget(circ_slot_frame)
|
||||
|
||||
circ_slot_grid = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
circ_slot_frame.setLayout(circ_slot_grid)
|
||||
|
||||
# Circular Slot Array direction
|
||||
self.slot_array_circular_direction_label = FCLabel('%s:' % _('Circular Direction'))
|
||||
@@ -278,10 +323,10 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
|
||||
)
|
||||
|
||||
self.slot_array_circular_dir_radio = RadioSet([{'label': _('CW'), 'value': 'CW'},
|
||||
{'label': _('CCW'), 'value': 'CCW'}])
|
||||
{'label': _('CCW'), 'value': 'CCW'}], compact=True)
|
||||
|
||||
grid0.addWidget(self.slot_array_circular_direction_label, 20, 0)
|
||||
grid0.addWidget(self.slot_array_circular_dir_radio, 20, 1)
|
||||
circ_slot_grid.addWidget(self.slot_array_circular_direction_label, 0, 0)
|
||||
circ_slot_grid.addWidget(self.slot_array_circular_dir_radio, 0, 1)
|
||||
|
||||
# Circular Slot Array Angle
|
||||
self.slot_array_circular_angle_label = FCLabel('%s:' % _('Circular Angle'))
|
||||
@@ -294,7 +339,10 @@ class ExcellonEditorPrefGroupUI(OptionsGroupUI):
|
||||
self.slot_array_circular_angle_entry.setRange(-360, 360)
|
||||
self.slot_array_circular_angle_entry.setSingleStep(5)
|
||||
|
||||
grid0.addWidget(self.slot_array_circular_angle_label, 21, 0)
|
||||
grid0.addWidget(self.slot_array_circular_angle_entry, 21, 1)
|
||||
circ_slot_grid.addWidget(self.slot_array_circular_angle_label, 2, 0)
|
||||
circ_slot_grid.addWidget(self.slot_array_circular_angle_entry, 2, 1)
|
||||
|
||||
FCGridLayout.set_common_column_size(
|
||||
[param_grid, lin_grid, circ_grid, slots_grid, slot_array_grid, circ_slot_grid], 0)
|
||||
|
||||
self.layout.addStretch()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from PyQt6 import QtWidgets, QtCore
|
||||
|
||||
from appGUI.GUIElements import RadioSet, FCSpinner, FCLabel, FCGridLayout
|
||||
from appGUI.GUIElements import RadioSet, FCSpinner, FCLabel, FCGridLayout, FCFrame
|
||||
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
|
||||
import gettext
|
||||
import appTranslation as fcTranslate
|
||||
@@ -20,16 +20,21 @@ class ExcellonExpPrefGroupUI(OptionsGroupUI):
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# Plot options
|
||||
self.export_options_label = FCLabel("<b>%s:</b>" % _("Export Options"))
|
||||
# #############################################################################################################
|
||||
# Export Frame
|
||||
# #############################################################################################################
|
||||
self.export_options_label = FCLabel('<span style="color:brown;"><b>%s</b></span>' % _("Export Options"))
|
||||
self.export_options_label.setToolTip(
|
||||
_("The parameters set here are used in the file exported\n"
|
||||
"when using the File -> Export -> Export Excellon menu entry.")
|
||||
)
|
||||
self.layout.addWidget(self.export_options_label)
|
||||
|
||||
grid0 = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
self.layout.addLayout(grid0)
|
||||
exp_frame = FCFrame()
|
||||
self.layout.addWidget(exp_frame)
|
||||
|
||||
exp_grid = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
exp_frame.setLayout(exp_grid)
|
||||
|
||||
# Excellon Units
|
||||
self.excellon_units_label = FCLabel('%s:' % _('Units'))
|
||||
@@ -43,8 +48,8 @@ class ExcellonExpPrefGroupUI(OptionsGroupUI):
|
||||
_("The units used in the Excellon file.")
|
||||
)
|
||||
|
||||
grid0.addWidget(self.excellon_units_label, 0, 0)
|
||||
grid0.addWidget(self.excellon_units_radio, 0, 1)
|
||||
exp_grid.addWidget(self.excellon_units_label, 0, 0)
|
||||
exp_grid.addWidget(self.excellon_units_radio, 0, 1)
|
||||
|
||||
# Excellon non-decimal format
|
||||
self.digits_label = FCLabel("%s:" % _("Int/Decimals"))
|
||||
@@ -80,8 +85,8 @@ class ExcellonExpPrefGroupUI(OptionsGroupUI):
|
||||
hlay1.addWidget(self.format_dec_entry, QtCore.Qt.AlignmentFlag.AlignLeft)
|
||||
hlay1.addStretch()
|
||||
|
||||
grid0.addWidget(self.digits_label, 2, 0)
|
||||
grid0.addLayout(hlay1, 2, 1)
|
||||
exp_grid.addWidget(self.digits_label, 2, 0)
|
||||
exp_grid.addLayout(hlay1, 2, 1)
|
||||
|
||||
# Select the Excellon Format
|
||||
self.format_label = FCLabel("%s:" % _("Format"))
|
||||
@@ -104,8 +109,8 @@ class ExcellonExpPrefGroupUI(OptionsGroupUI):
|
||||
"or TZ = trailing zeros are kept.")
|
||||
)
|
||||
|
||||
grid0.addWidget(self.format_label, 4, 0)
|
||||
grid0.addWidget(self.format_radio, 4, 1)
|
||||
exp_grid.addWidget(self.format_label, 4, 0)
|
||||
exp_grid.addWidget(self.format_radio, 4, 1)
|
||||
|
||||
# Excellon Zeros
|
||||
self.zeros_label = FCLabel('%s:' % _('Zeros'))
|
||||
@@ -128,8 +133,8 @@ class ExcellonExpPrefGroupUI(OptionsGroupUI):
|
||||
"and Leading Zeros are removed.")
|
||||
)
|
||||
|
||||
grid0.addWidget(self.zeros_label, 6, 0)
|
||||
grid0.addWidget(self.zeros_radio, 6, 1)
|
||||
exp_grid.addWidget(self.zeros_label, 6, 0)
|
||||
exp_grid.addWidget(self.zeros_radio, 6, 1)
|
||||
|
||||
# Slot type
|
||||
self.slot_type_label = FCLabel('%s:' % _('Slot type'))
|
||||
@@ -152,8 +157,8 @@ class ExcellonExpPrefGroupUI(OptionsGroupUI):
|
||||
"using the Drilled slot command (G85).")
|
||||
)
|
||||
|
||||
grid0.addWidget(self.slot_type_label, 8, 0)
|
||||
grid0.addWidget(self.slot_type_radio, 8, 1)
|
||||
exp_grid.addWidget(self.slot_type_label, 8, 0)
|
||||
exp_grid.addWidget(self.slot_type_radio, 8, 1)
|
||||
|
||||
self.layout.addStretch(1)
|
||||
|
||||
|
||||
@@ -2,7 +2,8 @@ import platform
|
||||
|
||||
from PyQt6 import QtWidgets, QtCore
|
||||
|
||||
from appGUI.GUIElements import FCCheckBox, FCSpinner, RadioSet, FCSliderWithSpinner, FCColorEntry, FCLabel, FCGridLayout
|
||||
from appGUI.GUIElements import FCCheckBox, FCSpinner, RadioSet, FCSliderWithSpinner, FCColorEntry, FCLabel, \
|
||||
FCGridLayout, FCFrame
|
||||
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
|
||||
import gettext
|
||||
import appTranslation as fcTranslate
|
||||
@@ -23,44 +24,48 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# Plot options
|
||||
self.plot_options_label = FCLabel("<b>%s:</b>" % _("Plot Options"))
|
||||
# #############################################################################################################
|
||||
# Plot Frame
|
||||
# #############################################################################################################
|
||||
self.plot_options_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Plot Options"))
|
||||
self.layout.addWidget(self.plot_options_label)
|
||||
|
||||
grid1 = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
self.layout.addLayout(grid1)
|
||||
plot_frame = FCFrame()
|
||||
self.layout.addWidget(plot_frame)
|
||||
|
||||
plot_grid = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
plot_frame.setLayout(plot_grid)
|
||||
|
||||
# Plot CB
|
||||
self.plot_cb = FCCheckBox(label=_('Plot'))
|
||||
self.plot_cb.setToolTip(
|
||||
"Plot (show) this object."
|
||||
)
|
||||
grid1.addWidget(self.plot_cb, 0, 0)
|
||||
plot_grid.addWidget(self.plot_cb, 0, 0)
|
||||
|
||||
# Solid CB
|
||||
self.solid_cb = FCCheckBox(label=_('Solid'))
|
||||
self.solid_cb.setToolTip(
|
||||
"Plot as solid circles."
|
||||
)
|
||||
grid1.addWidget(self.solid_cb, 0, 1)
|
||||
plot_grid.addWidget(self.solid_cb, 0, 1)
|
||||
|
||||
# Multicolored CB
|
||||
self.multicolored_cb = FCCheckBox(label='%s' % _('M-Color'))
|
||||
self.multicolored_cb.setToolTip(
|
||||
_("Draw polygons in different colors.")
|
||||
)
|
||||
grid1.addWidget(self.multicolored_cb, 0, 2)
|
||||
plot_grid.addWidget(self.multicolored_cb, 0, 2)
|
||||
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
|
||||
grid1.addWidget(separator_line, 1, 0, 1, 3)
|
||||
# separator_line = QtWidgets.QFrame()
|
||||
# separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
|
||||
# separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
|
||||
# plot_grid.addWidget(separator_line, 1, 0, 1, 3)
|
||||
|
||||
grid2 = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
self.layout.addLayout(grid2)
|
||||
|
||||
# Excellon format
|
||||
self.excellon_format_label = FCLabel("<b>%s:</b>" % _("Excellon Format"))
|
||||
# #############################################################################################################
|
||||
# Excellon Format Frame
|
||||
# #############################################################################################################
|
||||
self.excellon_format_label = FCLabel('<span style="color:green;"><b>%s</b></span>' % _("Excellon Format"))
|
||||
self.excellon_format_label.setToolTip(
|
||||
_("The NC drill files, usually named Excellon files\n"
|
||||
"are files that can be found in different formats.\n"
|
||||
@@ -83,7 +88,13 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
|
||||
"\n"
|
||||
"KiCAD 3:5 INCH TZ")
|
||||
)
|
||||
grid2.addWidget(self.excellon_format_label, 0, 0, 1, 2)
|
||||
self.layout.addWidget(self.excellon_format_label)
|
||||
|
||||
format_frame = FCFrame()
|
||||
self.layout.addWidget(format_frame)
|
||||
|
||||
format_grid = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
format_frame.setLayout(format_grid)
|
||||
|
||||
self.excellon_format_in_label = FCLabel('%s:' % _("INCH"))
|
||||
self.excellon_format_in_label.setToolTip(_("Default values for INCH are 2:4"))
|
||||
@@ -98,7 +109,7 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
|
||||
)
|
||||
hlay1.addWidget(self.excellon_format_upper_in_entry)
|
||||
|
||||
excellon_separator_in_label = FCLabel(':')
|
||||
excellon_separator_in_label = FCLabel(' : ')
|
||||
excellon_separator_in_label.setFixedWidth(5)
|
||||
hlay1.addWidget(excellon_separator_in_label)
|
||||
|
||||
@@ -111,8 +122,8 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
|
||||
)
|
||||
hlay1.addWidget(self.excellon_format_lower_in_entry)
|
||||
|
||||
grid2.addWidget(self.excellon_format_in_label, 1, 0)
|
||||
grid2.addLayout(hlay1, 1, 1)
|
||||
format_grid.addWidget(self.excellon_format_in_label, 1, 0)
|
||||
format_grid.addLayout(hlay1, 1, 1)
|
||||
|
||||
self.excellon_format_mm_label = FCLabel('%s:' % _("METRIC"))
|
||||
self.excellon_format_mm_label.setToolTip(_("Default values for METRIC are 3:3"))
|
||||
@@ -127,7 +138,7 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
|
||||
)
|
||||
hlay2.addWidget(self.excellon_format_upper_mm_entry)
|
||||
|
||||
excellon_separator_mm_label = FCLabel(':')
|
||||
excellon_separator_mm_label = FCLabel(' : ')
|
||||
excellon_separator_mm_label.setFixedWidth(5)
|
||||
hlay2.addWidget(excellon_separator_mm_label, QtCore.Qt.AlignmentFlag.AlignLeft)
|
||||
|
||||
@@ -140,8 +151,8 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
|
||||
)
|
||||
hlay2.addWidget(self.excellon_format_lower_mm_entry)
|
||||
|
||||
grid2.addWidget(self.excellon_format_mm_label, 2, 0)
|
||||
grid2.addLayout(hlay2, 2, 1)
|
||||
format_grid.addWidget(self.excellon_format_mm_label, 2, 0)
|
||||
format_grid.addLayout(hlay2, 2, 1)
|
||||
|
||||
self.excellon_zeros_label = FCLabel('%s:' % _('Zeros'))
|
||||
self.excellon_zeros_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeft)
|
||||
@@ -154,12 +165,12 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
|
||||
"This is used when there is no information\n"
|
||||
"stored in the Excellon file.")
|
||||
)
|
||||
grid2.addWidget(self.excellon_zeros_label, 3, 0)
|
||||
format_grid.addWidget(self.excellon_zeros_label, 3, 0)
|
||||
|
||||
self.excellon_zeros_radio = RadioSet([{'label': _('LZ'), 'value': 'L'},
|
||||
{'label': _('TZ'), 'value': 'T'}])
|
||||
|
||||
grid2.addWidget(self.excellon_zeros_radio, 3, 1)
|
||||
format_grid.addWidget(self.excellon_zeros_radio, 3, 1)
|
||||
|
||||
self.excellon_units_label = FCLabel('%s:' % _('Units'))
|
||||
self.excellon_units_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeft)
|
||||
@@ -179,28 +190,32 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
|
||||
"therefore this parameter will be used.")
|
||||
)
|
||||
|
||||
grid2.addWidget(self.excellon_units_label, 4, 0)
|
||||
grid2.addWidget(self.excellon_units_radio, 4, 1)
|
||||
format_grid.addWidget(self.excellon_units_label, 4, 0)
|
||||
format_grid.addWidget(self.excellon_units_radio, 4, 1)
|
||||
|
||||
self.update_excellon_cb = FCCheckBox(label=_('Update Export settings'))
|
||||
self.update_excellon_cb.setToolTip(
|
||||
"If checked, the Excellon Export settings will be updated with the ones above."
|
||||
)
|
||||
grid2.addWidget(self.update_excellon_cb, 5, 0, 1, 2)
|
||||
format_grid.addWidget(self.update_excellon_cb, 5, 0, 1, 2)
|
||||
|
||||
# Adding the Excellon Format Defaults Button
|
||||
self.excellon_defaults_button = QtWidgets.QPushButton()
|
||||
self.excellon_defaults_button.setText(str(_("Restore Defaults")))
|
||||
self.excellon_defaults_button.setMinimumWidth(80)
|
||||
grid2.addWidget(self.excellon_defaults_button, 6, 0, 1, 2)
|
||||
format_grid.addWidget(self.excellon_defaults_button, 6, 0, 1, 2)
|
||||
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
|
||||
grid2.addWidget(separator_line, 7, 0, 1, 2)
|
||||
# #############################################################################################################
|
||||
# Optimization Frame
|
||||
# #############################################################################################################
|
||||
self.excellon_general_label = FCLabel('<span style="color:teal;"><b>%s</b></span>' % _("Path Optimization"))
|
||||
self.layout.addWidget(self.excellon_general_label)
|
||||
|
||||
self.excellon_general_label = FCLabel("<b>%s:</b>" % _("Path Optimization"))
|
||||
grid2.addWidget(self.excellon_general_label, 8, 0, 1, 2)
|
||||
opt_frame = FCFrame()
|
||||
self.layout.addWidget(opt_frame)
|
||||
|
||||
opt_grid = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
opt_frame.setLayout(opt_grid)
|
||||
|
||||
self.excellon_optimization_label = FCLabel(_('Algorithm:'))
|
||||
self.excellon_optimization_label.setToolTip(
|
||||
@@ -219,8 +234,8 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
|
||||
{'label': _('TSA'), 'value': 'T'}],
|
||||
orientation='vertical', compact=True)
|
||||
|
||||
grid2.addWidget(self.excellon_optimization_label, 9, 0)
|
||||
grid2.addWidget(self.excellon_optimization_radio, 9, 1)
|
||||
opt_grid.addWidget(self.excellon_optimization_label, 0, 0)
|
||||
opt_grid.addWidget(self.excellon_optimization_radio, 0, 1)
|
||||
|
||||
self.optimization_time_label = FCLabel('%s:' % _('Duration'))
|
||||
self.optimization_time_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeft)
|
||||
@@ -235,33 +250,40 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
|
||||
self.optimization_time_entry = FCSpinner()
|
||||
self.optimization_time_entry.set_range(0, 999)
|
||||
|
||||
grid2.addWidget(self.optimization_time_label, 10, 0)
|
||||
grid2.addWidget(self.optimization_time_entry, 10, 1)
|
||||
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
|
||||
grid2.addWidget(separator_line, 11, 0, 1, 2)
|
||||
opt_grid.addWidget(self.optimization_time_label, 2, 0)
|
||||
opt_grid.addWidget(self.optimization_time_entry, 2, 1)
|
||||
|
||||
# #############################################################################################################
|
||||
# Fusing Frame
|
||||
# #############################################################################################################
|
||||
# Fuse Tools
|
||||
self.join_geo_label = FCLabel('<b>%s</b>:' % _('Join Option'))
|
||||
grid2.addWidget(self.join_geo_label, 12, 0, 1, 2)
|
||||
self.join_geo_label = FCLabel('<span style="color:magenta;"><b>%s</b></span>' % _('Join Option'))
|
||||
self.layout.addWidget(self.join_geo_label)
|
||||
|
||||
fuse_frame = FCFrame()
|
||||
self.layout.addWidget(fuse_frame)
|
||||
|
||||
fuse_grid = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
fuse_frame.setLayout(fuse_grid)
|
||||
|
||||
self.fuse_tools_cb = FCCheckBox(_("Fuse Tools"))
|
||||
self.fuse_tools_cb.setToolTip(
|
||||
_("When checked, the tools will be merged\n"
|
||||
"but only if they share some of their attributes.")
|
||||
)
|
||||
grid2.addWidget(self.fuse_tools_cb, 13, 0, 1, 2)
|
||||
fuse_grid.addWidget(self.fuse_tools_cb, 0, 0, 1, 2)
|
||||
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
|
||||
grid2.addWidget(separator_line, 14, 0, 1, 2)
|
||||
# #############################################################################################################
|
||||
# Object Color Frame
|
||||
# #############################################################################################################
|
||||
self.gerber_color_label = FCLabel('<span style="color:darkorange;"><b>%s</b></span>' % _('Object Color'))
|
||||
self.layout.addWidget(self.gerber_color_label)
|
||||
|
||||
# Excellon Object Color
|
||||
self.gerber_color_label = FCLabel('<b>%s</b>' % _('Object Color'))
|
||||
grid2.addWidget(self.gerber_color_label, 17, 0, 1, 2)
|
||||
obj_frame = FCFrame()
|
||||
self.layout.addWidget(obj_frame)
|
||||
|
||||
obj_grid = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
obj_frame.setLayout(obj_grid)
|
||||
|
||||
# Plot Line Color
|
||||
self.line_color_label = FCLabel('%s:' % _('Outline'))
|
||||
@@ -270,8 +292,8 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
|
||||
)
|
||||
self.line_color_entry = FCColorEntry()
|
||||
|
||||
grid2.addWidget(self.line_color_label, 19, 0)
|
||||
grid2.addWidget(self.line_color_entry, 19, 1)
|
||||
obj_grid.addWidget(self.line_color_label, 0, 0)
|
||||
obj_grid.addWidget(self.line_color_entry, 0, 1)
|
||||
|
||||
# Plot Fill Color
|
||||
self.fill_color_label = FCLabel('%s:' % _('Fill'))
|
||||
@@ -282,8 +304,8 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
|
||||
)
|
||||
self.fill_color_entry = FCColorEntry()
|
||||
|
||||
grid2.addWidget(self.fill_color_label, 22, 0)
|
||||
grid2.addWidget(self.fill_color_entry, 22, 1)
|
||||
obj_grid.addWidget(self.fill_color_label, 2, 0)
|
||||
obj_grid.addWidget(self.fill_color_entry, 2, 1)
|
||||
|
||||
# Plot Fill Transparency Level
|
||||
self.excellon_alpha_label = FCLabel('%s:' % _('Alpha'))
|
||||
@@ -292,8 +314,10 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
|
||||
)
|
||||
self.excellon_alpha_entry = FCSliderWithSpinner(0, 255, 1)
|
||||
|
||||
grid2.addWidget(self.excellon_alpha_label, 24, 0)
|
||||
grid2.addWidget(self.excellon_alpha_entry, 24, 1)
|
||||
obj_grid.addWidget(self.excellon_alpha_label, 4, 0)
|
||||
obj_grid.addWidget(self.excellon_alpha_entry, 4, 1)
|
||||
|
||||
FCGridLayout.set_common_column_size([plot_grid, format_grid, opt_grid, obj_grid, fuse_grid], 0)
|
||||
|
||||
self.layout.addStretch()
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from PyQt6 import QtWidgets
|
||||
|
||||
from appGUI.GUIElements import FCDoubleSpinner, FCLabel, FCGridLayout
|
||||
from appGUI.GUIElements import FCDoubleSpinner, FCLabel, FCGridLayout, FCFrame
|
||||
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
|
||||
import gettext
|
||||
import appTranslation as fcTranslate
|
||||
@@ -21,23 +21,28 @@ class ExcellonOptPrefGroupUI(OptionsGroupUI):
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Create CNC Job
|
||||
self.cncjob_label = FCLabel('<b>%s</b>' % _('Parameters'))
|
||||
# #############################################################################################################
|
||||
# PARAMETERS Frame
|
||||
# #############################################################################################################
|
||||
self.cncjob_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _('Parameters'))
|
||||
self.cncjob_label.setToolTip(
|
||||
_("Parameters used to create a CNC Job object\n"
|
||||
"for this drill object.")
|
||||
)
|
||||
self.layout.addWidget(self.cncjob_label)
|
||||
|
||||
grid2 = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
self.layout.addLayout(grid2)
|
||||
param_frame = FCFrame()
|
||||
self.layout.addWidget(param_frame)
|
||||
|
||||
param_grid = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
param_frame.setLayout(param_grid)
|
||||
|
||||
# ### Milling Holes ## ##
|
||||
self.mill_hole_label = FCLabel('<b>%s</b>' % _('Mill Holes'))
|
||||
self.mill_hole_label.setToolTip(
|
||||
_("Create Geometry for milling holes.")
|
||||
)
|
||||
grid2.addWidget(self.mill_hole_label, 16, 0, 1, 2)
|
||||
param_grid.addWidget(self.mill_hole_label, 0, 0, 1, 2)
|
||||
|
||||
tdlabel = FCLabel('%s:' % _('Drill Tool dia'))
|
||||
tdlabel.setToolTip(
|
||||
@@ -48,8 +53,8 @@ class ExcellonOptPrefGroupUI(OptionsGroupUI):
|
||||
self.tooldia_entry.set_precision(self.decimals)
|
||||
self.tooldia_entry.set_range(0, 999.9999)
|
||||
|
||||
grid2.addWidget(tdlabel, 18, 0)
|
||||
grid2.addWidget(self.tooldia_entry, 18, 1)
|
||||
param_grid.addWidget(tdlabel, 2, 0)
|
||||
param_grid.addWidget(self.tooldia_entry, 2, 1)
|
||||
|
||||
stdlabel = FCLabel('%s:' % _('Slot Tool dia'))
|
||||
stdlabel.setToolTip(
|
||||
@@ -60,7 +65,7 @@ class ExcellonOptPrefGroupUI(OptionsGroupUI):
|
||||
self.slot_tooldia_entry.set_precision(self.decimals)
|
||||
self.slot_tooldia_entry.set_range(0, 999.9999)
|
||||
|
||||
grid2.addWidget(stdlabel, 21, 0)
|
||||
grid2.addWidget(self.slot_tooldia_entry, 21, 1)
|
||||
param_grid.addWidget(stdlabel, 4, 0)
|
||||
param_grid.addWidget(self.slot_tooldia_entry, 4, 1)
|
||||
|
||||
self.layout.addStretch()
|
||||
# self.layout.addStretch()
|
||||
|
||||
Reference in New Issue
Block a user