GeometryPreferencesUI.py 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. from flatcamGUI.preferences.OptionsGroupUI import OptionsGroupUI
  2. from flatcamGUI.preferences.PreferencesSectionUI import PreferencesSectionUI
  3. from flatcamGUI.preferences.geometry.GeometryEditorPrefGroupUI import GeometryEditorPrefGroupUI
  4. from flatcamGUI.preferences.geometry.GeometryAdvOptPrefGroupUI import GeometryAdvOptPrefGroupUI
  5. from flatcamGUI.preferences.geometry.GeometryOptPrefGroupUI import GeometryOptPrefGroupUI
  6. from flatcamGUI.preferences.geometry.GeometryGenPrefGroupUI import GeometryGenPrefGroupUI
  7. class GeometryPreferencesUI(PreferencesSectionUI):
  8. def __init__(self, decimals, **kwargs):
  9. self.decimals = decimals
  10. self.geometry_gen_group = GeometryGenPrefGroupUI(decimals=self.decimals)
  11. self.geometry_opt_group = GeometryOptPrefGroupUI(decimals=self.decimals)
  12. self.geometry_adv_opt_group = GeometryAdvOptPrefGroupUI(decimals=self.decimals)
  13. self.geometry_editor_group = GeometryEditorPrefGroupUI(decimals=self.decimals)
  14. super().__init__(**kwargs)
  15. def build_groups(self) -> [OptionsGroupUI]:
  16. return [
  17. self.geometry_gen_group,
  18. self.geometry_opt_group,
  19. self.geometry_adv_opt_group,
  20. self.geometry_editor_group
  21. ]
  22. def get_tab_id(self):
  23. return "geometry_tab"
  24. def get_tab_label(self):
  25. return _("GEOMETRY")