ExcellonAdvOptPrefGroupUI.py 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. from PyQt5 import QtWidgets
  2. from PyQt5.QtCore import QSettings
  3. from appGUI.GUIElements import FCDoubleSpinner, RadioSet, FCCheckBox, NumericalEvalTupleEntry, NumericalEvalEntry
  4. from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
  5. import gettext
  6. import appTranslation as fcTranslate
  7. import builtins
  8. fcTranslate.apply_language('strings')
  9. if '_' not in builtins.__dict__:
  10. _ = gettext.gettext
  11. settings = QSettings("Open Source", "FlatCAM")
  12. if settings.contains("machinist"):
  13. machinist_setting = settings.value('machinist', type=int)
  14. else:
  15. machinist_setting = 0
  16. class ExcellonAdvOptPrefGroupUI(OptionsGroupUI):
  17. def __init__(self, decimals=4, parent=None):
  18. # OptionsGroupUI.__init__(self, "Excellon Advanced Options", parent=parent)
  19. super(ExcellonAdvOptPrefGroupUI, self).__init__(self, parent=parent)
  20. self.setTitle(str(_("Excellon Adv. Options")))
  21. self.decimals = decimals
  22. # #######################
  23. # ## ADVANCED OPTIONS ###
  24. # #######################
  25. self.exc_label = QtWidgets.QLabel('<b>%s:</b>' % _('Advanced Options'))
  26. self.exc_label.setToolTip(
  27. _("A list of Excellon advanced parameters.\n"
  28. "Those parameters are available only for\n"
  29. "Advanced App. Level.")
  30. )
  31. self.layout.addWidget(self.exc_label)
  32. grid0 = QtWidgets.QGridLayout()
  33. grid0.setColumnStretch(0, 0)
  34. grid0.setColumnStretch(1, 1)
  35. self.layout.addLayout(grid0)
  36. # Table Visibility CB
  37. self.table_visibility_cb = FCCheckBox(label=_('Table Show/Hide'))
  38. self.table_visibility_cb.setToolTip(
  39. _("Toggle the display of the Tools Table.")
  40. )
  41. grid0.addWidget(self.table_visibility_cb, 0, 0, 1, 2)
  42. self.layout.addStretch()