- replaced all usages of QFormLayout with QGridLayout
This commit is contained in:
@@ -34,8 +34,10 @@ class ExcellonExpPrefGroupUI(OptionsGroupUI):
|
||||
)
|
||||
self.layout.addWidget(self.export_options_label)
|
||||
|
||||
form = QtWidgets.QFormLayout()
|
||||
self.layout.addLayout(form)
|
||||
grid0 = QtWidgets.QGridLayout()
|
||||
grid0.setColumnStretch(0, 0)
|
||||
grid0.setColumnStretch(1, 1)
|
||||
self.layout.addLayout(grid0)
|
||||
|
||||
# Excellon Units
|
||||
self.excellon_units_label = FCLabel('%s:' % _('Units'))
|
||||
@@ -49,7 +51,8 @@ class ExcellonExpPrefGroupUI(OptionsGroupUI):
|
||||
_("The units used in the Excellon file.")
|
||||
)
|
||||
|
||||
form.addRow(self.excellon_units_label, self.excellon_units_radio)
|
||||
grid0.addWidget(self.excellon_units_label, 0, 0)
|
||||
grid0.addWidget(self.excellon_units_radio, 0, 1)
|
||||
|
||||
# Excellon non-decimal format
|
||||
self.digits_label = FCLabel("%s:" % _("Int/Decimals"))
|
||||
@@ -85,7 +88,8 @@ class ExcellonExpPrefGroupUI(OptionsGroupUI):
|
||||
hlay1.addWidget(self.format_dec_entry, QtCore.Qt.AlignLeft)
|
||||
hlay1.addStretch()
|
||||
|
||||
form.addRow(self.digits_label, hlay1)
|
||||
grid0.addWidget(self.digits_label, 2, 0)
|
||||
grid0.addLayout(hlay1, 2, 1)
|
||||
|
||||
# Select the Excellon Format
|
||||
self.format_label = FCLabel("%s:" % _("Format"))
|
||||
@@ -108,7 +112,8 @@ class ExcellonExpPrefGroupUI(OptionsGroupUI):
|
||||
"or TZ = trailing zeros are kept.")
|
||||
)
|
||||
|
||||
form.addRow(self.format_label, self.format_radio)
|
||||
grid0.addWidget(self.format_label, 4, 0)
|
||||
grid0.addWidget(self.format_radio, 4, 1)
|
||||
|
||||
# Excellon Zeros
|
||||
self.zeros_label = FCLabel('%s:' % _('Zeros'))
|
||||
@@ -131,7 +136,8 @@ class ExcellonExpPrefGroupUI(OptionsGroupUI):
|
||||
"and Leading Zeros are removed.")
|
||||
)
|
||||
|
||||
form.addRow(self.zeros_label, self.zeros_radio)
|
||||
grid0.addWidget(self.zeros_label, 6, 0)
|
||||
grid0.addWidget(self.zeros_radio, 6, 1)
|
||||
|
||||
# Slot type
|
||||
self.slot_type_label = FCLabel('%s:' % _('Slot type'))
|
||||
@@ -154,9 +160,12 @@ class ExcellonExpPrefGroupUI(OptionsGroupUI):
|
||||
"using the Drilled slot command (G85).")
|
||||
)
|
||||
|
||||
form.addRow(self.slot_type_label, self.slot_type_radio)
|
||||
grid0.addWidget(self.slot_type_label, 8, 0)
|
||||
grid0.addWidget(self.slot_type_radio, 8, 1)
|
||||
|
||||
self.layout.addStretch()
|
||||
self.layout.addStretch(1)
|
||||
|
||||
# Signals
|
||||
self.format_radio.activated_custom.connect(self.optimization_selection)
|
||||
|
||||
def optimization_selection(self):
|
||||
|
||||
@@ -35,8 +35,10 @@ class GerberExpPrefGroupUI(OptionsGroupUI):
|
||||
)
|
||||
self.layout.addWidget(self.export_options_label)
|
||||
|
||||
form = QtWidgets.QFormLayout()
|
||||
self.layout.addLayout(form)
|
||||
grid0 = QtWidgets.QGridLayout()
|
||||
grid0.setColumnStretch(0, 0)
|
||||
grid0.setColumnStretch(1, 1)
|
||||
self.layout.addLayout(grid0)
|
||||
|
||||
# Gerber Units
|
||||
self.gerber_units_label = FCLabel('%s:' % _('Units'))
|
||||
@@ -50,7 +52,8 @@ class GerberExpPrefGroupUI(OptionsGroupUI):
|
||||
_("The units used in the Gerber file.")
|
||||
)
|
||||
|
||||
form.addRow(self.gerber_units_label, self.gerber_units_radio)
|
||||
grid0.addWidget(self.gerber_units_label, 0, 0)
|
||||
grid0.addWidget(self.gerber_units_radio, 0, 1)
|
||||
|
||||
# Gerber format
|
||||
self.digits_label = FCLabel("%s:" % _("Int/Decimals"))
|
||||
@@ -90,7 +93,8 @@ class GerberExpPrefGroupUI(OptionsGroupUI):
|
||||
hlay1.addWidget(self.format_dec_entry, QtCore.Qt.AlignLeft)
|
||||
hlay1.addStretch()
|
||||
|
||||
form.addRow(self.digits_label, hlay1)
|
||||
grid0.addWidget(self.digits_label, 2, 0)
|
||||
grid0.addLayout(hlay1, 2, 1)
|
||||
|
||||
# Gerber Zeros
|
||||
self.zeros_label = FCLabel('%s:' % _('Zeros'))
|
||||
@@ -113,6 +117,7 @@ class GerberExpPrefGroupUI(OptionsGroupUI):
|
||||
"and Leading Zeros are kept.")
|
||||
)
|
||||
|
||||
form.addRow(self.zeros_label, self.zeros_radio)
|
||||
grid0.addWidget(self.zeros_label, 4, 0)
|
||||
grid0.addWidget(self.zeros_radio, 4, 1)
|
||||
|
||||
self.layout.addStretch()
|
||||
|
||||
@@ -35,19 +35,21 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
self.layout.addWidget(self.crlabel)
|
||||
|
||||
# Form Layout
|
||||
self.form_layout_1 = QtWidgets.QFormLayout()
|
||||
self.layout.addLayout(self.form_layout_1)
|
||||
self.grid0 = QtWidgets.QGridLayout()
|
||||
self.grid0.setColumnStretch(0, 0)
|
||||
self.grid0.setColumnStretch(1, 1)
|
||||
self.layout.addLayout(self.grid0)
|
||||
|
||||
# Trace size
|
||||
self.trace_size_cb = FCCheckBox('%s:' % _("Trace Size"))
|
||||
self.trace_size_cb.setToolTip(
|
||||
_("This checks if the minimum size for traces is met.")
|
||||
)
|
||||
self.form_layout_1.addRow(self.trace_size_cb)
|
||||
self.grid0.addWidget(self.trace_size_cb, 0, 0, 1, 2)
|
||||
|
||||
# Trace size value
|
||||
self.trace_size_entry = FCDoubleSpinner()
|
||||
self.trace_size_entry.set_range(0.00001, 999.99999)
|
||||
self.trace_size_entry.set_range(0.0000, 10000.0000)
|
||||
self.trace_size_entry.set_precision(self.decimals)
|
||||
self.trace_size_entry.setSingleStep(0.1)
|
||||
|
||||
@@ -55,7 +57,8 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
self.trace_size_lbl.setToolTip(
|
||||
_("Minimum acceptable trace size.")
|
||||
)
|
||||
self.form_layout_1.addRow(self.trace_size_lbl, self.trace_size_entry)
|
||||
self.grid0.addWidget(self.trace_size_lbl, 2, 0)
|
||||
self.grid0.addWidget(self.trace_size_entry, 2, 1)
|
||||
|
||||
# Copper2copper clearance
|
||||
self.clearance_copper2copper_cb = FCCheckBox('%s:' % _("Copper to Copper clearance"))
|
||||
@@ -63,11 +66,11 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
_("This checks if the minimum clearance between copper\n"
|
||||
"features is met.")
|
||||
)
|
||||
self.form_layout_1.addRow(self.clearance_copper2copper_cb)
|
||||
self.grid0.addWidget(self.clearance_copper2copper_cb, 4, 0, 1, 2)
|
||||
|
||||
# Copper2copper clearance value
|
||||
self.clearance_copper2copper_entry = FCDoubleSpinner()
|
||||
self.clearance_copper2copper_entry.set_range(0.00001, 999.99999)
|
||||
self.clearance_copper2copper_entry.set_range(0.0000, 10000.0000)
|
||||
self.clearance_copper2copper_entry.set_precision(self.decimals)
|
||||
self.clearance_copper2copper_entry.setSingleStep(0.1)
|
||||
|
||||
@@ -75,7 +78,8 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
self.clearance_copper2copper_lbl.setToolTip(
|
||||
_("Minimum acceptable clearance value.")
|
||||
)
|
||||
self.form_layout_1.addRow(self.clearance_copper2copper_lbl, self.clearance_copper2copper_entry)
|
||||
self.grid0.addWidget(self.clearance_copper2copper_lbl, 6, 0)
|
||||
self.grid0.addWidget(self.clearance_copper2copper_entry, 6, 1)
|
||||
|
||||
# Copper2outline clearance
|
||||
self.clearance_copper2ol_cb = FCCheckBox('%s:' % _("Copper to Outline clearance"))
|
||||
@@ -83,11 +87,11 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
_("This checks if the minimum clearance between copper\n"
|
||||
"features and the outline is met.")
|
||||
)
|
||||
self.form_layout_1.addRow(self.clearance_copper2ol_cb)
|
||||
self.grid0.addWidget(self.clearance_copper2ol_cb, 8, 0, 1, 2)
|
||||
|
||||
# Copper2outline clearance value
|
||||
self.clearance_copper2ol_entry = FCDoubleSpinner()
|
||||
self.clearance_copper2ol_entry.set_range(0.00001, 999.99999)
|
||||
self.clearance_copper2ol_entry.set_range(0.0000, 10000.0000)
|
||||
self.clearance_copper2ol_entry.set_precision(self.decimals)
|
||||
self.clearance_copper2ol_entry.setSingleStep(0.1)
|
||||
|
||||
@@ -95,7 +99,8 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
self.clearance_copper2ol_lbl.setToolTip(
|
||||
_("Minimum acceptable clearance value.")
|
||||
)
|
||||
self.form_layout_1.addRow(self.clearance_copper2ol_lbl, self.clearance_copper2ol_entry)
|
||||
self.grid0.addWidget(self.clearance_copper2ol_lbl, 10, 0)
|
||||
self.grid0.addWidget(self.clearance_copper2ol_entry, 10, 1)
|
||||
|
||||
# Silkscreen2silkscreen clearance
|
||||
self.clearance_silk2silk_cb = FCCheckBox('%s:' % _("Silk to Silk Clearance"))
|
||||
@@ -103,11 +108,11 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
_("This checks if the minimum clearance between silkscreen\n"
|
||||
"features and silkscreen features is met.")
|
||||
)
|
||||
self.form_layout_1.addRow(self.clearance_silk2silk_cb)
|
||||
self.grid0.addWidget(self.clearance_silk2silk_cb, 12, 0, 1, 2)
|
||||
|
||||
# Copper2silkscreen clearance value
|
||||
self.clearance_silk2silk_entry = FCDoubleSpinner()
|
||||
self.clearance_silk2silk_entry.set_range(0.00001, 999.99999)
|
||||
self.clearance_silk2silk_entry.set_range(0.0000, 10000.0000)
|
||||
self.clearance_silk2silk_entry.set_precision(self.decimals)
|
||||
self.clearance_silk2silk_entry.setSingleStep(0.1)
|
||||
|
||||
@@ -115,7 +120,8 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
self.clearance_silk2silk_lbl.setToolTip(
|
||||
_("Minimum acceptable clearance value.")
|
||||
)
|
||||
self.form_layout_1.addRow(self.clearance_silk2silk_lbl, self.clearance_silk2silk_entry)
|
||||
self.grid0.addWidget(self.clearance_silk2silk_lbl, 14, 0)
|
||||
self.grid0.addWidget(self.clearance_silk2silk_entry, 14, 1)
|
||||
|
||||
# Silkscreen2soldermask clearance
|
||||
self.clearance_silk2sm_cb = FCCheckBox('%s:' % _("Silk to Solder Mask Clearance"))
|
||||
@@ -123,11 +129,11 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
_("This checks if the minimum clearance between silkscreen\n"
|
||||
"features and soldermask features is met.")
|
||||
)
|
||||
self.form_layout_1.addRow(self.clearance_silk2sm_cb)
|
||||
self.grid0.addWidget(self.clearance_silk2sm_cb, 16, 0, 1, 2)
|
||||
|
||||
# Silkscreen2soldermask clearance value
|
||||
self.clearance_silk2sm_entry = FCDoubleSpinner()
|
||||
self.clearance_silk2sm_entry.set_range(0.00001, 999.99999)
|
||||
self.clearance_silk2sm_entry.set_range(0.0000, 10000.0000)
|
||||
self.clearance_silk2sm_entry.set_precision(self.decimals)
|
||||
self.clearance_silk2sm_entry.setSingleStep(0.1)
|
||||
|
||||
@@ -135,7 +141,8 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
self.clearance_silk2sm_lbl.setToolTip(
|
||||
_("Minimum acceptable clearance value.")
|
||||
)
|
||||
self.form_layout_1.addRow(self.clearance_silk2sm_lbl, self.clearance_silk2sm_entry)
|
||||
self.grid0.addWidget(self.clearance_silk2sm_lbl, 18, 0)
|
||||
self.grid0.addWidget(self.clearance_silk2sm_entry, 18, 1)
|
||||
|
||||
# Silk2outline clearance
|
||||
self.clearance_silk2ol_cb = FCCheckBox('%s:' % _("Silk to Outline Clearance"))
|
||||
@@ -143,11 +150,11 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
_("This checks if the minimum clearance between silk\n"
|
||||
"features and the outline is met.")
|
||||
)
|
||||
self.form_layout_1.addRow(self.clearance_silk2ol_cb)
|
||||
self.grid0.addWidget(self.clearance_silk2ol_cb, 20, 0, 1, 2)
|
||||
|
||||
# Silk2outline clearance value
|
||||
self.clearance_silk2ol_entry = FCDoubleSpinner()
|
||||
self.clearance_silk2ol_entry.set_range(0.00001, 999.99999)
|
||||
self.clearance_silk2ol_entry.set_range(0.0000, 10000.0000)
|
||||
self.clearance_silk2ol_entry.set_precision(self.decimals)
|
||||
self.clearance_silk2ol_entry.setSingleStep(0.1)
|
||||
|
||||
@@ -155,7 +162,8 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
self.clearance_silk2ol_lbl.setToolTip(
|
||||
_("Minimum acceptable clearance value.")
|
||||
)
|
||||
self.form_layout_1.addRow(self.clearance_silk2ol_lbl, self.clearance_silk2ol_entry)
|
||||
self.grid0.addWidget(self.clearance_silk2ol_lbl, 22, 0)
|
||||
self.grid0.addWidget(self.clearance_silk2ol_entry, 22, 1)
|
||||
|
||||
# Soldermask2soldermask clearance
|
||||
self.clearance_sm2sm_cb = FCCheckBox('%s:' % _("Minimum Solder Mask Sliver"))
|
||||
@@ -163,11 +171,11 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
_("This checks if the minimum clearance between soldermask\n"
|
||||
"features and soldermask features is met.")
|
||||
)
|
||||
self.form_layout_1.addRow(self.clearance_sm2sm_cb)
|
||||
self.grid0.addWidget(self.clearance_sm2sm_cb, 24, 0, 1, 2)
|
||||
|
||||
# Soldermask2soldermask clearance value
|
||||
self.clearance_sm2sm_entry = FCDoubleSpinner()
|
||||
self.clearance_sm2sm_entry.set_range(0.00001, 999.99999)
|
||||
self.clearance_sm2sm_entry.set_range(0.0000, 10000.0000)
|
||||
self.clearance_sm2sm_entry.set_precision(self.decimals)
|
||||
self.clearance_sm2sm_entry.setSingleStep(0.1)
|
||||
|
||||
@@ -175,7 +183,8 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
self.clearance_sm2sm_lbl.setToolTip(
|
||||
_("Minimum acceptable clearance value.")
|
||||
)
|
||||
self.form_layout_1.addRow(self.clearance_sm2sm_lbl, self.clearance_sm2sm_entry)
|
||||
self.grid0.addWidget(self.clearance_sm2sm_lbl, 26, 0)
|
||||
self.grid0.addWidget(self.clearance_sm2sm_entry, 26, 1)
|
||||
|
||||
# Ring integrity check
|
||||
self.ring_integrity_cb = FCCheckBox('%s:' % _("Minimum Annular Ring"))
|
||||
@@ -183,11 +192,11 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
_("This checks if the minimum copper ring left by drilling\n"
|
||||
"a hole into a pad is met.")
|
||||
)
|
||||
self.form_layout_1.addRow(self.ring_integrity_cb)
|
||||
self.grid0.addWidget(self.ring_integrity_cb, 28, 0, 1, 2)
|
||||
|
||||
# Ring integrity value
|
||||
self.ring_integrity_entry = FCDoubleSpinner()
|
||||
self.ring_integrity_entry.set_range(0.00001, 999.99999)
|
||||
self.ring_integrity_entry.set_range(0.0000, 10000.0000)
|
||||
self.ring_integrity_entry.set_precision(self.decimals)
|
||||
self.ring_integrity_entry.setSingleStep(0.1)
|
||||
|
||||
@@ -195,9 +204,10 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
self.ring_integrity_lbl.setToolTip(
|
||||
_("Minimum acceptable ring value.")
|
||||
)
|
||||
self.form_layout_1.addRow(self.ring_integrity_lbl, self.ring_integrity_entry)
|
||||
self.grid0.addWidget(self.ring_integrity_lbl, 30, 0)
|
||||
self.grid0.addWidget(self.ring_integrity_entry, 30, 1)
|
||||
|
||||
self.form_layout_1.addRow(FCLabel(""))
|
||||
self.grid0.addWidget(FCLabel(''), 32, 0, 1, 2)
|
||||
|
||||
# Hole2Hole clearance
|
||||
self.clearance_d2d_cb = FCCheckBox('%s:' % _("Hole to Hole Clearance"))
|
||||
@@ -205,11 +215,11 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
_("This checks if the minimum clearance between a drill hole\n"
|
||||
"and another drill hole is met.")
|
||||
)
|
||||
self.form_layout_1.addRow(self.clearance_d2d_cb)
|
||||
self.grid0.addWidget(self.clearance_d2d_cb, 34, 0, 1, 2)
|
||||
|
||||
# Hole2Hole clearance value
|
||||
self.clearance_d2d_entry = FCDoubleSpinner()
|
||||
self.clearance_d2d_entry.set_range(0.00001, 999.99999)
|
||||
self.clearance_d2d_entry.set_range(0.0000, 10000.0000)
|
||||
self.clearance_d2d_entry.set_precision(self.decimals)
|
||||
self.clearance_d2d_entry.setSingleStep(0.1)
|
||||
|
||||
@@ -217,7 +227,8 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
self.clearance_d2d_lbl.setToolTip(
|
||||
_("Minimum acceptable drill size.")
|
||||
)
|
||||
self.form_layout_1.addRow(self.clearance_d2d_lbl, self.clearance_d2d_entry)
|
||||
self.grid0.addWidget(self.clearance_d2d_lbl, 36, 0)
|
||||
self.grid0.addWidget(self.clearance_d2d_entry, 36, 1)
|
||||
|
||||
# Drill holes size check
|
||||
self.drill_size_cb = FCCheckBox('%s:' % _("Hole Size"))
|
||||
@@ -225,11 +236,11 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
_("This checks if the drill holes\n"
|
||||
"sizes are above the threshold.")
|
||||
)
|
||||
self.form_layout_1.addRow(self.drill_size_cb)
|
||||
self.grid0.addWidget(self.drill_size_cb, 38, 0, 1, 2)
|
||||
|
||||
# Drile holes value
|
||||
self.drill_size_entry = FCDoubleSpinner()
|
||||
self.drill_size_entry.set_range(0.00001, 999.99999)
|
||||
self.drill_size_entry.set_range(0.0000, 10000.0000)
|
||||
self.drill_size_entry.set_precision(self.decimals)
|
||||
self.drill_size_entry.setSingleStep(0.1)
|
||||
|
||||
@@ -237,6 +248,7 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
|
||||
self.drill_size_lbl.setToolTip(
|
||||
_("Minimum acceptable clearance value.")
|
||||
)
|
||||
self.form_layout_1.addRow(self.drill_size_lbl, self.drill_size_entry)
|
||||
self.grid0.addWidget(self.drill_size_lbl, 40, 0)
|
||||
self.grid0.addWidget(self.drill_size_entry, 40, 1)
|
||||
|
||||
self.layout.addStretch()
|
||||
self.layout.addStretch(1)
|
||||
|
||||
Reference in New Issue
Block a user