diff --git a/README.md b/README.md
index 501d28a0..09b4835c 100644
--- a/README.md
+++ b/README.md
@@ -15,6 +15,7 @@ CAD program, and create G-Code for Isolation routing.
- in Excellon UI removed the tools table column for Offset Z and used the UI form parameter
- updated the Excellon Editor to add for each tool a 'data' dictionary
- updated all FlatCAM tools to use the new confirmation message that show if the entered value is within range or outside
+- updated all FlatCAM tools to use the new confirmation message for QSpinBoxes, too
16.02.2020
diff --git a/flatcamTools/ToolCalculators.py b/flatcamTools/ToolCalculators.py
index a5b0afca..a7dbda2e 100644
--- a/flatcamTools/ToolCalculators.py
+++ b/flatcamTools/ToolCalculators.py
@@ -103,7 +103,7 @@ class ToolCalculator(FlatCAMTool):
"It is specified by manufacturer.")
)
self.tipAngle_label = QtWidgets.QLabel('%s:' % _("Tip Angle"))
- self.tipAngle_entry = FCSpinner()
+ self.tipAngle_entry = FCSpinner(callback=self.confirmation_message_int)
self.tipAngle_entry.set_range(0,180)
self.tipAngle_entry.setSingleStep(5)
diff --git a/flatcamTools/ToolExtractDrills.py b/flatcamTools/ToolExtractDrills.py
index 05c1e2d0..5a693300 100644
--- a/flatcamTools/ToolExtractDrills.py
+++ b/flatcamTools/ToolExtractDrills.py
@@ -276,7 +276,7 @@ class ToolExtractDrills(FlatCAMTool):
grid3.addWidget(self.prop_label, 2, 0, 1, 2)
# Diameter value
- self.factor_entry = FCDoubleSpinner(suffix='%')
+ self.factor_entry = FCDoubleSpinner(callback=self.confirmation_message, suffix='%')
self.factor_entry.set_precision(self.decimals)
self.factor_entry.set_range(0.0000, 100.0000)
self.factor_entry.setSingleStep(0.1)
diff --git a/flatcamTools/ToolImage.py b/flatcamTools/ToolImage.py
index a87d7d4b..3e8f2d57 100644
--- a/flatcamTools/ToolImage.py
+++ b/flatcamTools/ToolImage.py
@@ -61,7 +61,7 @@ class ToolImage(FlatCAMTool):
ti_form_layout.addRow(self.tf_type_obj_combo_label, self.tf_type_obj_combo)
# DPI value of the imported image
- self.dpi_entry = FCSpinner()
+ self.dpi_entry = FCSpinner(callback=self.confirmation_message_int)
self.dpi_entry.set_range(0, 99999)
self.dpi_label = QtWidgets.QLabel('%s:' % _("DPI value"))
self.dpi_label.setToolTip(_("Specify a DPI value for the image.") )
@@ -87,7 +87,7 @@ class ToolImage(FlatCAMTool):
ti2_form_layout.addRow(self.image_type_label, self.image_type)
# Mask value of the imported image when image monochrome
- self.mask_bw_entry = FCSpinner()
+ self.mask_bw_entry = FCSpinner(callback=self.confirmation_message_int)
self.mask_bw_entry.set_range(0, 255)
self.mask_bw_label = QtWidgets.QLabel("%s B/W:" % _('Mask value'))
@@ -102,7 +102,7 @@ class ToolImage(FlatCAMTool):
ti2_form_layout.addRow(self.mask_bw_label, self.mask_bw_entry)
# Mask value of the imported image for RED color when image color
- self.mask_r_entry = FCSpinner()
+ self.mask_r_entry = FCSpinner(callback=self.confirmation_message_int)
self.mask_r_entry.set_range(0, 255)
self.mask_r_label = QtWidgets.QLabel("%s R:" % _('Mask value'))
@@ -115,7 +115,7 @@ class ToolImage(FlatCAMTool):
ti2_form_layout.addRow(self.mask_r_label, self.mask_r_entry)
# Mask value of the imported image for GREEN color when image color
- self.mask_g_entry = FCSpinner()
+ self.mask_g_entry = FCSpinner(callback=self.confirmation_message_int)
self.mask_g_entry.set_range(0, 255)
self.mask_g_label = QtWidgets.QLabel("%s G:" % _('Mask value'))
@@ -128,7 +128,7 @@ class ToolImage(FlatCAMTool):
ti2_form_layout.addRow(self.mask_g_label, self.mask_g_entry)
# Mask value of the imported image for BLUE color when image color
- self.mask_b_entry = FCSpinner()
+ self.mask_b_entry = FCSpinner(callback=self.confirmation_message_int)
self.mask_b_entry.set_range(0, 255)
self.mask_b_label = QtWidgets.QLabel("%s B:" % _('Mask value'))
diff --git a/flatcamTools/ToolNonCopperClear.py b/flatcamTools/ToolNonCopperClear.py
index 6a03bdf6..b1c5c65e 100644
--- a/flatcamTools/ToolNonCopperClear.py
+++ b/flatcamTools/ToolNonCopperClear.py
@@ -366,7 +366,7 @@ class NonCopperClear(FlatCAMTool, Gerber):
"Higher values = slow processing and slow execution on CNC\n"
"due of too many paths.")
)
- self.ncc_overlap_entry = FCDoubleSpinner(suffix='%')
+ self.ncc_overlap_entry = FCDoubleSpinner(callback=self.confirmation_message, suffix='%')
self.ncc_overlap_entry.set_precision(self.decimals)
self.ncc_overlap_entry.setWrapping(True)
self.ncc_overlap_entry.setRange(0.000, 99.9999)
diff --git a/flatcamTools/ToolOptimal.py b/flatcamTools/ToolOptimal.py
index c5cd509d..876b0ded 100644
--- a/flatcamTools/ToolOptimal.py
+++ b/flatcamTools/ToolOptimal.py
@@ -78,7 +78,7 @@ class ToolOptimal(FlatCAMTool):
self.precision_label = QtWidgets.QLabel('%s:' % _("Precision"))
self.precision_label.setToolTip(_("Number of decimals kept for found distances."))
- self.precision_spinner = FCSpinner()
+ self.precision_spinner = FCSpinner(callback=self.confirmation_message_int)
self.precision_spinner.set_range(2, 10)
self.precision_spinner.setWrapping(True)
form_lay.addRow(self.precision_label, self.precision_spinner)
diff --git a/flatcamTools/ToolPaint.py b/flatcamTools/ToolPaint.py
index abfa7364..d1524a96 100644
--- a/flatcamTools/ToolPaint.py
+++ b/flatcamTools/ToolPaint.py
@@ -334,7 +334,7 @@ class ToolPaint(FlatCAMTool, Gerber):
"Higher values = slow processing and slow execution on CNC\n"
"due of too many paths.")
)
- self.paintoverlap_entry = FCDoubleSpinner(suffix='%')
+ self.paintoverlap_entry = FCDoubleSpinner(callback=self.confirmation_message, suffix='%')
self.paintoverlap_entry.set_precision(3)
self.paintoverlap_entry.setWrapping(True)
self.paintoverlap_entry.setRange(0.0000, 99.9999)
diff --git a/flatcamTools/ToolPanelize.py b/flatcamTools/ToolPanelize.py
index 9a1e5f7a..8aeddabf 100644
--- a/flatcamTools/ToolPanelize.py
+++ b/flatcamTools/ToolPanelize.py
@@ -182,7 +182,7 @@ class Panelize(FlatCAMTool):
form_layout.addRow(self.spacing_rows_label, self.spacing_rows)
# Columns
- self.columns = FCSpinner()
+ self.columns = FCSpinner(callback=self.confirmation_message_int)
self.columns.set_range(0, 9999)
self.columns_label = QtWidgets.QLabel('%s:' % _("Columns"))
@@ -192,7 +192,7 @@ class Panelize(FlatCAMTool):
form_layout.addRow(self.columns_label, self.columns)
# Rows
- self.rows = FCSpinner()
+ self.rows = FCSpinner(callback=self.confirmation_message_int)
self.rows.set_range(0, 9999)
self.rows_label = QtWidgets.QLabel('%s:' % _("Rows"))
diff --git a/flatcamTools/ToolPcbWizard.py b/flatcamTools/ToolPcbWizard.py
index 753b6667..fbd57896 100644
--- a/flatcamTools/ToolPcbWizard.py
+++ b/flatcamTools/ToolPcbWizard.py
@@ -90,7 +90,7 @@ class PcbWizard(FlatCAMTool):
self.layout.addLayout(form_layout1)
# Integral part of the coordinates
- self.int_entry = FCSpinner()
+ self.int_entry = FCSpinner(callback=self.confirmation_message_int)
self.int_entry.set_range(1, 10)
self.int_label = QtWidgets.QLabel('%s:' % _("Int. digits"))
self.int_label.setToolTip(
@@ -99,7 +99,7 @@ class PcbWizard(FlatCAMTool):
form_layout1.addRow(self.int_label, self.int_entry)
# Fractional part of the coordinates
- self.frac_entry = FCSpinner()
+ self.frac_entry = FCSpinner(callback=self.confirmation_message_int)
self.frac_entry.set_range(1, 10)
self.frac_label = QtWidgets.QLabel('%s:' % _("Frac. digits"))
self.frac_label.setToolTip(
diff --git a/flatcamTools/ToolPunchGerber.py b/flatcamTools/ToolPunchGerber.py
index 75bf2495..b0f5c326 100644
--- a/flatcamTools/ToolPunchGerber.py
+++ b/flatcamTools/ToolPunchGerber.py
@@ -298,7 +298,7 @@ class ToolPunchGerber(FlatCAMTool):
grid0.addWidget(self.prop_label, 12, 0, 1, 2)
# Diameter value
- self.factor_entry = FCDoubleSpinner(suffix='%')
+ self.factor_entry = FCDoubleSpinner(callback=self.confirmation_message, suffix='%')
self.factor_entry.set_precision(self.decimals)
self.factor_entry.set_range(0.0000, 100.0000)
self.factor_entry.setSingleStep(0.1)
diff --git a/flatcamTools/ToolQRCode.py b/flatcamTools/ToolQRCode.py
index 7e5aac40..a70b1f63 100644
--- a/flatcamTools/ToolQRCode.py
+++ b/flatcamTools/ToolQRCode.py
@@ -101,7 +101,7 @@ class QRCode(FlatCAMTool):
_("QRCode version can have values from 1 (21x21 boxes)\n"
"to 40 (177x177 boxes).")
)
- self.version_entry = FCSpinner()
+ self.version_entry = FCSpinner(callback=self.confirmation_message_int)
self.version_entry.set_range(1, 40)
self.version_entry.setWrapping(True)
@@ -137,7 +137,7 @@ class QRCode(FlatCAMTool):
_("Box size control the overall size of the QRcode\n"
"by adjusting the size of each box in the code.")
)
- self.bsize_entry = FCSpinner()
+ self.bsize_entry = FCSpinner(callback=self.confirmation_message_int)
self.bsize_entry.set_range(1, 9999)
self.bsize_entry.setWrapping(True)
@@ -150,7 +150,7 @@ class QRCode(FlatCAMTool):
_("Size of the QRCode border. How many boxes thick is the border.\n"
"Default value is 4. The width of the clearance around the QRCode.")
)
- self.border_size_entry = FCSpinner()
+ self.border_size_entry = FCSpinner(callback=self.confirmation_message_int)
self.border_size_entry.set_range(1, 9999)
self.border_size_entry.setWrapping(True)
self.border_size_entry.set_value(4)
diff --git a/flatcamTools/ToolSolderPaste.py b/flatcamTools/ToolSolderPaste.py
index 9f268a3e..0626a4c9 100644
--- a/flatcamTools/ToolSolderPaste.py
+++ b/flatcamTools/ToolSolderPaste.py
@@ -282,7 +282,7 @@ class SolderPaste(FlatCAMTool):
self.gcode_form_layout.addRow(self.frz_dispense_label, self.frz_dispense_entry)
# Spindle Speed Forward
- self.speedfwd_entry = FCSpinner()
+ self.speedfwd_entry = FCSpinner(callback=self.confirmation_message_int)
self.speedfwd_entry.set_range(0, 999999)
self.speedfwd_entry.setSingleStep(1000)
@@ -306,7 +306,7 @@ class SolderPaste(FlatCAMTool):
self.gcode_form_layout.addRow(self.dwellfwd_label, self.dwellfwd_entry)
# Spindle Speed Reverse
- self.speedrev_entry = FCSpinner()
+ self.speedrev_entry = FCSpinner(callback=self.confirmation_message_int)
self.speedrev_entry.set_range(0, 999999)
self.speedrev_entry.setSingleStep(1000)
diff --git a/flatcamTools/ToolTransform.py b/flatcamTools/ToolTransform.py
index aa5bd6c7..cebe6953 100644
--- a/flatcamTools/ToolTransform.py
+++ b/flatcamTools/ToolTransform.py
@@ -380,7 +380,7 @@ class ToolTransform(FlatCAMTool):
"of the initial dimension.")
)
- self.buffer_factor_entry = FCDoubleSpinner(suffix='%')
+ self.buffer_factor_entry = FCDoubleSpinner(callback=self.confirmation_message, suffix='%')
self.buffer_factor_entry.set_range(-100.0000, 1000.0000)
self.buffer_factor_entry.set_precision(self.decimals)
self.buffer_factor_entry.setWrapping(True)