ExcellonPreferencesUI.py 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. from flatcamGUI.preferences.OptionsGroupUI import OptionsGroupUI
  2. from flatcamGUI.preferences.PreferencesSectionUI import PreferencesSectionUI
  3. from flatcamGUI.preferences.excellon.ExcellonEditorPrefGroupUI import ExcellonEditorPrefGroupUI
  4. from flatcamGUI.preferences.excellon.ExcellonExpPrefGroupUI import ExcellonExpPrefGroupUI
  5. from flatcamGUI.preferences.excellon.ExcellonAdvOptPrefGroupUI import ExcellonAdvOptPrefGroupUI
  6. from flatcamGUI.preferences.excellon.ExcellonOptPrefGroupUI import ExcellonOptPrefGroupUI
  7. from flatcamGUI.preferences.excellon.ExcellonGenPrefGroupUI import ExcellonGenPrefGroupUI
  8. class ExcellonPreferencesUI(PreferencesSectionUI):
  9. def __init__(self, decimals, **kwargs):
  10. self.decimals = decimals
  11. self.excellon_gen_group = ExcellonGenPrefGroupUI(decimals=self.decimals)
  12. self.excellon_opt_group = ExcellonOptPrefGroupUI(decimals=self.decimals)
  13. self.excellon_exp_group = ExcellonExpPrefGroupUI(decimals=self.decimals)
  14. self.excellon_adv_opt_group = ExcellonAdvOptPrefGroupUI(decimals=self.decimals)
  15. self.excellon_editor_group = ExcellonEditorPrefGroupUI(decimals=self.decimals)
  16. super().__init__(**kwargs)
  17. def build_groups(self) -> [OptionsGroupUI]:
  18. return [
  19. self.excellon_gen_group,
  20. self.excellon_opt_group,
  21. self.excellon_exp_group,
  22. self.excellon_adv_opt_group,
  23. self.excellon_editor_group
  24. ]
  25. def get_tab_id(self):
  26. return "excellon_tab"
  27. def get_tab_label(self):
  28. return _("EXCELLON")