- fixed an issue where the selected application translation language is not remembered as was selected and defaulting to English language
- refactored code in Preferences section
This commit is contained in:
committed by
Marius Stanciu
parent
a5c1b348fe
commit
7acabdfa0f
@@ -20,38 +20,36 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
class Plugins2PreferencesUI(QtWidgets.QWidget):
|
||||
|
||||
def __init__(self, defaults, decimals, parent=None):
|
||||
def __init__(self,app, 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, defaults=self.defaults)
|
||||
self.tools2_checkrules_group = Tools2RulesCheckPrefGroupUI(app=app)
|
||||
self.tools2_checkrules_group.setMinimumWidth(150)
|
||||
|
||||
self.tools2_optimal_group = Tools2OptimalPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools2_optimal_group = Tools2OptimalPrefGroupUI(app=app)
|
||||
self.tools2_optimal_group.setMinimumWidth(220)
|
||||
|
||||
self.tools2_qrcode_group = Tools2QRCodePrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools2_qrcode_group = Tools2QRCodePrefGroupUI(app=app)
|
||||
self.tools2_qrcode_group.setMinimumWidth(220)
|
||||
|
||||
self.tools2_cfill_group = Tools2CThievingPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools2_cfill_group = Tools2CThievingPrefGroupUI(app=app)
|
||||
self.tools2_cfill_group.setMinimumWidth(220)
|
||||
|
||||
self.tools2_fiducials_group = Tools2FiducialsPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools2_fiducials_group = Tools2FiducialsPrefGroupUI(app=app)
|
||||
self.tools2_fiducials_group.setMinimumWidth(220)
|
||||
|
||||
self.tools2_cal_group = Tools2CalPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools2_cal_group = Tools2CalPrefGroupUI(app=app)
|
||||
self.tools2_cal_group.setMinimumWidth(220)
|
||||
|
||||
self.tools2_edrills_group = Tools2EDrillsPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools2_edrills_group = Tools2EDrillsPrefGroupUI(app=app)
|
||||
self.tools2_edrills_group.setMinimumWidth(220)
|
||||
|
||||
self.tools2_punch_group = Tools2PunchGerberPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools2_punch_group = Tools2PunchGerberPrefGroupUI(app=app)
|
||||
self.tools2_punch_group.setMinimumWidth(220)
|
||||
|
||||
self.tools2_invert_group = Tools2InvertPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools2_invert_group = Tools2InvertPrefGroupUI(app=app)
|
||||
self.tools2_invert_group.setMinimumWidth(220)
|
||||
|
||||
self.vlay = QtWidgets.QVBoxLayout()
|
||||
|
||||
@@ -18,26 +18,24 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
class PluginsEngravingPreferencesUI(QtWidgets.QWidget):
|
||||
|
||||
def __init__(self, defaults, decimals, parent=None):
|
||||
def __init__(self, app, 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, defaults=self.defaults)
|
||||
self.tools_iso_group = ToolsISOPrefGroupUI(app=app)
|
||||
self.tools_iso_group.setMinimumWidth(220)
|
||||
|
||||
self.tools_ncc_group = ToolsNCCPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_ncc_group = ToolsNCCPrefGroupUI(app=app)
|
||||
self.tools_ncc_group.setMinimumWidth(220)
|
||||
|
||||
self.tools_paint_group = ToolsPaintPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_paint_group = ToolsPaintPrefGroupUI(app=app)
|
||||
self.tools_paint_group.setMinimumWidth(220)
|
||||
|
||||
self.tools_2sided_group = Tools2sidedPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_2sided_group = Tools2sidedPrefGroupUI(app=app)
|
||||
self.tools_2sided_group.setMinimumWidth(220)
|
||||
|
||||
self.tools_level_group = ToolsLevelPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_level_group = ToolsLevelPrefGroupUI(app=app)
|
||||
self.tools_level_group.setMinimumWidth(220)
|
||||
|
||||
self.vlay = QtWidgets.QVBoxLayout()
|
||||
|
||||
@@ -24,41 +24,39 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
class PluginsPreferencesUI(QtWidgets.QWidget):
|
||||
|
||||
def __init__(self, defaults, decimals, parent=None):
|
||||
def __init__(self, app, 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, defaults=self.defaults)
|
||||
self.tools_drill_group = ToolsDrillPrefGroupUI(app=app)
|
||||
self.tools_drill_group.setMinimumWidth(180)
|
||||
|
||||
self.tools_mill_group = ToolsMillPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_mill_group = ToolsMillPrefGroupUI(app=app)
|
||||
self.tools_mill_group.setMinimumWidth(180)
|
||||
|
||||
self.tools_cutout_group = ToolsCutoutPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_cutout_group = ToolsCutoutPrefGroupUI(app=app)
|
||||
self.tools_cutout_group.setMinimumWidth(220)
|
||||
|
||||
self.tools_film_group = ToolsFilmPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_film_group = ToolsFilmPrefGroupUI(app=app)
|
||||
self.tools_film_group.setMinimumWidth(220)
|
||||
|
||||
self.tools_panelize_group = ToolsPanelizePrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_panelize_group = ToolsPanelizePrefGroupUI(app=app)
|
||||
self.tools_panelize_group.setMinimumWidth(220)
|
||||
|
||||
self.tools_calculators_group = ToolsCalculatorsPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_calculators_group = ToolsCalculatorsPrefGroupUI(app=app)
|
||||
self.tools_calculators_group.setMinimumWidth(220)
|
||||
|
||||
self.tools_transform_group = ToolsTransformPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_transform_group = ToolsTransformPrefGroupUI(app=app)
|
||||
self.tools_transform_group.setMinimumWidth(200)
|
||||
|
||||
self.tools_solderpaste_group = ToolsSolderpastePrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_solderpaste_group = ToolsSolderpastePrefGroupUI(app=app)
|
||||
self.tools_solderpaste_group.setMinimumWidth(200)
|
||||
|
||||
self.tools_markers_group = ToolsMarkersPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_markers_group = ToolsMarkersPrefGroupUI(app=app)
|
||||
self.tools_markers_group.setMinimumWidth(200)
|
||||
|
||||
self.tools_sub_group = ToolsSubPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.tools_sub_group = ToolsSubPrefGroupUI(app=app)
|
||||
self.tools_sub_group.setMinimumWidth(200)
|
||||
|
||||
self.vlay = QtWidgets.QVBoxLayout()
|
||||
|
||||
@@ -14,13 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class Tools2CThievingPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, parent=None):
|
||||
|
||||
super(Tools2CThievingPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Copper Thieving Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# #############################################################################################################
|
||||
# Parameters Frame
|
||||
|
||||
@@ -14,13 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class Tools2CalPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, parent=None):
|
||||
|
||||
super(Tools2CalPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Calibration Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# #############################################################################################################
|
||||
# Parameters Frame
|
||||
|
||||
@@ -13,13 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class Tools2EDrillsPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, parent=None):
|
||||
|
||||
super(Tools2EDrillsPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Extract Drills Options")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# #############################################################################################################
|
||||
# PARAMETERS Frame
|
||||
|
||||
@@ -13,13 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class Tools2FiducialsPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, parent=None):
|
||||
|
||||
super(Tools2FiducialsPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Fiducials Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# #############################################################################################################
|
||||
# Parameters Frame
|
||||
|
||||
@@ -13,13 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class Tools2InvertPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, parent=None):
|
||||
|
||||
super(Tools2InvertPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Invert Gerber Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# #############################################################################################################
|
||||
# PARAMETERS Frame
|
||||
|
||||
@@ -13,13 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class Tools2OptimalPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, parent=None):
|
||||
|
||||
super(Tools2OptimalPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Optimal Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# #############################################################################################################
|
||||
# Parameters Frame
|
||||
|
||||
@@ -13,13 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, parent=None):
|
||||
|
||||
super(Tools2PunchGerberPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Punch Gerber Options")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# #############################################################################################################
|
||||
# Processed Pads Frame
|
||||
|
||||
@@ -13,13 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class Tools2QRCodePrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, parent=None):
|
||||
|
||||
super(Tools2QRCodePrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("QRCode Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# #############################################################################################################
|
||||
# Parameters Frame
|
||||
|
||||
@@ -13,7 +13,7 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, parent=None):
|
||||
|
||||
super(Tools2RulesCheckPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
@@ -22,8 +22,8 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
_("A tool to check if Gerber files are within a set\n"
|
||||
"of Manufacturing Rules.")
|
||||
)
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# #############################################################################################################
|
||||
# Rules Frame
|
||||
|
||||
@@ -13,13 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class Tools2sidedPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, 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
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# ## Board cuttout
|
||||
self.dblsided_label = FCLabel('<span style="color:indigo;"><b>%s</b></span>' % _("PCB Alignment"))
|
||||
|
||||
@@ -13,13 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsCalculatorsPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, 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
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# #############################################################################################################
|
||||
# V-Shape Tool Frame
|
||||
|
||||
@@ -14,13 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsCutoutPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, 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
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# ## Board cutout
|
||||
self.board_cutout_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Parameters"))
|
||||
|
||||
@@ -15,12 +15,12 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsDrillPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, parent=None):
|
||||
super(ToolsDrillPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Drilling Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# #############################################################################################################
|
||||
# PARAMETERS Frame
|
||||
@@ -209,7 +209,7 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI):
|
||||
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.addItems(self.defaults["tools_drill_preprocessor_list"])
|
||||
self.pp_excellon_name_cb.addItems(self.options["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),
|
||||
|
||||
@@ -14,13 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsFilmPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, 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
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# #############################################################################################################
|
||||
# Adjustments Frame
|
||||
|
||||
@@ -14,12 +14,12 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsISOPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, parent=None):
|
||||
super(ToolsISOPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Isolation Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# ## Clear non-copper regions
|
||||
self.iso_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Parameters"))
|
||||
|
||||
@@ -13,13 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsLevelPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, 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
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# ## Board cuttout
|
||||
self.levelling_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Parameters"))
|
||||
|
||||
@@ -13,13 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsMarkersPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Calculators Plugin", parent=parent)
|
||||
super(ToolsMarkersPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Markers Options")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# #############################################################################################################
|
||||
# PARAMETERS Frame
|
||||
|
||||
@@ -15,12 +15,12 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsMillPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, parent=None):
|
||||
super(ToolsMillPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Milling Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# #############################################################################################################
|
||||
# PARAMETERS Frame
|
||||
@@ -272,7 +272,7 @@ class ToolsMillPrefGroupUI(OptionsGroupUI):
|
||||
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.addItems(self.defaults["tools_mill_preprocessor_list"])
|
||||
self.pp_geometry_name_cb.addItems(self.options["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),
|
||||
|
||||
@@ -14,13 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsNCCPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, 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
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# ## Clear non-copper regions
|
||||
self.clearcopper_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Parameters"))
|
||||
|
||||
@@ -14,13 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsPaintPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, 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
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# ------------------------------
|
||||
# ## Paint area
|
||||
|
||||
@@ -13,13 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsPanelizePrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, 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
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# #############################################################################################################
|
||||
# PARAMETERS Frame
|
||||
|
||||
@@ -14,13 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsSolderpastePrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, parent=None):
|
||||
|
||||
super(ToolsSolderpastePrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("SolderPaste Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# #############################################################################################################
|
||||
# PARAMETERS Frame
|
||||
@@ -240,7 +240,7 @@ class ToolsSolderpastePrefGroupUI(OptionsGroupUI):
|
||||
)
|
||||
|
||||
self.pp_combo = FCComboBox()
|
||||
self.pp_combo.addItems(self.defaults["tools_solderpaste_preprocessor_list"])
|
||||
self.pp_combo.addItems(self.options["tools_solderpaste_preprocessor_list"])
|
||||
|
||||
# add ToolTips for the Preprocessor ComboBoxes in Preferences
|
||||
for it in range(self.pp_combo.count()):
|
||||
|
||||
@@ -10,13 +10,13 @@ if '_' not in builtins.__dict__:
|
||||
_ = gettext.gettext
|
||||
|
||||
class ToolsSubPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, parent=None):
|
||||
|
||||
super(ToolsSubPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Substractor Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# #############################################################################################################
|
||||
# PARAMETERS Frame
|
||||
|
||||
@@ -14,13 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ToolsTransformPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
def __init__(self, app, parent=None):
|
||||
|
||||
super(ToolsTransformPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Transform Plugin")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
self.decimals = app.decimals
|
||||
self.options = app.options
|
||||
|
||||
# #############################################################################################################
|
||||
# PARAMETERS Frame
|
||||
|
||||
Reference in New Issue
Block a user