Ver Fonte

- updated all FlatCAM tools to use the new confirmation message for QSpinBoxes, too

Marius Stanciu há 6 anos atrás
pai
commit
ea1b99242c

+ 1 - 0
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
 

+ 1 - 1
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)
 

+ 1 - 1
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)

+ 5 - 5
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>B/W</b>:" % _('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 <b>R:</b>" % _('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 <b>G:</b>" % _('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>B:</b>" % _('Mask value'))

+ 1 - 1
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)

+ 1 - 1
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)

+ 1 - 1
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)

+ 2 - 2
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"))

+ 2 - 2
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(

+ 1 - 1
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)

+ 3 - 3
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)

+ 2 - 2
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)
 

+ 1 - 1
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)