- multiple UI changes in Preferences

- UI changes in the Paint Plugin
This commit is contained in:
Marius Stanciu
2021-09-25 21:08:15 +03:00
committed by Marius
parent 0fa01e760a
commit 08d3a580ac
42 changed files with 762 additions and 628 deletions

View File

@@ -110,7 +110,7 @@ class Tools2CThievingPrefGroupUI(OptionsGroupUI):
self.bbox_type_radio = RadioSet([
{'label': _('Rectangular'), 'value': 'rect'},
{"label": _("Minimal"), "value": "min"}
], stretch=False)
], compact=True)
self.bbox_type_label = FCLabel('%s:' % _("Box Type"))
self.bbox_type_label.setToolTip(
_("- 'Rectangular' - the bounding box will be of rectangular shape.\n"

View File

@@ -39,7 +39,7 @@ class Tools2CalPrefGroupUI(OptionsGroupUI):
"- Free -> click freely on canvas to acquire the calibration points"))
self.cal_source_radio = RadioSet([{'label': _('Object'), 'value': 'object'},
{'label': _('Free'), 'value': 'free'}],
stretch=False)
compact=True)
grid_lay.addWidget(self.cal_source_lbl, 1, 0)
grid_lay.addWidget(self.cal_source_radio, 1, 1, 1, 2)

View File

@@ -93,7 +93,7 @@ class Tools2EDrillsPrefGroupUI(OptionsGroupUI):
{'label': _("Proportional"), 'value': 'prop'}
],
orientation='vertical',
stretch=False)
compact=True)
self.method_label = FCLabel('<b>%s:</b>' % _("Method"))
self.method_label.setToolTip(
_("The method for processing pads. Can be:\n"

View File

@@ -71,7 +71,7 @@ class Tools2FiducialsPrefGroupUI(OptionsGroupUI):
{'label': _('Up'), 'value': 'up'},
{"label": _("Down"), "value": "down"},
{"label": _("None"), "value": "no"}
], stretch=False)
], compact=True)
self.pos_label = FCLabel('%s:' % _("Second fiducial"))
self.pos_label.setToolTip(
_("The position for the second fiducial.\n"
@@ -132,7 +132,7 @@ class Tools2FiducialsPrefGroupUI(OptionsGroupUI):
self.mode_radio = RadioSet([
{'label': _('Auto'), 'value': 'auto'},
{"label": _("Manual"), "value": "manual"}
], stretch=False)
], compact=True)
self.mode_label = FCLabel('%s:' % _("Mode"))
self.mode_label.setToolTip(
_("- 'Auto' - automatic placement of fiducials in the corners of the bounding box.\n"

View File

@@ -59,7 +59,7 @@ class Tools2InvertPrefGroupUI(OptionsGroupUI):
{'label': _('Rounded'), 'value': 'r'},
{'label': _('Square'), 'value': 's'},
{'label': _('Bevel'), 'value': 'b'}
], orientation='vertical', stretch=False)
], orientation='vertical', compact=True)
grid0.addWidget(self.join_label, 5, 0, 1, 2)
grid0.addWidget(self.join_radio, 7, 0, 1, 2)

View File

