Files
flatcam-wsl/appGUI/preferences/tools/ToolsSubPrefGroupUI.py
Marius Stanciu 7dc67e2b05 - added a partial translation for Chinese Simplified language, by 俊霄 余
- trying to separate the Preferences settings from App init and to make them dependent on the self.defaults dictionary
- updated the language strings from the source
2021-08-23 14:01:28 +03:00

40 lines
1.4 KiB
Python

from appGUI.GUIElements import FCCheckBox, FCLabel
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 ToolsSubPrefGroupUI(OptionsGroupUI):
def __init__(self, defaults, decimals=4, parent=None):
super(ToolsSubPrefGroupUI, self).__init__(self, parent=parent)
self.setTitle(str(_("Substractor Plugin")))
self.decimals = decimals
self.defaults = defaults
# ## Subtractor Tool Parameters
self.sublabel = FCLabel("<b>%s:</b>" % _("Parameters"))
self.sublabel.setToolTip(
_("A tool to substract one Gerber or Geometry object\n"
"from another of the same type.")
)
self.layout.addWidget(self.sublabel)
self.close_paths_cb = FCCheckBox(_("Close paths"))
self.close_paths_cb.setToolTip(_("Checking this will close the paths cut by the subtractor object."))
self.layout.addWidget(self.close_paths_cb)
self.delete_sources_cb = FCCheckBox(_("Delete source"))
self.delete_sources_cb.setToolTip(
_("When checked will delete the source objects\n"
"after a successful operation.")
)
self.layout.addWidget(self.delete_sources_cb)
self.layout.addStretch()