GeneralPreferencesUI.py 946 B

12345678910111213141516171819202122232425
  1. from flatcamGUI.preferences.OptionsGroupUI import OptionsGroupUI
  2. from flatcamGUI.preferences.PreferencesSectionUI import PreferencesSectionUI
  3. from flatcamGUI.preferences.general.GeneralAppPrefGroupUI import GeneralAppPrefGroupUI
  4. from flatcamGUI.preferences.general.GeneralAppSettingsGroupUI import GeneralAppSettingsGroupUI
  5. from flatcamGUI.preferences.general.GeneralGUIPrefGroupUI import GeneralGUIPrefGroupUI
  6. class GeneralPreferencesUI(PreferencesSectionUI):
  7. def __init__(self, decimals, **kwargs):
  8. self.decimals = decimals
  9. super().__init__(**kwargs)
  10. def build_groups(self) -> [OptionsGroupUI]:
  11. return [
  12. GeneralAppPrefGroupUI(decimals=self.decimals),
  13. GeneralGUIPrefGroupUI(decimals=self.decimals),
  14. GeneralAppSettingsGroupUI(decimals=self.decimals)
  15. ]
  16. def get_tab_id(self):
  17. return "general_tab"
  18. def get_tab_label(self):
  19. return _("General")