@@ -94,7 +94,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
{'label': _("Proportional"), 'value': 'prop'}
],
orientation='vertical',
stretch=False)
compact=True)
self.hole_size_label = FCLabel('<b>%s:</b>' % _("Method"))
self.hole_size_label.setToolTip(
_("The punch hole source can be:\n"

View File

@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import FCDoubleSpinner, RadioSet, FCLabel, FCGridLayout
from appGUI.GUIElements import FCDoubleSpinner, RadioSet, FCLabel, FCGridLayout, FCFrame
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -22,15 +22,21 @@ class Tools2sidedPrefGroupUI(OptionsGroupUI):
self.defaults = defaults
# ## Board cuttout
self.dblsided_label = FCLabel("<b>%s:</b>" % _("Parameters"))
self.dblsided_label = FCLabel('<span style="color:indigo;"><b>%s</b></span>' % _("PCB Alignment"))
self.dblsided_label.setToolTip(
_("A tool to help in creating a double sided\n"
"PCB using alignment holes.")
)
self.layout.addWidget(self.dblsided_label)
grid0 = FCGridLayout(v_spacing=5, h_spacing=3)
self.layout.addLayout(grid0)
# #############################################################################################################
# Parameters Frame
# #############################################################################################################
par_frame = FCFrame()
self.layout.addWidget(par_frame)
param_grid = FCGridLayout(v_spacing=5, h_spacing=3)
par_frame.setLayout(param_grid)
# ## Drill diameter for alignment holes
self.drill_dia_entry = FCDoubleSpinner()
@@ -43,8 +49,8 @@ class Tools2sidedPrefGroupUI(OptionsGroupUI):
_("Diameter of the drill for the "
"alignment holes.")
)
grid0.addWidget(self.dd_label, 0, 0)
grid0.addWidget(self.drill_dia_entry, 0, 1)
param_grid.addWidget(self.dd_label, 0, 0)
param_grid.addWidget(self.drill_dia_entry, 0, 1)
# ## Alignment Axis
self.align_ax_label = FCLabel('%s:' % _("Align Axis"))
@@ -52,26 +58,39 @@ class Tools2sidedPrefGroupUI(OptionsGroupUI):
_("Mirror vertically (X) or horizontally (Y).")
)
self.align_axis_radio = RadioSet([{'label': 'X', 'value': 'X'},
{'label': 'Y', 'value': 'Y'}])
{'label': 'Y', 'value': 'Y'}], compact=True)
grid0.addWidget(self.align_ax_label, 1, 0)
grid0.addWidget(self.align_axis_radio, 1, 1)
param_grid.addWidget(self.align_ax_label, 1, 0)
param_grid.addWidget(self.align_axis_radio, 1, 1)
# ## Axis
self.mirror_axis_radio = RadioSet([{'label': 'X', 'value': 'X'},
{'label': 'Y', 'value': 'Y'}])
{'label': 'Y', 'value': 'Y'}], compact=True)
self.mirax_label = FCLabel('%s:' % _("Mirror Axis"))
self.mirax_label.setToolTip(
_("Mirror vertically (X) or horizontally (Y).")
)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
grid0.addWidget(separator_line, 2, 0, 1, 2)
# separator_line = QtWidgets.QFrame()
# separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
# separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
# param_grid.addWidget(separator_line, 2, 0, 1, 2)
grid0.addWidget(self.mirax_label, 3, 0)
grid0.addWidget(self.mirror_axis_radio, 3, 1)
# #############################################################################################################
# Mirror Frame
# #############################################################################################################
# ### Tools ## ##
self.mirror_label = FCLabel('<span style="color:red;"><b>%s</b></span>' % _("Mirror Operation"))
self.layout.addWidget(self.mirror_label)
mirror_frame = FCFrame()
self.layout.addWidget(mirror_frame)
mirror_grid = FCGridLayout(v_spacing=5, h_spacing=3)
mirror_frame.setLayout(mirror_grid)
mirror_grid.addWidget(self.mirax_label, 0, 0)
mirror_grid.addWidget(self.mirror_axis_radio, 0, 1)
# ## Axis Location
self.axis_location_radio = RadioSet(
@@ -79,7 +98,7 @@ class Tools2sidedPrefGroupUI(OptionsGroupUI):
{'label': _('Point'), 'value': 'point'},
{'label': _('Box'), 'value': 'box'},
{'label': _('Snap'), 'value': 'hole'},
]
], compact=True
)
self.axloc_label = FCLabel('%s:' % _("Axis Ref"))
self.axloc_label.setToolTip(
@@ -91,7 +110,9 @@ class Tools2sidedPrefGroupUI(OptionsGroupUI):
"- Snap-> a point defined by the center of a drill hone in a Excellon object")
)
grid0.addWidget(self.axloc_label, 4, 0)
grid0.addWidget(self.axis_location_radio, 4, 1)
mirror_grid.addWidget(self.axloc_label, 2, 0)
mirror_grid.addWidget(self.axis_location_radio, 2, 1)
self.layout.addStretch()
FCGridLayout.set_common_column_size([param_grid, mirror_grid], 0)
# self.layout.addStretch(1)

