2020-05-09 18:08:15 +00:00
|
|
|
from flatcamGUI.preferences.OptionUI import *
|
|
|
|
from flatcamGUI.preferences.OptionsGroupUI import OptionsGroupUI2
|
2020-04-29 21:53:16 +00:00
|
|
|
|
2020-04-30 09:47:07 +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-09 18:08:15 +00:00
|
|
|
class CNCJobOptPrefGroupUI(OptionsGroupUI2):
|
2020-04-29 21:53:16 +00:00
|
|
|
|
2020-05-09 18:08:15 +00:00
|
|
|
def __init__(self, decimals=4, **kwargs):
|
2020-04-29 21:53:16 +00:00
|
|
|
self.decimals = decimals
|
2020-05-09 18:08:15 +00:00
|
|
|
super().__init__(**kwargs)
|
|
|
|
self.setTitle(str(_("CNC Job Options")))
|
2020-04-29 21:53:16 +00:00
|
|
|
|
2020-05-09 18:08:15 +00:00
|
|
|
def build_options(self) -> [OptionUI]:
|
|
|
|
return [
|
|
|
|
HeadingOptionUI(
|
|
|
|
label_text="Export G-Code",
|
|
|
|
label_tooltip="Export and save G-Code to\n"
|
|
|
|
"make this object to a file."
|
|
|
|
),
|
|
|
|
TextAreaOptionUI(
|
|
|
|
option="cncjob_prepend",
|
|
|
|
label_text="Prepend to G-Code",
|
|
|
|
label_tooltip="Type here any G-Code commands you would\n"
|
|
|
|
"like to add at the beginning of the G-Code file."
|
|
|
|
),
|
|
|
|
TextAreaOptionUI(
|
|
|
|
option="cncjob_append",
|
|
|
|
label_text="Append to G-Code",
|
|
|
|
label_tooltip="Type here any G-Code commands you would\n"
|
|
|
|
"like to append to the generated file.\n"
|
|
|
|
"I.e.: M2 (End of program)"
|
|
|
|
)
|
|
|
|
]
|