- 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:
Marius Stanciu
2021-10-01 02:23:02 +03:00
committed by Marius
parent 2feb509081
commit a1530963f5
17 changed files with 479 additions and 314 deletions

View File

@@ -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()