CNCJobPreferencesUI.py 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. from flatcamGUI.preferences.OptionsGroupUI import OptionsGroupUI
  2. from flatcamGUI.preferences.PreferencesSectionUI import PreferencesSectionUI
  3. from flatcamGUI.preferences.cncjob.CNCJobAdvOptPrefGroupUI import CNCJobAdvOptPrefGroupUI
  4. from flatcamGUI.preferences.cncjob.CNCJobOptPrefGroupUI import CNCJobOptPrefGroupUI
  5. from flatcamGUI.preferences.cncjob.CNCJobGenPrefGroupUI import CNCJobGenPrefGroupUI
  6. import gettext
  7. import FlatCAMTranslation as fcTranslate
  8. import builtins
  9. fcTranslate.apply_language('strings')
  10. if '_' not in builtins.__dict__:
  11. _ = gettext.gettext
  12. class CNCJobPreferencesUI(PreferencesSectionUI):
  13. def __init__(self, decimals, **kwargs):
  14. self.decimals = decimals
  15. super().__init__(**kwargs)
  16. def build_groups(self) -> [OptionsGroupUI]:
  17. return [
  18. CNCJobGenPrefGroupUI(decimals=self.decimals),
  19. CNCJobOptPrefGroupUI(decimals=self.decimals),
  20. CNCJobAdvOptPrefGroupUI(decimals=self.decimals)
  21. ]
  22. def get_tab_id(self):
  23. # FIXME this doesn't seem right
  24. return "text_editor_tab"
  25. def get_tab_label(self):
  26. return _("CNC-JOB")