GeometryGenPrefGroupUI.py 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. from flatcamGUI.preferences.OptionUI import *
  2. from flatcamGUI.preferences.OptionsGroupUI import OptionsGroupUI2
  3. import gettext
  4. import FlatCAMTranslation as fcTranslate
  5. import builtins
  6. fcTranslate.apply_language('strings')
  7. if '_' not in builtins.__dict__:
  8. _ = gettext.gettext
  9. class GeometryGenPrefGroupUI(OptionsGroupUI2):
  10. def __init__(self, decimals=4, **kwargs):
  11. self.decimals = decimals
  12. super().__init__(**kwargs)
  13. self.setTitle(str(_("Geometry General")))
  14. def build_options(self) -> [OptionUI]:
  15. return [
  16. HeadingOptionUI(label_text="Plot Options"),
  17. CheckboxOptionUI(
  18. option="geometry_plot",
  19. label_text="Plot",
  20. label_tooltip="Plot (show) this object."
  21. ),
  22. SpinnerOptionUI(
  23. option="geometry_circle_steps",
  24. label_text="Circle Steps",
  25. label_tooltip="The number of circle steps for <b>Geometry</b> \n"
  26. "circle and arc shapes linear approximation.",
  27. min_value=0, max_value=9999, step=1
  28. ),
  29. HeadingOptionUI(label_text="Tools"),
  30. LineEntryOptionUI(
  31. option="geometry_cnctooldia",
  32. label_text="Tools Dia",
  33. label_color="green",
  34. label_bold=True,
  35. label_tooltip="Diameters of the tools, separated by comma.\n"
  36. "The value of the diameter has to use the dot decimals separator.\n"
  37. "Valid values: 0.3, 1.0"
  38. ),
  39. SeparatorOptionUI(),
  40. HeadingOptionUI(label_text="Geometry Object Color"),
  41. ColorOptionUI(
  42. option="geometry_plot_line",
  43. label_text="Outline",
  44. label_tooltip="Set the line color for plotted objects.",
  45. ),
  46. ]