Files
flatcam-wsl/appGUI/preferences/excellon/ExcellonAdvOptPrefGroupUI.py
Marius Stanciu 241579d670 - on Coppper Thieving Plugin some UI updates
- updated the GCGridLayout GUi element to automatically stretch the first column but offered also configuration; updated the use throughout the app
2021-09-09 16:28:14 +03:00

55 lines
1.9 KiB
Python

from PyQt6 import QtWidgets
from appGUI.GUIElements import FCCheckBox, FCLabel, FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
import appTranslation as fcTranslate
import builtins
fcTranslate.apply_language('strings')
if '_' not in builtins.__dict__:
_ = gettext.gettext
class ExcellonAdvOptPrefGroupUI(OptionsGroupUI):
def __init__(self, defaults, decimals=4, parent=None):
# OptionsGroupUI.__init__(self, "Excellon Advanced Options", parent=parent)
super(ExcellonAdvOptPrefGroupUI, self).__init__(self, parent=parent)
self.setTitle(str(_("Excellon Adv. Options")))
self.decimals = decimals
self.defaults = defaults
# #######################
# ## ADVANCED OPTIONS ###
# #######################
self.exc_label = FCLabel('<b>%s:</b>' % _('Advanced Options'))
self.exc_label.setToolTip(
_("A list of advanced parameters.\n"
"Those parameters are available only for\n"
"Advanced App. Level.")
)
self.layout.addWidget(self.exc_label)
grid0 = FCGridLayout(v_spacing=5, h_spacing=3)
self.layout.addLayout(grid0)
# Table Visibility CB
self.table_visibility_cb = FCCheckBox(label=_('Table Show/Hide'))
self.table_visibility_cb.setToolTip(
_("Toggle the display of the Tools Table.")
)
grid0.addWidget(self.table_visibility_cb, 0, 0, 1, 2)
# Auto Load Tools from DB
self.autoload_db_cb = FCCheckBox('%s' % _("Auto load from DB"))
self.autoload_db_cb.setToolTip(
_("Automatic replacement of the tools from related application tools\n"
"with tools from DB that have a close diameter value.")
)
grid0.addWidget(self.autoload_db_cb, 1, 0, 1, 2)
self.layout.addStretch()