- more changes in strings throughout the app

- made some minor changes in the GUI of the FlatCAM Tools
- in Tools Database made sure that each new tool added has a unique name
- in AppTool made some methods to be class methods
This commit is contained in:
Marius Stanciu
2020-06-01 06:16:14 +03:00
committed by Marius
parent c1fb0b5cdb
commit 57a969afdd
14 changed files with 137 additions and 75 deletions

View File

@@ -64,7 +64,7 @@ class ToolCalibration(AppTool):
grid_lay.setColumnStretch(1, 1)
grid_lay.setColumnStretch(2, 0)
self.gcode_title_label = QtWidgets.QLabel('<b>%s</b>' % _('GCode Parameters'))
self.gcode_title_label = QtWidgets.QLabel('<b>%s:</b>' % _('Parameters'))
self.gcode_title_label.setToolTip(
_("Parameters used when creating the GCode in this tool.")
)

View File

@@ -77,8 +77,12 @@ class ToolCopperThieving(AppTool):
)
i_grid_lay.addWidget(self.grbobj_label, 0, 0)
i_grid_lay.addWidget(self.grb_object_combo, 0, 1, 1, 2)
i_grid_lay.addWidget(QtWidgets.QLabel(''), 1, 0)
i_grid_lay.addWidget(self.grb_object_combo, 1, 0, 1, 2)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
i_grid_lay.addWidget(separator_line, 2, 0, 1, 2)
# ## Grid Layout
grid_lay = QtWidgets.QGridLayout()

View File

@@ -78,7 +78,10 @@ class ToolEtchCompensation(AppTool):
grid0.addWidget(self.gerber_label, 1, 0, 1, 2)
grid0.addWidget(self.gerber_combo, 2, 0, 1, 2)
grid0.addWidget(QtWidgets.QLabel(""), 3, 0, 1, 2)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
grid0.addWidget(separator_line, 3, 0, 1, 2)
self.util_label = QtWidgets.QLabel("<b>%s:</b>" % _("Utilities"))
self.util_label.setToolTip('%s.' % _("Conversion utilities"))
@@ -127,7 +130,10 @@ class ToolEtchCompensation(AppTool):
hlay_2.addWidget(self.mils_to_um_entry)
grid0.addLayout(hlay_2, 8, 0, 1, 2)
grid0.addWidget(QtWidgets.QLabel(""), 9, 0, 1, 2)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
grid0.addWidget(separator_line, 9, 0, 1, 2)
self.param_label = QtWidgets.QLabel("<b>%s:</b>" % _("Parameters"))
self.param_label.setToolTip('%s.' % _("Parameters for this tool"))

View File

