Files
flatcam-wsl/appGUI/preferences/geometry/GeometryExpPrefGroupUI.py
Marius Stanciu 3b3c87e953 - fixed some possible issues due of changes in version 2.0 of Shapely
- removed the import * statement from most of the app
2023-03-06 16:40:49 +02:00

61 lines
2.1 KiB
Python

from PyQt6 import QtWidgets, QtCore
from appGUI.GUIElements import FCLabel, FCComboBox, GLay, FCFrame, FCCheckBox
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 GeometryExpPrefGroupUI(OptionsGroupUI):
def __init__(self, app, parent=None):
super(GeometryExpPrefGroupUI, self).__init__(self, parent=parent)
self.setTitle(str(_("Export")))
self.decimals = app.decimals
self.options = app.options
# #############################################################################################################
# Export Frame
# #############################################################################################################
self.export_options_label = FCLabel('%s' % _("Export Options"), color='brown', bold=True)
self.export_options_label.setToolTip(
_("The parameters set here are used in the file exported\n"
"when using the File -> Export -> Export DXF menu entry.")
)
self.layout.addWidget(self.export_options_label)
export_frame = FCFrame()
self.layout.addWidget(export_frame)
export_grid = GLay(v_spacing=5, h_spacing=3)
export_frame.setLayout(export_grid)
# DXF format
self.dxf_format_label = FCLabel("%s:" % _("Format"))
self.dxf_format_label.setToolTip(
_("Autodesk DXF Format used when exporting Geometry as DXF.")
)
self.dxf_format_combo = FCComboBox()
self.dxf_format_combo.addItems(['R12', 'R2000', 'R2004', 'R2007', 'R2010', 'R2013', 'R2018'])
export_grid.addWidget(self.dxf_format_label, 0, 0)
export_grid.addWidget(self.dxf_format_combo, 0, 1)
# SVG format
self.svg_paths_only_cb = FCCheckBox(_("SVG Paths-Only"))
self.svg_paths_only_cb.setToolTip(
_("SVG Format. When checked it will export only paths.")
)
export_grid.addWidget(self.svg_paths_only_cb, 2, 0, 1, 2)
self.layout.addStretch()