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