@@ -63,9 +63,6 @@ class ToolFiducials(AppTool):
self.points_table = FCTable()
self.points_table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
self.layout.addWidget(self.points_table)
self.layout.addWidget(QtWidgets.QLabel(''))
self.points_table.setColumnCount(3)
self.points_table.setHorizontalHeaderLabels(
[
@@ -76,7 +73,6 @@ class ToolFiducials(AppTool):
)
self.points_table.setRowCount(3)
row = 0
flags = QtCore.Qt.ItemIsEnabled
# BOTTOM LEFT
@@ -140,6 +136,13 @@ class ToolFiducials(AppTool):
for row in range(self.points_table.rowCount()):
self.points_table.cellWidget(row, 2).setFrame(False)
self.layout.addWidget(self.points_table)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
self.layout.addWidget(separator_line)
# ## Grid Layout
grid_lay = QtWidgets.QGridLayout()
self.layout.addLayout(grid_lay)

View File

@@ -77,7 +77,10 @@ class ToolInvertGerber(AppTool):
grid0.addWidget(self.gerber_label, 1, 0, 1, 2)
grid0.addWidget(self.gerber_combo, 2, 0, 1, 2)
grid0.addWidget(QtWidgets.QLabel(""), 3, 0, 1, 2)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
grid0.addWidget(separator_line, 3, 0, 1, 2)
self.param_label = QtWidgets.QLabel("<b>%s:</b>" % _("Parameters"))
self.param_label.setToolTip('%s.' % _("Parameters for this tool"))

View File

@@ -72,7 +72,13 @@ class ToolOptimal(AppTool):
self.gerber_object_label.setToolTip(
"Gerber object for which to find the minimum distance between copper features."
)
form_lay.addRow(self.gerber_object_label, self.gerber_object_combo)
form_lay.addRow(self.gerber_object_label)
form_lay.addRow(self.gerber_object_combo)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
form_lay.addRow(separator_line)
# Precision = nr of decimals
self.precision_label = QtWidgets.QLabel('%s:' % _("Precision"))

View File

@@ -75,14 +75,35 @@ class QRCode(AppTool):
self.grb_object_combo.is_last = True
self.grb_object_combo.obj_type = "Gerber"
self.grbobj_label = QtWidgets.QLabel("<b>%s:</b>" % _("Object"))
self.grbobj_label = QtWidgets.QLabel("<b>%s:</b>" % _("GERBER"))
self.grbobj_label.setToolTip(
_("Gerber Object to which the QRCode will be added.")
)
i_grid_lay.addWidget(self.grbobj_label, 0, 0)
i_grid_lay.addWidget(self.grb_object_combo, 0, 1, 1, 2)
i_grid_lay.addWidget(QtWidgets.QLabel(''), 1, 0)
i_grid_lay.addWidget(self.grb_object_combo, 1, 0, 1, 2)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
i_grid_lay.addWidget(separator_line, 2, 0, 1, 2)
# Text box
self.text_label = QtWidgets.QLabel('<b>%s</b>:' % _("QRCode Data"))
self.text_label.setToolTip(
_("QRCode Data. Alphanumeric text to be encoded in the QRCode.")
)
self.text_data = FCTextArea()
self.text_data.setPlaceholderText(
_("Add here the text to be included in the QRCode...")
)
i_grid_lay.addWidget(self.text_label, 5, 0)
i_grid_lay.addWidget(self.text_data, 6, 0, 1, 2)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
i_grid_lay.addWidget(separator_line, 7, 0, 1, 2)
# ## Grid Layout
grid_lay = QtWidgets.QGridLayout()
@@ -90,7 +111,7 @@ class QRCode(AppTool):
grid_lay.setColumnStretch(0, 0)
grid_lay.setColumnStretch(1, 1)
self.qrcode_label = QtWidgets.QLabel('<b>%s</b>' % _('QRCode Parameters'))
self.qrcode_label = QtWidgets.QLabel('<b>%s</b>' % _('Parameters'))
self.qrcode_label.setToolTip(
_("The parameters used to shape the QRCode.")
)
@@ -158,18 +179,6 @@ class QRCode(AppTool):
grid_lay.addWidget(self.border_size_label, 4, 0)
grid_lay.addWidget(self.border_size_entry, 4, 1)
# Text box
self.text_label = QtWidgets.QLabel('%s:' % _("QRCode Data"))
self.text_label.setToolTip(
_("QRCode Data. Alphanumeric text to be encoded in the QRCode.")
)
self.text_data = FCTextArea()
self.text_data.setPlaceholderText(
_("Add here the text to be included in the QRCode...")
)
grid_lay.addWidget(self.text_label, 5, 0)
grid_lay.addWidget(self.text_data, 6, 0, 1, 2)
# POLARITY CHOICE #
self.pol_label = QtWidgets.QLabel('%s:' % _("Polarity"))
self.pol_label.setToolTip(

View File

@@ -64,11 +64,16 @@ class SolderPaste(AppTool):
self.obj_combo.is_last = True
self.obj_combo.obj_type = "Gerber"
self.object_label = QtWidgets.QLabel("Gerber: ")
self.object_label.setToolTip(
_("Gerber Solder paste object. ")
self.object_label = QtWidgets.QLabel('<b>%s</b>:'% _("GERBER"))
self.object_label.setToolTip(_("Gerber Solder paste object.")
)
obj_form_layout.addRow(self.object_label, self.obj_combo)
obj_form_layout.addRow(self.object_label)
obj_form_layout.addRow(self.obj_combo)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
obj_form_layout.addRow(separator_line)
# ### Tools ## ##
self.tools_table_label = QtWidgets.QLabel('<b>%s</b>' % _('Tools Table'))
@@ -131,22 +136,13 @@ class SolderPaste(AppTool):
"by first selecting a row(s) in the Tool Table.")
)
self.soldergeo_btn = QtWidgets.QPushButton(_("Generate Geo"))
self.soldergeo_btn.setToolTip(
_("Generate solder paste dispensing geometry.")
)
self.soldergeo_btn.setStyleSheet("""
QPushButton
{
font-weight: bold;
}
""")
grid0.addWidget(self.addtool_btn, 0, 0)
# grid2.addWidget(self.copytool_btn, 0, 1)
grid0.addWidget(self.deltool_btn, 0, 2)
self.layout.addSpacing(10)
separator_line = QtWidgets.QFrame()
separator_line.setFrameShape(QtWidgets.QFrame.HLine)
separator_line.setFrameShadow(QtWidgets.QFrame.Sunken)
grid0.addWidget(separator_line, 1, 0, 1, 3)
# ## Buttons
grid0_1 = QtWidgets.QGridLayout()
@@ -373,6 +369,18 @@ class SolderPaste(AppTool):
_("Second step is to create a solder paste dispensing\n"
"geometry out of an Solder Paste Mask Gerber file.")
)
self.soldergeo_btn = QtWidgets.QPushButton(_("Generate Geo"))
self.soldergeo_btn.setToolTip(
_("Generate solder paste dispensing geometry.")
)
self.soldergeo_btn.setStyleSheet("""
QPushButton
{
font-weight: bold;
}
""")
grid2.addWidget(step2_lbl, 0, 0)
grid2.addWidget(self.soldergeo_btn, 0, 2)