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.geometry.GeometryEditorPrefGroupUI import GeometryEditorPrefGroupUI
|
|
|
|
from flatcamGUI.preferences.geometry.GeometryAdvOptPrefGroupUI import GeometryAdvOptPrefGroupUI
|
|
|
|
from flatcamGUI.preferences.geometry.GeometryOptPrefGroupUI import GeometryOptPrefGroupUI
|
|
|
|
from flatcamGUI.preferences.geometry.GeometryGenPrefGroupUI import GeometryGenPrefGroupUI
|
2020-04-29 21:53:16 +00:00
|
|
|
|
2020-05-09 15:21:21 +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 GeometryPreferencesUI(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
|
|
|
|
self.geometry_gen_group = GeometryGenPrefGroupUI(decimals=self.decimals)
|
|
|
|
self.geometry_opt_group = GeometryOptPrefGroupUI(decimals=self.decimals)
|
|
|
|
self.geometry_adv_opt_group = GeometryAdvOptPrefGroupUI(decimals=self.decimals)
|
|
|
|
self.geometry_editor_group = GeometryEditorPrefGroupUI(decimals=self.decimals)
|
2020-05-06 01:15:41 +00:00
|
|
|
super().__init__(**kwargs)
|
|
|
|
|
|
|
|
def build_groups(self) -> [OptionsGroupUI]:
|
|
|
|
return [
|
|
|
|
self.geometry_gen_group,
|
|
|
|
self.geometry_opt_group,
|
|
|
|
self.geometry_adv_opt_group,
|
|
|
|
self.geometry_editor_group
|
|
|
|
]
|
2020-05-06 02:02:23 +00:00
|
|
|
|
|
|
|
def get_tab_id(self):
|
|
|
|
return "geometry_tab"
|
|
|
|
|
|
|
|
def get_tab_label(self):
|
|
|
|
return _("GEOMETRY")
|
|
|
|
|