- 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
@@ -50,7 +50,7 @@ class PreferencesUIManager:
|
||||
"global_log_verbose": self.ui.general_pref_form.general_app_group.verbose_cb,
|
||||
"global_portable": self.ui.general_pref_form.general_app_group.portability_cb,
|
||||
|
||||
"global_language": self.ui.general_pref_form.general_app_group.language_cb,
|
||||
"global_language_current": self.ui.general_pref_form.general_app_group.language_combo,
|
||||
|
||||
"global_systray_icon": self.ui.general_pref_form.general_app_group.systray_cb,
|
||||
"global_shell_at_startup": self.ui.general_pref_form.general_app_group.shell_startup_cb,
|
||||
|
||||
@@ -12,10 +12,11 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class CNCJobAdvOptPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "CNC Job Advanced Options Preferences", parent=None)
|
||||
super(CNCJobAdvOptPrefGroupUI, self).__init__(self, parent=parent)
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
self.setTitle(str(_("CNC Job Adv. Options")))
|
||||
|
||||
|
||||
@@ -14,12 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class CNCJobEditorPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "CNC Job Options Preferences", parent=None)
|
||||
super(CNCJobEditorPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("CNC Job Editor")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# Editor Parameters
|
||||
self.param_label = FCLabel("<b>%s:</b>" % _("Parameters"))
|
||||
|
||||
@@ -13,12 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class CNCJobGenPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "CNC Job General Preferences", parent=None)
|
||||
super(CNCJobGenPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("CNC Job General")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Plot options
|
||||
self.plot_options_label = FCLabel("<b>%s:</b>" % _("Plot Options"))
|
||||
|
||||
@@ -14,12 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class CNCJobOptPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "CNC Job Options Preferences", parent=None)
|
||||
super(CNCJobOptPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("CNC Job Options")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Export G-Code
|
||||
self.export_gcode_label = FCLabel("<b>%s:</b>" % _("Export G-Code"))
|
||||
|
||||
@@ -8,21 +8,22 @@ from appGUI.preferences.cncjob.CNCJobEditorPrefGroupUI import CNCJobEditorPrefGr
|
||||
|
||||
class CNCJobPreferencesUI(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.cncjob_gen_group = CNCJobGenPrefGroupUI(decimals=self.decimals)
|
||||
self.cncjob_gen_group = CNCJobGenPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.cncjob_gen_group.setMinimumWidth(260)
|
||||
|
||||
self.cncjob_opt_group = CNCJobOptPrefGroupUI(decimals=self.decimals)
|
||||
self.cncjob_opt_group = CNCJobOptPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.cncjob_opt_group.setMinimumWidth(260)
|
||||
self.cncjob_adv_opt_group = CNCJobAdvOptPrefGroupUI(decimals=self.decimals)
|
||||
self.cncjob_adv_opt_group = CNCJobAdvOptPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.cncjob_adv_opt_group.setMinimumWidth(260)
|
||||
|
||||
self.cncjob_editor_group = CNCJobEditorPrefGroupUI(decimals=self.decimals)
|
||||
self.cncjob_editor_group = CNCJobEditorPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.cncjob_editor_group.setMinimumWidth(260)
|
||||
|
||||
vlay = QtWidgets.QVBoxLayout()
|
||||
|
||||
@@ -13,12 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
class ExcellonAdvOptPrefGroupUI(OptionsGroupUI):
|
||||
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Excellon Advanced Options", parent=parent)
|
||||
super(ExcellonAdvOptPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Excellon Adv. Options")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# #######################
|
||||
# ## ADVANCED OPTIONS ###
|
||||
|
||||
@@ -13,11 +13,12 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class ExcellonEditorPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
super(ExcellonEditorPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Excellon Editor")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# Excellon Editor Parameters
|
||||
self.param_label = FCLabel("<b>%s:</b>" % _("Parameters"))
|
||||
|
||||
@@ -13,11 +13,12 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
class ExcellonExpPrefGroupUI(OptionsGroupUI):
|
||||
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
super(ExcellonExpPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Excellon Export")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# Plot options
|
||||
self.export_options_label = FCLabel("<b>%s:</b>" % _("Export Options"))
|
||||
|
||||
@@ -15,12 +15,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
class ExcellonGenPrefGroupUI(OptionsGroupUI):
|
||||
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Excellon Options", parent=parent)
|
||||
super(ExcellonGenPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Excellon General")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# Plot options
|
||||
self.plot_options_label = FCLabel("<b>%s:</b>" % _("Plot Options"))
|
||||
@@ -325,8 +326,16 @@ class ExcellonGenPrefGroupUI(OptionsGroupUI):
|
||||
|
||||
self.excellon_optimization_radio.activated_custom.connect(self.optimization_selection)
|
||||
|
||||
def optimization_selection(self):
|
||||
if self.excellon_optimization_radio.get_value() == 'M':
|
||||
def optimization_selection(self, val):
|
||||
if platform.architecture()[0] != '64bit':
|
||||
# set Excellon path optimizations algorithm to TSA if the app is run on a 32bit platform
|
||||
# modes 'M' or 'B' are not allowed when the app is running in 32bit platform
|
||||
if val in ['M', 'B']:
|
||||
self.opt_algorithm_radio.blockSignals(True)
|
||||
self.excellon_optimization_radio.set_value('T')
|
||||
self.opt_algorithm_radio.blockSignals(False)
|
||||
|
||||
if val == 'M':
|
||||
self.optimization_time_label.setDisabled(False)
|
||||
self.optimization_time_entry.setDisabled(False)
|
||||
else:
|
||||
|
||||
@@ -13,12 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
class ExcellonOptPrefGroupUI(OptionsGroupUI):
|
||||
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Excellon Options", parent=parent)
|
||||
super(ExcellonOptPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Excellon Options")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Create CNC Job
|
||||
self.cncjob_label = FCLabel('<b>%s</b>' % _('Parameters'))
|
||||
|
||||
@@ -17,21 +17,22 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
class ExcellonPreferencesUI(QtWidgets.QWidget):
|
||||
|
||||
def __init__(self, decimals, parent=None):
|
||||
def __init__(self, decimals, defaults, parent=None):
|
||||
QtWidgets.QWidget.__init__(self, parent=parent)
|
||||
self.layout = QtWidgets.QHBoxLayout()
|
||||
self.setLayout(self.layout)
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
self.excellon_gen_group = ExcellonGenPrefGroupUI(decimals=self.decimals)
|
||||
self.excellon_gen_group = ExcellonGenPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.excellon_gen_group.setMinimumWidth(240)
|
||||
self.excellon_opt_group = ExcellonOptPrefGroupUI(decimals=self.decimals)
|
||||
self.excellon_opt_group = ExcellonOptPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.excellon_opt_group.setMinimumWidth(290)
|
||||
self.excellon_exp_group = ExcellonExpPrefGroupUI(decimals=self.decimals)
|
||||
self.excellon_exp_group = ExcellonExpPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.excellon_exp_group.setMinimumWidth(250)
|
||||
self.excellon_adv_opt_group = ExcellonAdvOptPrefGroupUI(decimals=self.decimals)
|
||||
self.excellon_adv_opt_group = ExcellonAdvOptPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.excellon_adv_opt_group.setMinimumWidth(250)
|
||||
self.excellon_editor_group = ExcellonEditorPrefGroupUI(decimals=self.decimals)
|
||||
self.excellon_editor_group = ExcellonEditorPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.excellon_editor_group.setMinimumWidth(260)
|
||||
|
||||
self.vlay = QtWidgets.QVBoxLayout()
|
||||
|
||||
@@ -15,11 +15,12 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class GeneralAPPSetGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
super(GeneralAPPSetGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("App Settings")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
theme_settings = QtCore.QSettings("Open Source", "FlatCAM")
|
||||
if theme_settings.contains("theme"):
|
||||
|
||||
@@ -17,11 +17,12 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class GeneralAppPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
super(GeneralAppPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(_("App Preferences"))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# Create a form layout for the Application general settings
|
||||
grid0 = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
@@ -127,8 +128,9 @@ class GeneralAppPrefGroupUI(OptionsGroupUI):
|
||||
self.languagelabel.setToolTip(_("Set the language used throughout FlatCAM."))
|
||||
grid0.addWidget(self.languagelabel, 20, 0, 1, 2)
|
||||
|
||||
self.language_cb = FCComboBox()
|
||||
grid0.addWidget(self.language_cb, 22, 0, 1, 2)
|
||||
self.language_combo = FCComboBox()
|
||||
grid0.addWidget(self.language_combo, 22, 0, 1, 2)
|
||||
self.language_combo.addItems(self.defaults["global_languages"])
|
||||
|
||||
self.language_apply_btn = FCButton(_("Apply Language"))
|
||||
self.language_apply_btn.setToolTip(_("Set the language used throughout FlatCAM.\n"
|
||||
|
||||
@@ -15,11 +15,12 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class GeneralGUIPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
super(GeneralGUIPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("GUI Preferences")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# Create a grid layout for the Application general settings
|
||||
grid0 = FCGridLayout(v_spacing=5, h_spacing=3)
|
||||
|
||||
@@ -14,19 +14,20 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class GeneralPreferencesUI(QtWidgets.QWidget):
|
||||
def __init__(self, decimals, parent=None):
|
||||
def __init__(self, decimals, defaults, parent=None):
|
||||
QtWidgets.QWidget.__init__(self, parent=parent)
|
||||
self.layout = QtWidgets.QHBoxLayout()
|
||||
self.setLayout(self.layout)
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
self.general_app_group = GeneralAppPrefGroupUI(decimals=self.decimals)
|
||||
self.general_app_group = GeneralAppPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.general_app_group.setMinimumWidth(250)
|
||||
|
||||
self.general_gui_group = GeneralGUIPrefGroupUI(decimals=self.decimals)
|
||||
self.general_gui_group = GeneralGUIPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.general_gui_group.setMinimumWidth(250)
|
||||
|
||||
self.general_app_set_group = GeneralAPPSetGroupUI(decimals=self.decimals)
|
||||
self.general_app_set_group = GeneralAPPSetGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.general_app_set_group.setMinimumWidth(250)
|
||||
|
||||
self.layout.addWidget(self.general_app_group)
|
||||
|
||||
@@ -14,12 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class GeometryAdvOptPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Geometry Advanced Options Preferences", parent=parent)
|
||||
super(GeometryAdvOptPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Geometry Adv. Options")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ------------------------------
|
||||
# ## Advanced Options
|
||||
|
||||
@@ -13,12 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class GeometryEditorPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Gerber Adv. Options Preferences", parent=parent)
|
||||
super(GeometryEditorPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Geometry Editor")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# Editor Parameters
|
||||
self.param_label = FCLabel("<b>%s:</b>" % _("Parameters"))
|
||||
|
||||
@@ -13,11 +13,12 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
class GeometryExpPrefGroupUI(OptionsGroupUI):
|
||||
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
super(GeometryExpPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Geometry Export")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# Plot options
|
||||
self.export_options_label = FCLabel("<b>%s:</b>" % _("Export Options"))
|
||||
|
||||
@@ -15,12 +15,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class GeometryGenPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Geometry General Preferences", parent=parent)
|
||||
super(GeometryGenPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Geometry General")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Plot options
|
||||
self.plot_options_label = FCLabel("<b>%s:</b>" % _("Plot Options"))
|
||||
@@ -162,6 +163,14 @@ class GeometryGenPrefGroupUI(OptionsGroupUI):
|
||||
self.app.defaults['geometry_plot_line'] = self.line_color_entry.get_value()[:7] + 'FF'
|
||||
|
||||
def optimization_selection(self, val):
|
||||
if platform.architecture()[0] != '64bit':
|
||||
# set Geometry path optimizations algorithm to Rtree if the app is run on a 32bit platform
|
||||
# modes 'M' or 'B' are not allowed when the app is running in 32bit platform
|
||||
if val in ['M', 'B']:
|
||||
self.opt_algorithm_radio.blockSignals(True)
|
||||
self.opt_algorithm_radio.set_value('R')
|
||||
self.opt_algorithm_radio.blockSignals(False)
|
||||
|
||||
if val == 'M':
|
||||
self.optimization_time_label.setDisabled(False)
|
||||
self.optimization_time_entry.setDisabled(False)
|
||||
|
||||
@@ -15,12 +15,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class GeometryOptPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Geometry Options Preferences", parent=parent)
|
||||
super(GeometryOptPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Geometry Options")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ------------------------------
|
||||
# ## Create CNC Job
|
||||
|
||||
@@ -17,21 +17,22 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
class GeometryPreferencesUI(QtWidgets.QWidget):
|
||||
|
||||
def __init__(self, decimals, parent=None):
|
||||
def __init__(self, decimals, defaults, parent=None):
|
||||
QtWidgets.QWidget.__init__(self, parent=parent)
|
||||
self.layout = QtWidgets.QHBoxLayout()
|
||||
self.setLayout(self.layout)
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
self.geometry_gen_group = GeometryGenPrefGroupUI(decimals=self.decimals)
|
||||
self.geometry_gen_group = GeometryGenPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.geometry_gen_group.setMinimumWidth(220)
|
||||
self.geometry_exp_group = GeometryExpPrefGroupUI(decimals=self.decimals)
|
||||
self.geometry_exp_group = GeometryExpPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.geometry_exp_group.setMinimumWidth(220)
|
||||
self.geometry_opt_group = GeometryOptPrefGroupUI(decimals=self.decimals)
|
||||
self.geometry_opt_group = GeometryOptPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.geometry_opt_group.setMinimumWidth(300)
|
||||
self.geometry_adv_opt_group = GeometryAdvOptPrefGroupUI(decimals=self.decimals)
|
||||
self.geometry_adv_opt_group = GeometryAdvOptPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.geometry_adv_opt_group.setMinimumWidth(270)
|
||||
self.geometry_editor_group = GeometryEditorPrefGroupUI(decimals=self.decimals)
|
||||
self.geometry_editor_group = GeometryEditorPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.geometry_editor_group.setMinimumWidth(250)
|
||||
|
||||
self.layout.addWidget(self.geometry_gen_group)
|
||||
|
||||
@@ -13,12 +13,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class GerberAdvOptPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Gerber Adv. Options Preferences", parent=parent)
|
||||
super(GerberAdvOptPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Gerber Adv. Options")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Advanced Gerber Parameters
|
||||
self.adv_param_label = FCLabel('<b>%s:</b>' % _('Advanced Options'))
|
||||
|
||||
@@ -14,12 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class GerberEditorPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Gerber Adv. Options Preferences", parent=parent)
|
||||
super(GerberEditorPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Gerber Editor")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# Advanced Gerber Parameters
|
||||
self.param_label = FCLabel("<b>%s:</b>" % _("Parameters"))
|
||||
|
||||
@@ -14,11 +14,12 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
class GerberExpPrefGroupUI(OptionsGroupUI):
|
||||
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
super(GerberExpPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Gerber Export")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# Plot options
|
||||
self.export_options_label = FCLabel("<b>%s:</b>" % _("Export Options"))
|
||||
|
||||
@@ -14,12 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class GerberGenPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Gerber General Preferences", parent=parent)
|
||||
super(GerberGenPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Gerber General")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
# ## Plot options
|
||||
self.plot_options_label = FCLabel("<b>%s:</b>" % _("Plot Options"))
|
||||
|
||||
@@ -13,11 +13,12 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class GerberOptPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Gerber Options Preferences", parent=parent)
|
||||
super(GerberOptPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
self.setTitle(str(_("Gerber Options")))
|
||||
|
||||
|
||||
@@ -17,21 +17,22 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
class GerberPreferencesUI(QtWidgets.QWidget):
|
||||
|
||||
def __init__(self, decimals, parent=None):
|
||||
def __init__(self, decimals, defaults, parent=None):
|
||||
QtWidgets.QWidget.__init__(self, parent=parent)
|
||||
self.layout = QtWidgets.QHBoxLayout()
|
||||
self.setLayout(self.layout)
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
self.gerber_gen_group = GerberGenPrefGroupUI(decimals=self.decimals)
|
||||
self.gerber_gen_group = GerberGenPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.gerber_gen_group.setMinimumWidth(250)
|
||||
self.gerber_opt_group = GerberOptPrefGroupUI(decimals=self.decimals)
|
||||
self.gerber_opt_group = GerberOptPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.gerber_opt_group.setMinimumWidth(250)
|
||||
self.gerber_exp_group = GerberExpPrefGroupUI(decimals=self.decimals)
|
||||
self.gerber_exp_group = GerberExpPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.gerber_exp_group.setMinimumWidth(230)
|
||||
self.gerber_adv_opt_group = GerberAdvOptPrefGroupUI(decimals=self.decimals)
|
||||
self.gerber_adv_opt_group = GerberAdvOptPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.gerber_adv_opt_group.setMinimumWidth(200)
|
||||
self.gerber_editor_group = GerberEditorPrefGroupUI(decimals=self.decimals)
|
||||
self.gerber_editor_group = GerberEditorPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.gerber_editor_group.setMinimumWidth(200)
|
||||
|
||||
self.vlay = QtWidgets.QVBoxLayout()
|
||||
|
||||
@@ -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"))
|
||||
|
||||
@@ -14,12 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class AutoCompletePrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Gerber File associations Preferences", parent=None)
|
||||
super().__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Autocompleter Keywords")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
self.restore_btn = FCButton(_("Restore"))
|
||||
self.restore_btn.setToolTip(_("Restore the autocompleter keywords list to the default state."))
|
||||
|
||||
@@ -14,12 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class FAExcPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Excellon File associations Preferences", parent=None)
|
||||
super().__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Excellon File associations")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
self.layout.setContentsMargins(2, 2, 2, 2)
|
||||
|
||||
|
||||
@@ -14,12 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class FAGcoPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Gcode File associations Preferences", parent=None)
|
||||
super(FAGcoPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("GCode File associations")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
self.restore_btn = FCButton(_("Restore"))
|
||||
self.restore_btn.setToolTip(_("Restore the extension list to the default state."))
|
||||
|
||||
@@ -14,12 +14,13 @@ if '_' not in builtins.__dict__:
|
||||
|
||||
|
||||
class FAGrbPrefGroupUI(OptionsGroupUI):
|
||||
def __init__(self, decimals=4, parent=None):
|
||||
def __init__(self, defaults, decimals=4, parent=None):
|
||||
# OptionsGroupUI.__init__(self, "Gerber File associations Preferences", parent=None)
|
||||
super(FAGrbPrefGroupUI, self).__init__(self, parent=parent)
|
||||
|
||||
self.setTitle(str(_("Gerber File associations")))
|
||||
self.decimals = decimals
|
||||
self.defaults = defaults
|
||||
|
||||
self.restore_btn = FCButton(_("Restore"))
|
||||
self.restore_btn.setToolTip(_("Restore the extension list to the default state."))
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from PyQt6 import QtWidgets
|
||||
import sys
|
||||
|
||||
from appGUI.preferences.utilities.AutoCompletePrefGroupUI import AutoCompletePrefGroupUI
|
||||
from appGUI.preferences.utilities.FAGrbPrefGroupUI import FAGrbPrefGroupUI
|
||||
@@ -8,30 +9,35 @@ from appGUI.preferences.utilities.FAExcPrefGroupUI import FAExcPrefGroupUI
|
||||
|
||||
class UtilPreferencesUI(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.vlay = QtWidgets.QVBoxLayout()
|
||||
self.fa_excellon_group = FAExcPrefGroupUI(decimals=self.decimals)
|
||||
self.fa_excellon_group = FAExcPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.fa_excellon_group.setMinimumWidth(260)
|
||||
|
||||
self.fa_gcode_group = FAGcoPrefGroupUI(decimals=self.decimals)
|
||||
self.fa_gcode_group = FAGcoPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.fa_gcode_group.setMinimumWidth(260)
|
||||
|
||||
self.vlay.addWidget(self.fa_excellon_group)
|
||||
self.vlay.addWidget(self.fa_gcode_group)
|
||||
|
||||
self.fa_gerber_group = FAGrbPrefGroupUI(decimals=self.decimals)
|
||||
self.fa_gerber_group = FAGrbPrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.fa_gerber_group.setMinimumWidth(260)
|
||||
|
||||
self.kw_group = AutoCompletePrefGroupUI(decimals=self.decimals)
|
||||
self.kw_group = AutoCompletePrefGroupUI(decimals=self.decimals, defaults=self.defaults)
|
||||
self.kw_group.setMinimumWidth(260)
|
||||
|
||||
self.layout.addLayout(self.vlay)
|
||||
self.layout.addWidget(self.fa_gerber_group)
|
||||
# this does not make sense in Linux and MacOs so w edo not display it for those OS's
|
||||
if sys.platform not in ['linux', 'darwin']:
|
||||
self.vlay = QtWidgets.QVBoxLayout()
|
||||
|
||||
self.vlay.addWidget(self.fa_excellon_group)
|
||||
self.vlay.addWidget(self.fa_gcode_group)
|
||||
|
||||
self.layout.addLayout(self.vlay)
|
||||
self.layout.addWidget(self.fa_gerber_group)
|
||||
|
||||
self.layout.addWidget(self.kw_group)
|
||||
|
||||
self.layout.addStretch(1)
|
||||
|
||||
Reference in New Issue
Block a user