2020-05-06 01:15:41 +00:00
|
|
|
from flatcamGUI.preferences.OptionsGroupUI import OptionsGroupUI
|
|
|
|
from flatcamGUI.preferences.PreferencesSectionUI import PreferencesSectionUI
|
2020-04-29 23:11:45 +00:00
|
|
|
from flatcamGUI.preferences.cncjob.CNCJobAdvOptPrefGroupUI import CNCJobAdvOptPrefGroupUI
|
|
|
|
from flatcamGUI.preferences.cncjob.CNCJobOptPrefGroupUI import CNCJobOptPrefGroupUI
|
|
|
|
from flatcamGUI.preferences.cncjob.CNCJobGenPrefGroupUI import CNCJobGenPrefGroupUI
|
2020-04-29 21:53:16 +00:00
|
|
|
|
2020-05-09 17:53:42 +00:00
|
|
|
import gettext
|
|
|
|
import FlatCAMTranslation as fcTranslate
|
|
|
|
import builtins
|
|
|
|
fcTranslate.apply_language('strings')
|
|
|
|
if '_' not in builtins.__dict__:
|
|
|
|
_ = gettext.gettext
|
|
|
|
|
2020-04-29 21:53:16 +00:00
|
|
|
|
2020-05-06 01:15:41 +00:00
|
|
|
class CNCJobPreferencesUI(PreferencesSectionUI):
|
2020-04-29 21:53:16 +00:00
|
|
|
|
2020-05-06 01:15:41 +00:00
|
|
|
def __init__(self, decimals, **kwargs):
|
2020-04-29 21:53:16 +00:00
|
|
|
self.decimals = decimals
|
2020-05-06 01:15:41 +00:00
|
|
|
super().__init__(**kwargs)
|
2020-04-29 21:53:16 +00:00
|
|
|
|
2020-05-06 01:15:41 +00:00
|
|
|
def build_groups(self) -> [OptionsGroupUI]:
|
|
|
|
return [
|
2020-05-09 17:53:42 +00:00
|
|
|
CNCJobGenPrefGroupUI(decimals=self.decimals),
|
2020-05-09 18:08:15 +00:00
|
|
|
CNCJobOptPrefGroupUI(decimals=self.decimals),
|
2020-05-09 18:31:09 +00:00
|
|
|
CNCJobAdvOptPrefGroupUI(decimals=self.decimals)
|
2020-05-06 01:15:41 +00:00
|
|
|
]
|
2020-05-06 02:02:23 +00:00
|
|
|
|
|
|
|
def get_tab_id(self):
|
|
|
|
# FIXME this doesn't seem right
|
|
|
|
return "text_editor_tab"
|
|
|
|
|
|
|
|
def get_tab_label(self):
|
|
|
|
return _("CNC-JOB")
|