View File

@@ -41,7 +41,7 @@ class ToolsFilmPrefGroupUI(OptionsGroupUI):
# Scale Geometry
self.film_scale_cb = FCCheckBox('%s' % _("Scale"))
self.film_scale_cb.setToolTip(
_("A value greater than 1 will stretch the film\n"
_("A value greater than 1 will compact the film\n"
"while a value less than 1 will jolt it.")
)
self.film_scale_cb.setStyleSheet(
@@ -157,7 +157,7 @@ class ToolsFilmPrefGroupUI(OptionsGroupUI):
self.film_mirror_axis = RadioSet([{'label': _('X'), 'value': 'x'},
{'label': _('Y'), 'value': 'y'},
{'label': _('Both'), 'value': 'both'}],
stretch=False)
compact=True)
self.film_mirror_axis_label = FCLabel('%s:' % _("Mirror Axis"))
adj_grid.addWidget(self.film_mirror_axis_label, 12, 0)
@@ -209,7 +209,7 @@ class ToolsFilmPrefGroupUI(OptionsGroupUI):
# Polarity
self.film_type_radio = RadioSet([{'label': 'Pos', 'value': 'pos'},
{'label': 'Neg', 'value': 'neg'}])
{'label': 'Neg', 'value': 'neg'}], compact=True)
ftypelbl = FCLabel('%s:' % _('Polarity'))
ftypelbl.setToolTip(
_("Generate a Positive black film or a Negative film.")
@@ -265,7 +265,7 @@ class ToolsFilmPrefGroupUI(OptionsGroupUI):
self.file_type_radio = RadioSet([{'label': _('SVG'), 'value': 'svg'},
{'label': _('PNG'), 'value': 'png'},
{'label': _('PDF'), 'value': 'pdf'}
], stretch=False)
], compact=True)
self.file_type_label = FCLabel('%s:' % _("Film Type"))
self.file_type_label.setToolTip(
@@ -285,7 +285,7 @@ class ToolsFilmPrefGroupUI(OptionsGroupUI):
self.orientation_radio = RadioSet([{'label': _('Portrait'), 'value': 'p'},
{'label': _('Landscape'), 'value': 'l'},
], stretch=False)
], compact=True)
grid_par.addWidget(self.orientation_label, 14, 0)
grid_par.addWidget(self.orientation_radio, 14, 1)

View File

