- 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
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user