- added a partial translation for Chinese Simplified language, by 俊霄 余
- trying to separate the Preferences settings from App init and to make them dependent on the self.defaults dictionary - updated the language strings from the source
This commit is contained in:
committed by
Marius Stanciu
parent
dd39657e4f
commit
7dc67e2b05
@@ -20,37 +20,38 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
class Plugins2PreferencesUI(QtWidgets.QWidget):
|
||||
|
||||
def __init__(self, decimals, parent=None):
|
||||
def __init__(self, defaults, decimals, parent=None):
|
||||
QtWidgets.QWidget.__init__(self, parent=parent)
|
||||
self.layout = QtWidgets.QHBoxLayout()
|
||||
self.setLayout(self.layout)
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
self.tools2_checkrules_group = Tools2RulesCheckPrefGroupUI(decimals=self.decimals)
|
||||
self.tools2_checkrules_group = Tools2RulesCheckPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools2_checkrules_group.setMinimumWidth(220)
|
||||
|
||||
self.tools2_optimal_group = Tools2OptimalPrefGroupUI(decimals=self.decimals)
|
||||
self.tools2_optimal_group = Tools2OptimalPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools2_optimal_group.setMinimumWidth(220)
|
||||
|
||||
self.tools2_qrcode_group = Tools2QRCodePrefGroupUI(decimals=self.decimals)
|
||||
self.tools2_qrcode_group = Tools2QRCodePrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools2_qrcode_group.setMinimumWidth(220)
|
||||
|
||||
self.tools2_cfill_group = Tools2CThievingPrefGroupUI(decimals=self.decimals)
|
||||
self.tools2_cfill_group = Tools2CThievingPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools2_cfill_group.setMinimumWidth(220)
|
||||
|
||||
self.tools2_fiducials_group = Tools2FiducialsPrefGroupUI(decimals=self.decimals)
|
||||
self.tools2_fiducials_group = Tools2FiducialsPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools2_fiducials_group.setMinimumWidth(220)
|
||||
|
||||
self.tools2_cal_group = Tools2CalPrefGroupUI(decimals=self.decimals)
|
||||
self.tools2_cal_group = Tools2CalPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools2_cal_group.setMinimumWidth(220)
|
||||
|
||||
self.tools2_edrills_group = Tools2EDrillsPrefGroupUI(decimals=self.decimals)
|
||||
self.tools2_edrills_group = Tools2EDrillsPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools2_edrills_group.setMinimumWidth(220)
|
||||
|
||||
self.tools2_punch_group = Tools2PunchGerberPrefGroupUI(decimals=self.decimals)
|
||||
self.tools2_punch_group = Tools2PunchGerberPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools2_punch_group.setMinimumWidth(220)
|
||||
|
||||
self.tools2_invert_group = Tools2InvertPrefGroupUI(decimals=self.decimals)
|
||||
self.tools2_invert_group = Tools2InvertPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools2_invert_group.setMinimumWidth(220)
|
||||
|
||||
self.vlay = QtWidgets.QVBoxLayout()
|
||||
|
||||
@@ -18,25 +18,26 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
class PluginsEngravingPreferencesUI(QtWidgets.QWidget):
|
||||
|
||||
def __init__(self, decimals, parent=None):
|
||||
def __init__(self, defaults, decimals, parent=None):
|
||||
QtWidgets.QWidget.__init__(self, parent=parent)
|
||||
self.layout = QtWidgets.QHBoxLayout()
|
||||
self.setLayout(self.layout)
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
self.tools_iso_group = ToolsISOPrefGroupUI(decimals=self.decimals)
|
||||
self.tools_iso_group = ToolsISOPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_iso_group.setMinimumWidth(220)
|
||||
|
||||
self.tools_ncc_group = ToolsNCCPrefGroupUI(decimals=self.decimals)
|
||||
self.tools_ncc_group = ToolsNCCPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_ncc_group.setMinimumWidth(220)
|
||||
|
||||
self.tools_paint_group = ToolsPaintPrefGroupUI(decimals=self.decimals)
|
||||
self.tools_paint_group = ToolsPaintPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_paint_group.setMinimumWidth(220)
|
||||
|
||||
self.tools_2sided_group = Tools2sidedPrefGroupUI(decimals=self.decimals)
|
||||
self.tools_2sided_group = Tools2sidedPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_2sided_group.setMinimumWidth(220)
|
||||
|
||||
self.tools_level_group = ToolsLevelPrefGroupUI(decimals=self.decimals)
|
||||
self.tools_level_group = ToolsLevelPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_level_group.setMinimumWidth(220)
|
||||
|
||||
self.vlay = QtWidgets.QVBoxLayout()
|
||||
|
||||
@@ -24,40 +24,41 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
class PluginsPreferencesUI(QtWidgets.QWidget):
|
||||
|
||||
def __init__(self, decimals, parent=None):
|
||||
def __init__(self, defaults, decimals, parent=None):
|
||||
QtWidgets.QWidget.__init__(self, parent=parent)
|
||||
self.layout = QtWidgets.QHBoxLayout()
|
||||
self.setLayout(self.layout)
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
self.tools_drill_group = ToolsDrillPrefGroupUI(decimals=self.decimals)
|
||||
self.tools_drill_group = ToolsDrillPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_drill_group.setMinimumWidth(220)
|
||||
|
||||
self.tools_mill_group = ToolsMillPrefGroupUI(decimals=self.decimals)
|
||||
self.tools_mill_group = ToolsMillPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_mill_group.setMinimumWidth(220)
|
||||
|
||||
self.tools_cutout_group = ToolsCutoutPrefGroupUI(decimals=self.decimals)
|
||||
self.tools_cutout_group = ToolsCutoutPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_cutout_group.setMinimumWidth(220)
|
||||
|
||||
self.tools_film_group = ToolsFilmPrefGroupUI(decimals=self.decimals)
|
||||
self.tools_film_group = ToolsFilmPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_film_group.setMinimumWidth(220)
|
||||
|
||||
self.tools_panelize_group = ToolsPanelizePrefGroupUI(decimals=self.decimals)
|
||||
self.tools_panelize_group = ToolsPanelizePrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_panelize_group.setMinimumWidth(220)
|
||||
|
||||
self.tools_calculators_group = ToolsCalculatorsPrefGroupUI(decimals=self.decimals)
|
||||
self.tools_calculators_group = ToolsCalculatorsPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_calculators_group.setMinimumWidth(220)
|
||||
|
||||
self.tools_transform_group = ToolsTransformPrefGroupUI(decimals=self.decimals)
|
||||
self.tools_transform_group = ToolsTransformPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_transform_group.setMinimumWidth(200)
|
||||
|
||||
self.tools_solderpaste_group = ToolsSolderpastePrefGroupUI(decimals=self.decimals)
|
||||
self.tools_solderpaste_group = ToolsSolderpastePrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_solderpaste_group.setMinimumWidth(200)
|
||||
|
||||
self.tools_corners_group = ToolsCornersPrefGroupUI(decimals=self.decimals)
|
||||
self.tools_corners_group = ToolsCornersPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_corners_group.setMinimumWidth(200)
|
||||
|
||||
self.tools_sub_group = ToolsSubPrefGroupUI(decimals=self.decimals)
|
||||
self.tools_sub_group = ToolsSubPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_sub_group.setMinimumWidth(200)
|
||||
|
||||
self.vlay = QtWidgets.QVBoxLayout()
|
||||
|
||||
@@ -13,12 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class Tools2CThievingPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
|
||||
super(Tools2CThievingPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Copper Thieving Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Grid Layout
|
||||
grid_lay = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
|
||||
@@ -13,12 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class Tools2CalPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
|
||||
super(Tools2CalPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Calibration Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Grid Layout
|
||||
grid_lay = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
|
||||
@@ -13,12 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class Tools2EDrillsPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
|
||||
super(Tools2EDrillsPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Extract Drills Options")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Grid Layout
|
||||
grid_lay = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
|
||||
@@ -13,12 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class Tools2FiducialsPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
|
||||
super(Tools2FiducialsPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Fiducials Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Grid Layout
|
||||
grid_lay = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
|
||||
@@ -13,12 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class Tools2InvertPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
|
||||
super(Tools2InvertPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Invert Gerber Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Subtractor Tool Parameters
|
||||
self.sublabel = FCLabel("<b>%s:</b>" % _("Parameters"))
|
||||
|
||||
@@ -13,12 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class Tools2OptimalPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
|
||||
super(Tools2OptimalPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Optimal Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Parameters
|
||||
self.optlabel = FCLabel("<b>%s:</b>" % _("Parameters"))
|
||||
|
||||
@@ -13,12 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
|
||||
super(Tools2PunchGerberPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Punch Gerber Options")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Grid Layout
|
||||
grid_lay = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
|
||||
@@ -13,12 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class Tools2QRCodePrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
|
||||
super(Tools2QRCodePrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("QRCode Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Parameters
|
||||
self.qrlabel = FCLabel("<b>%s:</b>" % _("Parameters"))
|
||||
|
||||
@@ -13,12 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
|
||||
super(Tools2RulesCheckPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Check Rules Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
self.crlabel = FCLabel("<b>%s:</b>" % _("Parameters"))
|
||||
self.crlabel.setToolTip(
|
||||
|
||||
@@ -13,12 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class Tools2sidedPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "2sided Plugin", parent=parent)
|
||||
super(Tools2sidedPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("2-Sided Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Board cuttout
|
||||
self.dblsided_label = FCLabel("<b>%s:</b>" % _("Parameters"))
|
||||
|
||||
@@ -13,12 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsCalculatorsPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Calculators Plugin", parent=parent)
|
||||
super(ToolsCalculatorsPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Calculators Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## V-shape Calculator Tool
|
||||
self.vshape_tool_label = FCLabel("<b>%s:</b>" % _("V-Shape Tool Calculator"))
|
||||
|
||||
@@ -13,12 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsCornersPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Calculators Plugin", parent=parent)
|
||||
super(ToolsCornersPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Corner Markers Options")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
grid0 = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
grid0.setColumnStretch(0, 0)
|
||||
|
||||
@@ -14,12 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsCutoutPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Cutout Plugin", parent=parent)
|
||||
super(ToolsCutoutPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Cutout Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Board cutout
|
||||
self.board_cutout_label = FCLabel("<b>%s:</b>" % _("Parameters"))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from PyQt6 import QtWidgets
|
||||
from PyQt6 import QtWidgets, QtCore
|
||||
from PyQt6.QtCore import Qt
|
||||
|
||||
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCComboBox, FCCheckBox, FCSpinner, NumericalEvalTupleEntry, \
|
||||
@@ -15,11 +15,12 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsDrillPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
super(ToolsDrillPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Drilling Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Clear non-copper regions
|
||||
self.drill_label = FCLabel("<b>%s:</b>" % _("Parameters"))
|
||||
@@ -204,7 +205,13 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI):
|
||||
|
||||
self.pp_excellon_name_cb = FCComboBox()
|
||||
self.pp_excellon_name_cb.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
|
||||
self.pp_excellon_name_cb.setSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.Preferred)
|
||||
self.pp_excellon_name_cb.setSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding,
|
||||
QtWidgets.QSizePolicy.Policy.Preferred)
|
||||
self.pp_excellon_name_cb.addItems(self.defaults["tools_drill_preprocessor_list"])
|
||||
|
||||
for it in range(self.pp_excellon_name_cb.count()):
|
||||
self.pp_excellon_name_cb.setItemData(it, self.pp_excellon_name_cb.itemText(it),
|
||||
QtCore.Qt.ItemDataRole.ToolTipRole)
|
||||
|
||||
grid0.addWidget(pp_excellon_label, 27, 0)
|
||||
grid0.addWidget(self.pp_excellon_name_cb, 27, 1, 1, 2)
|
||||
|
||||
@@ -14,12 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsFilmPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Cutout Plugin", parent=parent)
|
||||
super(ToolsFilmPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Film Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Parameters
|
||||
self.film_label = FCLabel("<b>%s:</b>" % _("Parameters"))
|
||||
|
||||
@@ -14,11 +14,12 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsISOPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
super(ToolsISOPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Isolation Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Clear non-copper regions
|
||||
self.iso_label = FCLabel("<b>%s:</b>" % _("Parameters"))
|
||||
|
||||
@@ -13,12 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsLevelPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Cutout Plugin", parent=parent)
|
||||
super(ToolsLevelPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Levelling Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Board cuttout
|
||||
self.levelling_label = FCLabel("<b>%s:</b>" % _("Parameters"))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from PyQt6 import QtWidgets
|
||||
from PyQt6 import QtWidgets, QtCore
|
||||
from PyQt6.QtCore import Qt
|
||||
|
||||
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCComboBox, FCCheckBox, FCSpinner, NumericalEvalTupleEntry, \
|
||||
@@ -15,11 +15,12 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsMillPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
super(ToolsMillPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Milling Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Clear non-copper regions
|
||||
self.mill_label = FCLabel("<b>%s:</b>" % _("Parameters"))
|
||||
@@ -264,7 +265,14 @@ class ToolsMillPrefGroupUI(OptionsGroupUI):
|
||||
)
|
||||
self.pp_geometry_name_cb = FCComboBox()
|
||||
self.pp_geometry_name_cb.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
|
||||
self.pp_geometry_name_cb.setSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.Preferred)
|
||||
self.pp_geometry_name_cb.setSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding,
|
||||
QtWidgets.QSizePolicy.Policy.Preferred)
|
||||
self.pp_geometry_name_cb.addItems(self.defaults["tools_mill_preprocessor_list"])
|
||||
|
||||
|
||||
for it in range(self.pp_geometry_name_cb.count()):
|
||||
self.pp_geometry_name_cb.setItemData(it, self.pp_geometry_name_cb.itemText(it),
|
||||
QtCore.Qt.ItemDataRole.ToolTipRole)
|
||||
|
||||
grid0.addWidget(pp_label, 28, 0)
|
||||
grid0.addWidget(self.pp_geometry_name_cb, 28, 1)
|
||||
|
||||
@@ -14,12 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsNCCPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "NCC Plugin", parent=parent)
|
||||
super(ToolsNCCPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("NCC Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Clear non-copper regions
|
||||
self.clearcopper_label = FCLabel("<b>%s:</b>" % _("Parameters"))
|
||||
|
||||
@@ -14,12 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsPaintPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Paint Area Plugin", parent=parent)
|
||||
super(ToolsPaintPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Paint Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ------------------------------
|
||||
# ## Paint area
|
||||
|
||||
@@ -13,12 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsPanelizePrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Cutout Plugin", parent=parent)
|
||||
super(ToolsPanelizePrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Panelize Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Board cuttout
|
||||
self.panelize_label = FCLabel("<b>%s:</b>" % _("Parameters"))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from PyQt6 import QtWidgets
|
||||
from PyQt6 import QtCore
|
||||
|
||||
from appGUI.GUIElements import FCDoubleSpinner, FCSpinner, FCComboBox, NumericalEvalTupleEntry, FCLabel, FCGridLayout
|
||||
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
|
||||
@@ -13,12 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsSolderpastePrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
|
||||
super(ToolsSolderpastePrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("SolderPaste Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Solder Paste Dispensing
|
||||
self.solderpastelabel = FCLabel("<b>%s:</b>" % _("Parameters"))
|
||||
@@ -233,6 +234,12 @@ class ToolsSolderpastePrefGroupUI(OptionsGroupUI):
|
||||
)
|
||||
|
||||
self.pp_combo = FCComboBox()
|
||||
self.pp_combo.addItems(self.defaults["tools_solderpaste_preprocessor_list"])
|
||||
|
||||
# add ToolTips for the Preprocessor ComboBoxes in Preferences
|
||||
for it in range(self.pp_combo.count()):
|
||||
self.pp_combo.setItemData(it, self.pp_combo.itemText(it), QtCore.Qt.ItemDataRole.ToolTipRole)
|
||||
|
||||
grid0.addWidget(pp_label, 15, 0)
|
||||
grid0.addWidget(self.pp_combo, 15, 1)
|
||||
|
||||
|
||||
@@ -10,12 +10,13 @@ if '_' not in builtins.__dict__:
|
||||
_ = gettext.gettext
|
||||
|
||||
class ToolsSubPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
|
||||
super(ToolsSubPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Substractor Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Subtractor Tool Parameters
|
||||
self.sublabel = FCLabel("<b>%s:</b>" % _("Parameters"))
|
||||
|
||||
@@ -13,12 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsTransformPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
|
||||
super(ToolsTransformPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Transform Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Transformations
|
||||
self.transform_label = FCLabel("<b>%s:</b>" % _("Parameters"))
|
||||
|
||||
Reference in New Issue
Block a user