- PEP8 changes and PyCharm suggestions
This commit is contained in:
committed by
Marius Stanciu
parent
9abe11ff42
commit
dea7ce3028
@@ -1,7 +1,7 @@
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt5.QtCore import QSettings
|
||||
|
||||
from appGUI.GUIElements import FCSpinner, RadioSet
|
||||
from appGUI.GUIElements import FCSpinner, RadioSet, FCLabel
|
||||
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
|
||||
|
||||
import gettext
|
||||
@@ -28,7 +28,7 @@ class GeometryEditorPrefGroupUI(OptionsGroupUI):
|
||||
self.decimals = decimals
|
||||
|
||||
# Editor Parameters
|
||||
self.param_label = QtWidgets.QLabel("<b>%s:</b>" % _("Parameters"))
|
||||
self.param_label = FCLabel("<b>%s:</b>" % _("Parameters"))
|
||||
self.param_label.setToolTip(
|
||||
_("A list of Editor parameters.")
|
||||
)
|
||||
@@ -38,7 +38,7 @@ class GeometryEditorPrefGroupUI(OptionsGroupUI):
|
||||
self.layout.addLayout(grid0)
|
||||
|
||||
# Selection Limit
|
||||
self.sel_limit_label = QtWidgets.QLabel('%s:' % _("Selection limit"))
|
||||
self.sel_limit_label = FCLabel('%s:' % _("Selection limit"))
|
||||
self.sel_limit_label.setToolTip(
|
||||
_("Set the number of selected geometry\n"
|
||||
"items above which the utility geometry\n"
|
||||
@@ -53,7 +53,7 @@ class GeometryEditorPrefGroupUI(OptionsGroupUI):
|
||||
grid0.addWidget(self.sel_limit_entry, 0, 1)
|
||||
|
||||
# Milling Type
|
||||
milling_type_label = QtWidgets.QLabel('%s:' % _('Milling Type'))
|
||||
milling_type_label = FCLabel('%s:' % _('Milling Type'))
|
||||
milling_type_label.setToolTip(
|
||||
_("Milling type:\n"
|
||||
"- climb / best for precision milling and to reduce tool usage\n"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt5.QtCore import QSettings
|
||||
|
||||
from appGUI.GUIElements import FCCheckBox, FCSpinner, FCEntry, FCColorEntry, RadioSet
|
||||
from appGUI.GUIElements import FCCheckBox, FCSpinner, FCEntry, FCColorEntry, RadioSet, FCLabel
|
||||
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
|
||||
|
||||
import platform
|
||||
@@ -30,7 +30,7 @@ class GeometryGenPrefGroupUI(OptionsGroupUI):
|
||||
self.decimals = decimals
|
||||
|
||||
# ## Plot options
|
||||
self.plot_options_label = QtWidgets.QLabel("<b>%s:</b>" % _("Plot Options"))
|
||||
self.plot_options_label = FCLabel("<b>%s:</b>" % _("Plot Options"))
|
||||
self.layout.addWidget(self.plot_options_label)
|
||||
|
||||
plot_hlay = QtWidgets.QHBoxLayout()
|
||||
@@ -56,7 +56,7 @@ class GeometryGenPrefGroupUI(OptionsGroupUI):
|
||||
grid0.setColumnStretch(1, 1)
|
||||
|
||||
# Number of circle steps for circular aperture linear approximation
|
||||
self.circle_steps_label = QtWidgets.QLabel('%s:' % _("Circle Steps"))
|
||||
self.circle_steps_label = FCLabel('%s:' % _("Circle Steps"))
|
||||
self.circle_steps_label.setToolTip(
|
||||
_("The number of circle steps for <b>Geometry</b> \n"
|
||||
"circle and arc shapes linear approximation.")
|
||||
@@ -68,11 +68,11 @@ class GeometryGenPrefGroupUI(OptionsGroupUI):
|
||||
grid0.addWidget(self.circle_steps_entry, 1, 1)
|
||||
|
||||
# Tools
|
||||
self.tools_label = QtWidgets.QLabel("<b>%s:</b>" % _("Tools"))
|
||||
self.tools_label = FCLabel("<b>%s:</b>" % _("Tools"))
|
||||
grid0.addWidget(self.tools_label, 2, 0, 1, 2)
|
||||
|
||||
# Tooldia
|
||||
tdlabel = QtWidgets.QLabel('<b><font color="green">%s:</font></b>' % _('Tools Dia'))
|
||||
tdlabel = FCLabel('<b><font color="green">%s:</font></b>' % _('Tools Dia'))
|
||||
tdlabel.setToolTip(
|
||||
_("Diameters of the tools, separated by comma.\n"
|
||||
"The value of the diameter has to use the dot decimals separator.\n"
|
||||
@@ -88,10 +88,10 @@ class GeometryGenPrefGroupUI(OptionsGroupUI):
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
grid0.addWidget(separator_line, 9, 0, 1, 2)
|
||||
|
||||
self.opt_label = QtWidgets.QLabel("<b>%s:</b>" % _("Path Optimization"))
|
||||
self.opt_label = FCLabel("<b>%s:</b>" % _("Path Optimization"))
|
||||
grid0.addWidget(self.opt_label, 10, 0, 1, 2)
|
||||
|
||||
self.opt_algorithm_label = QtWidgets.QLabel(_('Algorithm:'))
|
||||
self.opt_algorithm_label = FCLabel(_('Algorithm:'))
|
||||
self.opt_algorithm_label.setToolTip(
|
||||
_("This sets the path optimization algorithm.\n"
|
||||
"- Rtre -> Rtree algorithm\n"
|
||||
@@ -114,7 +114,7 @@ class GeometryGenPrefGroupUI(OptionsGroupUI):
|
||||
grid0.addWidget(self.opt_algorithm_label, 12, 0)
|
||||
grid0.addWidget(self.opt_algorithm_radio, 12, 1)
|
||||
|
||||
self.optimization_time_label = QtWidgets.QLabel('%s:' % _('Duration'))
|
||||
self.optimization_time_label = FCLabel('%s:' % _('Duration'))
|
||||
self.optimization_time_label.setToolTip(
|
||||
_("When OR-Tools Metaheuristic (MH) is enabled there is a\n"
|
||||
"maximum threshold for how much time is spent doing the\n"
|
||||
@@ -135,7 +135,7 @@ class GeometryGenPrefGroupUI(OptionsGroupUI):
|
||||
grid0.addWidget(separator_line, 16, 0, 1, 2)
|
||||
|
||||
# Fuse Tools
|
||||
self.join_geo_label = QtWidgets.QLabel('<b>%s</b>:' % _('Join Option'))
|
||||
self.join_geo_label = FCLabel('<b>%s</b>:' % _('Join Option'))
|
||||
grid0.addWidget(self.join_geo_label, 18, 0, 1, 2)
|
||||
|
||||
self.fuse_tools_cb = FCCheckBox(_("Fuse Tools"))
|
||||
@@ -151,11 +151,11 @@ class GeometryGenPrefGroupUI(OptionsGroupUI):
|
||||
grid0.addWidget(separator_line, 22, 0, 1, 2)
|
||||
|
||||
# Geometry Object Color
|
||||
self.gerber_color_label = QtWidgets.QLabel('<b>%s</b>:' % _('Object Color'))
|
||||
self.gerber_color_label = FCLabel('<b>%s</b>:' % _('Object Color'))
|
||||
grid0.addWidget(self.gerber_color_label, 24, 0, 1, 2)
|
||||
|
||||
# Plot Line Color
|
||||
self.line_color_label = QtWidgets.QLabel('%s:' % _('Outline'))
|
||||
self.line_color_label = FCLabel('%s:' % _('Outline'))
|
||||
self.line_color_label.setToolTip(
|
||||
_("Set the line color for plotted objects.")
|
||||
)
|
||||
|
||||
@@ -2,7 +2,7 @@ from PyQt5 import QtWidgets
|
||||
from PyQt5.QtCore import Qt, QSettings
|
||||
|
||||
from appGUI.GUIElements import FCDoubleSpinner, FCCheckBox, OptionalInputSection, FCSpinner, FCComboBox, \
|
||||
NumericalEvalTupleEntry
|
||||
NumericalEvalTupleEntry, FCLabel
|
||||
from appGUI.preferences import machinist_setting
|
||||
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
|
||||
|
||||
@@ -32,7 +32,7 @@ class GeometryOptPrefGroupUI(OptionsGroupUI):
|
||||
# ------------------------------
|
||||
# ## Create CNC Job
|
||||
# ------------------------------
|
||||
self.cncjob_label = QtWidgets.QLabel('<b>%s:</b>' % _('Create CNCJob'))
|
||||
self.cncjob_label = FCLabel('<b>%s:</b>' % _('Create CNCJob'))
|
||||
self.cncjob_label.setToolTip(
|
||||
_("Create a CNC Job object\n"
|
||||
"tracing the contours of this\n"
|
||||
@@ -46,7 +46,7 @@ class GeometryOptPrefGroupUI(OptionsGroupUI):
|
||||
grid1.setColumnStretch(1, 1)
|
||||
|
||||
# Cut Z
|
||||
cutzlabel = QtWidgets.QLabel('%s:' % _('Cut Z'))
|
||||
cutzlabel = FCLabel('%s:' % _('Cut Z'))
|
||||
cutzlabel.setToolTip(
|
||||
_("Cutting depth (negative)\n"
|
||||
"below the copper surface.")
|
||||
@@ -78,7 +78,7 @@ class GeometryOptPrefGroupUI(OptionsGroupUI):
|
||||
grid1.addWidget(self.multidepth_cb, 1, 0)
|
||||
|
||||
# Depth/pass
|
||||
dplabel = QtWidgets.QLabel('%s:' % _('Depth/Pass'))
|
||||
dplabel = FCLabel('%s:' % _('Depth/Pass'))
|
||||
dplabel.setToolTip(
|
||||
_("The depth to cut on each pass,\n"
|
||||
"when multidepth is enabled.\n"
|
||||
@@ -99,7 +99,7 @@ class GeometryOptPrefGroupUI(OptionsGroupUI):
|
||||
self.ois_multidepth = OptionalInputSection(self.multidepth_cb, [self.depthperpass_entry])
|
||||
|
||||
# Travel Z
|
||||
travelzlabel = QtWidgets.QLabel('%s:' % _('Travel Z'))
|
||||
travelzlabel = FCLabel('%s:' % _('Travel Z'))
|
||||
travelzlabel.setToolTip(
|
||||
_("Height of the tool when\n"
|
||||
"moving without cutting.")
|
||||
@@ -129,7 +129,7 @@ class GeometryOptPrefGroupUI(OptionsGroupUI):
|
||||
grid1.addWidget(self.toolchange_cb, 4, 0, 1, 2)
|
||||
|
||||
# Toolchange Z
|
||||
toolchangezlabel = QtWidgets.QLabel('%s:' % _('Toolchange Z'))
|
||||
toolchangezlabel = FCLabel('%s:' % _('Toolchange Z'))
|
||||
toolchangezlabel.setToolTip(
|
||||
_(
|
||||
"Z-axis position (height) for\n"
|
||||
@@ -151,7 +151,7 @@ class GeometryOptPrefGroupUI(OptionsGroupUI):
|
||||
grid1.addWidget(self.toolchangez_entry, 5, 1)
|
||||
|
||||
# End move Z
|
||||
endz_label = QtWidgets.QLabel('%s:' % _('End move Z'))
|
||||
endz_label = FCLabel('%s:' % _('End move Z'))
|
||||
endz_label.setToolTip(
|
||||
_("Height of the tool after\n"
|
||||
"the last move at the end of the job.")
|
||||
@@ -171,7 +171,7 @@ class GeometryOptPrefGroupUI(OptionsGroupUI):
|
||||
grid1.addWidget(self.endz_entry, 6, 1)
|
||||
|
||||
# End Move X,Y
|
||||
endmove_xy_label = QtWidgets.QLabel('%s:' % _('End move X,Y'))
|
||||
endmove_xy_label = FCLabel('%s:' % _('End move X,Y'))
|
||||
endmove_xy_label.setToolTip(
|
||||
_("End move X,Y position. In format (x,y).\n"
|
||||
"If no value is entered then there is no move\n"
|
||||
@@ -183,7 +183,7 @@ class GeometryOptPrefGroupUI(OptionsGroupUI):
|
||||
grid1.addWidget(self.endxy_entry, 7, 1)
|
||||
|
||||
# Feedrate X-Y
|
||||
frlabel = QtWidgets.QLabel('%s:' % _('Feedrate X-Y'))
|
||||
frlabel = FCLabel('%s:' % _('Feedrate X-Y'))
|
||||
frlabel.setToolTip(
|
||||
_("Cutting speed in the XY\n"
|
||||
"plane in units per minute")
|
||||
@@ -198,7 +198,7 @@ class GeometryOptPrefGroupUI(OptionsGroupUI):
|
||||
grid1.addWidget(self.cncfeedrate_entry, 8, 1)
|
||||
|
||||
# Feedrate Z (Plunge)
|
||||
frz_label = QtWidgets.QLabel('%s:' % _('Feedrate Z'))
|
||||
frz_label = FCLabel('%s:' % _('Feedrate Z'))
|
||||
frz_label.setToolTip(
|
||||
_("Cutting speed in the XY\n"
|
||||
"plane in units per minute.\n"
|
||||
@@ -214,7 +214,7 @@ class GeometryOptPrefGroupUI(OptionsGroupUI):
|
||||
grid1.addWidget(self.feedrate_z_entry, 9, 1)
|
||||
|
||||
# Spindle Speed
|
||||
spdlabel = QtWidgets.QLabel('%s:' % _('Spindle speed'))
|
||||
spdlabel = FCLabel('%s:' % _('Spindle speed'))
|
||||
spdlabel.setToolTip(
|
||||
_(
|
||||
"Speed of the spindle in RPM (optional).\n"
|
||||
@@ -235,7 +235,7 @@ class GeometryOptPrefGroupUI(OptionsGroupUI):
|
||||
_("Pause to allow the spindle to reach its\n"
|
||||
"speed before cutting.")
|
||||
)
|
||||
dwelltime = QtWidgets.QLabel('%s:' % _('Duration'))
|
||||
dwelltime = FCLabel('%s:' % _('Duration'))
|
||||
dwelltime.setToolTip(
|
||||
_("Number of time units for spindle to dwell.")
|
||||
)
|
||||
@@ -252,7 +252,7 @@ class GeometryOptPrefGroupUI(OptionsGroupUI):
|
||||
self.ois_dwell = OptionalInputSection(self.dwell_cb, [self.dwelltime_entry])
|
||||
|
||||
# preprocessor selection
|
||||
pp_label = QtWidgets.QLabel('%s:' % _("Preprocessor"))
|
||||
pp_label = FCLabel('%s:' % _("Preprocessor"))
|
||||
pp_label.setToolTip(
|
||||
_("The Preprocessor file that dictates\n"
|
||||
"the Machine Code (like GCode, RML, HPGL) output.")
|
||||
|
||||
Reference in New Issue
Block a user