@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import FCDoubleSpinner, FCSpinner, RadioSet, FCLabel, FCComboBox, FCGridLayout
from appGUI.GUIElements import FCDoubleSpinner, FCSpinner, RadioSet, FCLabel, FCComboBox, FCGridLayout, FCFrame
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -22,15 +22,20 @@ class ToolsLevelPrefGroupUI(OptionsGroupUI):
self.defaults = defaults
# ## Board cuttout
self.levelling_label = FCLabel("<b>%s:</b>" % _("Parameters"))
self.levelling_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _("Parameters"))
self.levelling_label.setToolTip(
_("Generate CNC Code with auto-levelled paths.")
)
self.layout.addWidget(self.levelling_label)
# Grid Layout
grid0 = FCGridLayout(v_spacing=5, h_spacing=3)
self.layout.addLayout(grid0)
# #############################################################################################################
# Parameters Frame
# #############################################################################################################
par_frame = FCFrame()
self.layout.addWidget(par_frame)
par_grid = FCGridLayout(v_spacing=5, h_spacing=3)
par_frame.setLayout(par_grid)
# Probe points mode
al_mode_lbl = FCLabel('%s:' % _("Mode"))
@@ -43,8 +48,8 @@ class ToolsLevelPrefGroupUI(OptionsGroupUI):
{'label': _('Manual'), 'value': 'manual'},
{'label': _('Grid'), 'value': 'grid'}
])
grid0.addWidget(al_mode_lbl, 8, 0)
grid0.addWidget(self.al_mode_radio, 8, 1)
par_grid.addWidget(al_mode_lbl, 8, 0)
par_grid.addWidget(self.al_mode_radio, 8, 1)
# AUTOLEVELL METHOD
self.al_method_lbl = FCLabel('%s:' % _("Method"))
@@ -57,8 +62,8 @@ class ToolsLevelPrefGroupUI(OptionsGroupUI):
{'label': _('Voronoi'), 'value': 'v'},
{'label': _('Bilinear'), 'value': 'b'}
])
grid0.addWidget(self.al_method_lbl, 9, 0)
grid0.addWidget(self.al_method_radio, 9, 1)
par_grid.addWidget(self.al_method_lbl, 9, 0)
par_grid.addWidget(self.al_method_radio, 9, 1)
# ## Columns
self.al_columns_entry = FCSpinner()
@@ -67,8 +72,8 @@ class ToolsLevelPrefGroupUI(OptionsGroupUI):
self.al_columns_label.setToolTip(
_("The number of grid columns.")
)
grid0.addWidget(self.al_columns_label, 10, 0)
grid0.addWidget(self.al_columns_entry, 10, 1)
par_grid.addWidget(self.al_columns_label, 10, 0)
par_grid.addWidget(self.al_columns_entry, 10, 1)
# ## Rows
self.al_rows_entry = FCSpinner()
@@ -77,8 +82,8 @@ class ToolsLevelPrefGroupUI(OptionsGroupUI):
self.al_rows_label.setToolTip(
_("The number of grid rows.")
)
grid0.addWidget(self.al_rows_label, 12, 0)
grid0.addWidget(self.al_rows_entry, 12, 1)
par_grid.addWidget(self.al_rows_label, 12, 0)
par_grid.addWidget(self.al_rows_entry, 12, 1)
# Travel Z Probe
self.ptravelz_label = FCLabel('%s:' % _("Probe Z travel"))
@@ -89,8 +94,8 @@ class ToolsLevelPrefGroupUI(OptionsGroupUI):
self.ptravelz_entry.set_precision(self.decimals)
self.ptravelz_entry.set_range(0.0000, 10000.0000)
grid0.addWidget(self.ptravelz_label, 14, 0)
grid0.addWidget(self.ptravelz_entry, 14, 1)
par_grid.addWidget(self.ptravelz_label, 14, 0)
par_grid.addWidget(self.ptravelz_entry, 14, 1)
# Probe depth
self.pdepth_label = FCLabel('%s:' % _("Probe Z depth"))
@@ -102,8 +107,8 @@ class ToolsLevelPrefGroupUI(OptionsGroupUI):
self.pdepth_entry.set_precision(self.decimals)
self.pdepth_entry.set_range(-910000.0000, 0.0000)
grid0.addWidget(self.pdepth_label, 16, 0)
grid0.addWidget(self.pdepth_entry, 16, 1)
par_grid.addWidget(self.pdepth_label, 16, 0)
par_grid.addWidget(self.pdepth_entry, 16, 1)
# Probe feedrate
self.feedrate_probe_label = FCLabel('%s:' % _("Probe Feedrate"))
@@ -114,13 +119,13 @@ class ToolsLevelPrefGroupUI(OptionsGroupUI):
self.feedrate_probe_entry.set_precision(self.decimals)
self.feedrate_probe_entry.set_range(0, 910000.0000)
grid0.addWidget(self.feedrate_probe_label, 18, 0)
grid0.addWidget(self.feedrate_probe_entry, 18, 1)
par_grid.addWidget(self.feedrate_probe_label, 18, 0)
par_grid.addWidget(self.feedrate_probe_entry, 18, 1)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
grid0.addWidget(separator_line, 20, 0, 1, 2)
par_grid.addWidget(separator_line, 20, 0, 1, 2)
self.al_controller_label = FCLabel('%s:' % _("Controller"))
self.al_controller_label.setToolTip(
@@ -130,8 +135,8 @@ class ToolsLevelPrefGroupUI(OptionsGroupUI):
self.al_controller_combo = FCComboBox()
self.al_controller_combo.addItems(["MACH3", "MACH4", "LinuxCNC", "GRBL"])
grid0.addWidget(self.al_controller_label, 22, 0)
grid0.addWidget(self.al_controller_combo, 22, 1)
par_grid.addWidget(self.al_controller_label, 22, 0)
par_grid.addWidget(self.al_controller_combo, 22, 1)
# JOG Step
self.jog_step_label = FCLabel('%s:' % _("Step"))
@@ -143,8 +148,8 @@ class ToolsLevelPrefGroupUI(OptionsGroupUI):
self.jog_step_entry.set_precision(self.decimals)
self.jog_step_entry.set_range(0, 910000.0000)
grid0.addWidget(self.jog_step_label, 24, 0)
grid0.addWidget(self.jog_step_entry, 24, 1)
par_grid.addWidget(self.jog_step_label, 24, 0)
par_grid.addWidget(self.jog_step_entry, 24, 1)
# JOG Feedrate
self.jog_fr_label = FCLabel('%s:' % _("Feedrate"))
@@ -156,8 +161,8 @@ class ToolsLevelPrefGroupUI(OptionsGroupUI):
self.jog_fr_entry.set_precision(self.decimals)
self.jog_fr_entry.set_range(0, 910000.0000)
grid0.addWidget(self.jog_fr_label, 26, 0)
grid0.addWidget(self.jog_fr_entry, 26, 1)
par_grid.addWidget(self.jog_fr_label, 26, 0)
par_grid.addWidget(self.jog_fr_entry, 26, 1)
# JOG Travel Z
self.jog_travelz_label = FCLabel('%s:' % _("Travel Z"))
@@ -169,7 +174,7 @@ class ToolsLevelPrefGroupUI(OptionsGroupUI):
self.jog_travelz_entry.set_precision(self.decimals)
self.jog_travelz_entry.set_range(0, 910000.0000)
grid0.addWidget(self.jog_travelz_label, 28, 0)
grid0.addWidget(self.jog_travelz_entry, 28, 1)
par_grid.addWidget(self.jog_travelz_label, 28, 0)
par_grid.addWidget(self.jog_travelz_entry, 28, 1)
self.layout.addStretch(1)

View File

@@ -141,7 +141,7 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI):
)
self.milling_type_radio = RadioSet([{'label': _('Climb'), 'value': 'cl'},
{'label': _('Conventional'), 'value': 'cv'}])
{'label': _('Conventional'), 'value': 'cv'}], compact=True)
self.milling_type_radio.setToolTip(
_("Milling type:\n"
"- climb / best for precision milling and to reduce tool usage\n"
@@ -210,7 +210,7 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI):
# {"label": _("Standard"), "value": "standard"},
# {"label": _("Seed-based"), "value": "seed"},
# {"label": _("Straight lines"), "value": "lines"}
# ], orientation='vertical', stretch=False)
# ], orientation='vertical', compact=True)
self.ncc_method_combo = FCComboBox2()
self.ncc_method_combo.addItems(
[_("Standard"), _("Seed"), _("Lines"), _("Combo")]
@@ -302,7 +302,7 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI):
# {"label": _("Area Selection"), "value": "area"},
# {'label': _('Reference Object'), 'value': 'box'}],
# orientation='vertical',
# stretch=None)
# compact=None)
self.select_combo = FCComboBox2()
self.select_combo.addItems(
[_("Itself"), _("Area Selection"), _("Reference Object")]
@@ -324,7 +324,7 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI):
)
self.area_shape_radio = RadioSet([{'label': _("Square"), 'value': 'square'},
{'label': _("Polygon"), 'value': 'polygon'}])
{'label': _("Polygon"), 'value': 'polygon'}], compact=True)
gen_grid.addWidget(self.area_shape_label, 4, 0)
gen_grid.addWidget(self.area_shape_radio, 4, 1)
@@ -336,7 +336,7 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI):
# ## Plotting type
self.plotting_radio = RadioSet([{'label': _('Normal'), 'value': 'normal'},
{"label": _("Progressive"), "value": "progressive"}])
{"label": _("Progressive"), "value": "progressive"}], compact=True)
plotting_label = FCLabel('%s:' % _("Plotting"))
plotting_label.setToolTip(
_("- 'Normal' - normal plotting, done at the end of the job\n"

View File

@@ -1,7 +1,7 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCComboBox2, FCCheckBox, NumericalEvalTupleEntry, FCLabel, \
FCGridLayout
FCGridLayout, FCFrame
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -25,15 +25,21 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
# ------------------------------
# ## Paint area
# ------------------------------
self.paint_label = FCLabel('<b>%s:</b>' % _('Parameters'))
self.paint_label = FCLabel('<span style="color:blue;"><b>%s</b></span>' % _('Parameters'))
self.paint_label.setToolTip(
_("Creates tool paths to cover the\n"
"whole area of a polygon.")
)
self.layout.addWidget(self.paint_label)
grid0 = FCGridLayout(v_spacing=5, h_spacing=3)
self.layout.addLayout(grid0)
# #############################################################################################################
# Parameters Frame
# #############################################################################################################
par_frame = FCFrame()
self.layout.addWidget(par_frame)
param_grid = FCGridLayout(v_spacing=5, h_spacing=3)
par_frame.setLayout(param_grid)
# Tool dia
ptdlabel = FCLabel('<b><font color="green">%s:</font></b>' % _('Tools Dia'))
@@ -42,20 +48,26 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
"The value of the diameter has to use the dot decimals separator.\n"
"Valid values: 0.3, 1.0")
)
grid0.addWidget(ptdlabel, 0, 0)
param_grid.addWidget(ptdlabel, 0, 0)
self.painttooldia_entry = NumericalEvalTupleEntry(border_color='#0069A9')
self.painttooldia_entry.setPlaceholderText(_("Comma separated values"))
grid0.addWidget(self.painttooldia_entry, 0, 1)
param_grid.addWidget(self.painttooldia_entry, 0, 1)
# Tool Type Radio Button
self.tool_type_label = FCLabel('%s:' % _('Tool Type'))
self.tool_type_label.setToolTip(
_("Default tool type:\n"
"- 'V-shape'\n"
"- Circular")
)
self.paint_order_label = FCLabel('%s:' % _('Tool order'))
self.paint_order_label.setToolTip(_("This set the way that the tools in the tools table are used.\n"
"'No' --> means that the used order is the one in the tool table\n"
"'Forward' --> means that the tools will be ordered from small to big\n"
"'Reverse' --> means that the tools will ordered from big to small\n\n"
"WARNING: using rest machining will automatically set the order\n"
"in reverse and disable this control."))
self.paint_order_combo = FCComboBox2()
self.paint_order_combo.addItems([_('Default'), _('Forward'), _('Reverse')])
param_grid.addWidget(self.paint_order_label, 2, 0)
param_grid.addWidget(self.paint_order_combo, 2, 1)
# Tip Dia
self.tipdialabel = FCLabel('%s:' % _('V-Tip Dia'))
@@ -67,8 +79,8 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
self.tipdia_entry.setSingleStep(0.1)
self.tipdia_entry.setObjectName(_("V-Tip Dia"))
grid0.addWidget(self.tipdialabel, 2, 0)
grid0.addWidget(self.tipdia_entry, 2, 1)
param_grid.addWidget(self.tipdialabel, 4, 0)
param_grid.addWidget(self.tipdia_entry, 4, 1)
# Tip Angle
self.tipanglelabel = FCLabel('%s:' % _('V-Tip Angle'))
@@ -81,8 +93,8 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
self.tipangle_entry.setSingleStep(5)
self.tipangle_entry.setObjectName(_("V-Tip Angle"))
grid0.addWidget(self.tipanglelabel, 3, 0)
grid0.addWidget(self.tipangle_entry, 3, 1)
param_grid.addWidget(self.tipanglelabel, 6, 0)
param_grid.addWidget(self.tipangle_entry, 6, 1)
# Cut Z entry
cutzlabel = FCLabel('%s:' % _('Cut Z'))
@@ -99,8 +111,8 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
_("Depth of cut into material. Negative value.\n"
"In application units.")
)
grid0.addWidget(cutzlabel, 4, 0)
grid0.addWidget(self.cutz_entry, 4, 1)
param_grid.addWidget(cutzlabel, 8, 0)
param_grid.addWidget(self.cutz_entry, 8, 1)
# ### Tool Diameter ####
self.newdialabel = FCLabel('%s:' % _('New Dia'))
@@ -114,33 +126,26 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
self.newdia_entry.set_range(-10000.000, 10000.0000)
self.newdia_entry.setObjectName(_("Tool Dia"))
grid0.addWidget(self.newdialabel, 5, 0)
grid0.addWidget(self.newdia_entry, 5, 1)
param_grid.addWidget(self.newdialabel, 10, 0)
param_grid.addWidget(self.newdia_entry, 10, 1)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
grid0.addWidget(separator_line, 6, 0, 1, 2)
# separator_line = QtWidgets.QFrame()
# separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
# separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
# param_grid.addWidget(separator_line, 6, 0, 1, 2)
self.paint_order_label = FCLabel('%s:' % _('Tool order'))
self.paint_order_label.setToolTip(_("This set the way that the tools in the tools table are used.\n"
"'No' --> means that the used order is the one in the tool table\n"
"'Forward' --> means that the tools will be ordered from small to big\n"
"'Reverse' --> means that the tools will ordered from big to small\n\n"
"WARNING: using rest machining will automatically set the order\n"
"in reverse and disable this control."))
# #############################################################################################################
# Tool Frame
# #############################################################################################################
# ### Tools ## ##
self.tools_table_label = FCLabel('<span style="color:green;"><b>%s</b></span>' % _("Tool Parameters"))
self.layout.addWidget(self.tools_table_label)
self.paint_order_radio = RadioSet([{'label': _('No'), 'value': 'no'},
{'label': _('Forward'), 'value': 'fwd'},
{'label': _('Reverse'), 'value': 'rev'}])
tt_frame = FCFrame()
self.layout.addWidget(tt_frame)
grid0.addWidget(self.paint_order_label, 7, 0)
grid0.addWidget(self.paint_order_radio, 7, 1)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
grid0.addWidget(separator_line, 8, 0, 1, 2)
tool_grid = FCGridLayout(v_spacing=5, h_spacing=3)
tt_frame.setLayout(tool_grid)
# Overlap
ovlabel = FCLabel('%s:' % _('Overlap'))
@@ -159,8 +164,8 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
self.paintoverlap_entry.setRange(0.0000, 99.9999)
self.paintoverlap_entry.setSingleStep(0.1)
grid0.addWidget(ovlabel, 9, 0)
grid0.addWidget(self.paintoverlap_entry, 9, 1)
tool_grid.addWidget(ovlabel, 0, 0)
tool_grid.addWidget(self.paintoverlap_entry, 0, 1)
# Margin
marginlabel = FCLabel('%s:' % _('Margin'))
@@ -174,8 +179,8 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
self.paintmargin_entry.set_precision(self.decimals)
self.paintmargin_entry.setSingleStep(0.1)
grid0.addWidget(marginlabel, 10, 0)
grid0.addWidget(self.paintmargin_entry, 10, 1)
tool_grid.addWidget(marginlabel, 2, 0)
tool_grid.addWidget(self.paintmargin_entry, 2, 1)
# Method
methodlabel = FCLabel('%s:' % _('Method'))
@@ -194,14 +199,14 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
# {"label": _("Standard"), "value": "standard"},
# {"label": _("Seed-based"), "value": "seed"},
# {"label": _("Straight lines"), "value": "lines"}
# ], orientation='vertical', stretch=False)
# ], orientation='vertical', compact=True)
self.paintmethod_combo = FCComboBox2()
self.paintmethod_combo.addItems(
[_("Standard"), _("Seed"), _("Lines"), _("Laser_lines"), _("Combo")]
)
grid0.addWidget(methodlabel, 11, 0)
grid0.addWidget(self.paintmethod_combo, 11, 1)
tool_grid.addWidget(methodlabel, 4, 0)
tool_grid.addWidget(self.paintmethod_combo, 4, 1)
# Connect lines
self.pathconnect_cb = FCCheckBox('%s' % _("Connect"))
@@ -209,7 +214,6 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
_("Draw lines between resulting\n"
"segments to minimize tool lifts.")
)
grid0.addWidget(self.pathconnect_cb, 12, 0)
# Paint contour
self.contour_cb = FCCheckBox('%s' % _("Contour"))
@@ -217,12 +221,24 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
_("Cut around the perimeter of the polygon\n"
"to trim rough edges.")
)
grid0.addWidget(self.contour_cb, 12, 1)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
grid0.addWidget(separator_line, 13, 0, 1, 2)
tool_grid.addWidget(self.pathconnect_cb, 6, 0)
tool_grid.addWidget(self.contour_cb, 6, 1)
# #############################################################################################################
# General Parameters Frame
# #############################################################################################################
self.gen_param_label = FCLabel('<span style="color:indigo;"><b>%s</b></span>' % _("Common Parameters"))
self.gen_param_label.setToolTip(
_("Parameters that are common for all tools.")
)
self.layout.addWidget(self.gen_param_label)
gp_frame = FCFrame()
self.layout.addWidget(gp_frame)
gen_grid = FCGridLayout(v_spacing=5, h_spacing=3)
gp_frame.setLayout(gen_grid)
self.rest_cb = FCCheckBox('%s' % _("Rest"))
self.rest_cb.setObjectName(_("Rest"))
@@ -235,7 +251,7 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
"nothing left to process or there are no more tools.\n\n"
"If not checked, use the standard algorithm.")
)
grid0.addWidget(self.rest_cb, 14, 0, 1, 2)
gen_grid.addWidget(self.rest_cb, 0, 0, 1, 2)
# Polygon selection
selectlabel = FCLabel('%s:' % _('Selection'))
@@ -256,15 +272,15 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
# {"label": _("Reference Object"), "value": "ref"}
# ],
# orientation='vertical',
# stretch=None
# compact=None
# )
self.selectmethod_combo = FCComboBox2()
self.selectmethod_combo.addItems(
[_("All"), _("Polygon Selection"), _("Area Selection"), _("Reference Object")]
)
grid0.addWidget(selectlabel, 15, 0)
grid0.addWidget(self.selectmethod_combo, 15, 1)
gen_grid.addWidget(selectlabel, 2, 0)
gen_grid.addWidget(self.selectmethod_combo, 2, 1)
self.area_shape_label = FCLabel('%s:' % _("Shape"))
self.area_shape_label.setToolTip(
@@ -272,25 +288,28 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
)
self.area_shape_radio = RadioSet([{'label': _("Square"), 'value': 'square'},
{'label': _("Polygon"), 'value': 'polygon'}])
{'label': _("Polygon"), 'value': 'polygon'}], compact=True)
grid0.addWidget(self.area_shape_label, 18, 0)
grid0.addWidget(self.area_shape_radio, 18, 1)
gen_grid.addWidget(self.area_shape_label, 4, 0)
gen_grid.addWidget(self.area_shape_radio, 4, 1)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.Shape.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Shadow.Sunken)
grid0.addWidget(separator_line, 19, 0, 1, 2)
gen_grid.addWidget(separator_line, 6, 0, 1, 2)
# ## Plotting type
self.paint_plotting_radio = RadioSet([{'label': _('Normal'), 'value': 'normal'},
{"label": _("Progressive"), "value": "progressive"}])
{"label": _("Progressive"), "value": "progressive"}],
compact=True)
plotting_label = FCLabel('%s:' % _("Plotting"))
plotting_label.setToolTip(
_("- 'Normal' - normal plotting, done at the end of the job\n"
"- 'Progressive' - each shape is plotted after it is generated")
)
grid0.addWidget(plotting_label, 20, 0)
grid0.addWidget(self.paint_plotting_radio, 20, 1)
gen_grid.addWidget(plotting_label, 8, 0)
gen_grid.addWidget(self.paint_plotting_radio, 8, 1)
self.layout.addStretch()
FCGridLayout.set_common_column_size([tool_grid, param_grid, gen_grid], 0)
self.layout.addStretch(1)