- optimized the UI in Extract Drills Tool
- added some more icons for buttons
This commit is contained in:
parent
084643eb95
commit
3ef4264576
|
@ -29,6 +29,8 @@ CHANGELOG for FlatCAM beta
|
|||
- improvements in the Punch Gerber Tool aperture markings
|
||||
- improved the Geometry Object functionality in regards of Tools DB, deleting a tool and adding a tool
|
||||
- when using the 'T' shortcut key with Properties Tab in focus and populated with the properties of a Geometry Object made the popped up spinner to have the value autoselected
|
||||
- optimized the UI in Extract Drills Tool
|
||||
- added some more icons for buttons
|
||||
|
||||
28.10.2020
|
||||
|
||||
|
|
|
@ -479,6 +479,7 @@ class AlignUI:
|
|||
|
||||
# Buttons
|
||||
self.align_object_button =FCButton(_("Align Object"))
|
||||
self.align_object_button.setIcon(QtGui.QIcon(self.app.resource_location + '/align16.png'))
|
||||
self.align_object_button.setToolTip(
|
||||
_("Align the specified object to the aligner object.\n"
|
||||
"If only one point is used then it assumes translation.\n"
|
||||
|
|
|
@ -706,6 +706,7 @@ class DsidedUI:
|
|||
|
||||
# Add a reference
|
||||
self.add_point_button = QtWidgets.QPushButton(_("Add"))
|
||||
self.add_point_button.setIcon(QtGui.QIcon(self.app.resource_location + '/plus16.png'))
|
||||
self.add_point_button.setToolTip(
|
||||
_("Add the coordinates in format <b>(x, y)</b> through which the mirroring axis\n "
|
||||
"selected in 'MIRROR AXIS' pass.\n"
|
||||
|
@ -893,6 +894,7 @@ class DsidedUI:
|
|||
grid5.addWidget(self.alignment_holes, 1, 0, 1, 2)
|
||||
|
||||
self.add_drill_point_button = FCButton(_("Add"))
|
||||
self.add_drill_point_button.setIcon(QtGui.QIcon(self.app.resource_location + '/plus16.png'))
|
||||
self.add_drill_point_button.setToolTip(
|
||||
_("Add alignment drill holes coordinates in the format: (x1, y1), (x2, y2), ... \n"
|
||||
"on one side of the alignment axis.\n\n"
|
||||
|
@ -910,6 +912,7 @@ class DsidedUI:
|
|||
# """)
|
||||
|
||||
self.delete_drill_point_button = FCButton(_("Delete Last"))
|
||||
self.delete_drill_point_button.setIcon(QtGui.QIcon(self.app.resource_location + '/trash32.png'))
|
||||
self.delete_drill_point_button.setToolTip(
|
||||
_("Delete the last coordinates tuple in the list.")
|
||||
)
|
||||
|
|
|
@ -381,35 +381,35 @@ class ToolExtractDrills(AppTool):
|
|||
|
||||
def on_hole_size_toggle(self, val):
|
||||
if val == "fixed":
|
||||
self.ui.fixed_label.setDisabled(False)
|
||||
self.ui.dia_entry.setDisabled(False)
|
||||
self.ui.dia_label.setDisabled(False)
|
||||
self.ui.fixed_label.setVisible(True)
|
||||
self.ui.dia_entry.setVisible(True)
|
||||
self.ui.dia_label.setVisible(True)
|
||||
|
||||
self.ui.ring_frame.setDisabled(True)
|
||||
self.ui.ring_frame.setVisible(False)
|
||||
|
||||
self.ui.prop_label.setDisabled(True)
|
||||
self.ui.factor_label.setDisabled(True)
|
||||
self.ui.factor_entry.setDisabled(True)
|
||||
self.ui.prop_label.setVisible(False)
|
||||
self.ui.factor_label.setVisible(False)
|
||||
self.ui.factor_entry.setVisible(False)
|
||||
elif val == "ring":
|
||||
self.ui.fixed_label.setDisabled(True)
|
||||
self.ui.dia_entry.setDisabled(True)
|
||||
self.ui.dia_label.setDisabled(True)
|
||||
self.ui.fixed_label.setVisible(False)
|
||||
self.ui.dia_entry.setVisible(False)
|
||||
self.ui.dia_label.setVisible(False)
|
||||
|
||||
self.ui.ring_frame.setDisabled(False)
|
||||
self.ui.ring_frame.setVisible(True)
|
||||
|
||||
self.ui.prop_label.setDisabled(True)
|
||||
self.ui.factor_label.setDisabled(True)
|
||||
self.ui.factor_entry.setDisabled(True)
|
||||
self.ui.prop_label.setVisible(False)
|
||||
self.ui.factor_label.setVisible(False)
|
||||
self.ui.factor_entry.setVisible(False)
|
||||
elif val == "prop":
|
||||
self.ui.fixed_label.setDisabled(True)
|
||||
self.ui.dia_entry.setDisabled(True)
|
||||
self.ui.dia_label.setDisabled(True)
|
||||
self.ui.fixed_label.setVisible(False)
|
||||
self.ui.dia_entry.setVisible(False)
|
||||
self.ui.dia_label.setVisible(False)
|
||||
|
||||
self.ui.ring_frame.setDisabled(True)
|
||||
self.ui.ring_frame.setVisible(False)
|
||||
|
||||
self.ui.prop_label.setDisabled(False)
|
||||
self.ui.factor_label.setDisabled(False)
|
||||
self.ui.factor_entry.setDisabled(False)
|
||||
self.ui.prop_label.setVisible(True)
|
||||
self.ui.factor_label.setVisible(True)
|
||||
self.ui.factor_entry.setVisible(True)
|
||||
|
||||
def reset_fields(self):
|
||||
self.ui.gerber_object_combo.setRootModelIndex(self.app.collection.index(0, 0, QtCore.QModelIndex()))
|
||||
|
@ -530,8 +530,8 @@ class ExtractDrillsUI:
|
|||
self.hole_size_radio = RadioSet(
|
||||
[
|
||||
{'label': _("Fixed Diameter"), 'value': 'fixed'},
|
||||
{'label': _("Fixed Annular Ring"), 'value': 'ring'},
|
||||
{'label': _("Proportional"), 'value': 'prop'}
|
||||
{'label': _("Proportional"), 'value': 'prop'},
|
||||
{'label': _("Fixed Annular Ring"), 'value': 'ring'}
|
||||
],
|
||||
orientation='vertical',
|
||||
stretch=False)
|
||||
|
@ -562,11 +562,6 @@ class ExtractDrillsUI:
|
|||
grid1.addWidget(self.dia_label, 8, 0)
|
||||
grid1.addWidget(self.dia_entry, 8, 1)
|
||||
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
grid1.addWidget(separator_line, 9, 0, 1, 2)
|
||||
|
||||
self.ring_frame = QtWidgets.QFrame()
|
||||
self.ring_frame.setContentsMargins(0, 0, 0, 0)
|
||||
self.layout.addWidget(self.ring_frame)
|
||||
|
@ -660,11 +655,6 @@ class ExtractDrillsUI:
|
|||
grid3.setColumnStretch(0, 0)
|
||||
grid3.setColumnStretch(1, 1)
|
||||
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
grid3.addWidget(separator_line, 1, 0, 1, 2)
|
||||
|
||||
# Annular Ring value
|
||||
self.prop_label = QtWidgets.QLabel('<b>%s</b>' % _("Proportional Diameter"))
|
||||
grid3.addWidget(self.prop_label, 2, 0, 1, 2)
|
||||
|
@ -684,6 +674,11 @@ class ExtractDrillsUI:
|
|||
grid3.addWidget(self.factor_label, 3, 0)
|
||||
grid3.addWidget(self.factor_entry, 3, 1)
|
||||
|
||||
separator_line = QtWidgets.QFrame()
|
||||
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
grid3.addWidget(separator_line, 5, 0, 1, 2)
|
||||
|
||||
# Extract drills from Gerber apertures flashes (pads)
|
||||
self.e_drills_button = QtWidgets.QPushButton(_("Extract Drills"))
|
||||
self.e_drills_button.setIcon(QtGui.QIcon(self.app.resource_location + '/drill16.png'))
|
||||
|
@ -720,12 +715,12 @@ class ExtractDrillsUI:
|
|||
self.rectangular_ring_entry.setEnabled(False)
|
||||
self.other_ring_entry.setEnabled(False)
|
||||
|
||||
self.dia_entry.setDisabled(True)
|
||||
self.dia_label.setDisabled(True)
|
||||
self.factor_label.setDisabled(True)
|
||||
self.factor_entry.setDisabled(True)
|
||||
self.dia_entry.setVisible(False)
|
||||
self.dia_label.setVisible(False)
|
||||
self.factor_label.setVisible(False)
|
||||
self.factor_entry.setVisible(False)
|
||||
|
||||
self.ring_frame.setDisabled(True)
|
||||
self.ring_frame.setVisible(False)
|
||||
# #################################### FINSIHED GUI ###########################
|
||||
# #############################################################################
|
||||
|
||||
|
|
Loading…
Reference in New Issue