- created a new custom layout based on the Grid Layout where I can set the horizontal and vertical spacings between grid items and used it throughout the app

This commit is contained in:
Marius Stanciu
2021-08-07 11:46:45 +03:00
committed by Marius
parent 3c06280d3d
commit 461aa763ad
88 changed files with 325 additions and 281 deletions

View File

@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import FCSpinner, FCDoubleSpinner, RadioSet, FCLabel, FCCheckBox
from appGUI.GUIElements import FCSpinner, FCDoubleSpinner, RadioSet, FCLabel, FCCheckBox, FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -21,7 +21,7 @@ class Tools2CThievingPrefGroupUI(OptionsGroupUI):
self.decimals = decimals
# ## Grid Layout
grid_lay = QtWidgets.QGridLayout()
grid_lay = FCGridLayout(v_spacing=3)
self.layout.addLayout(grid_lay)
grid_lay.setColumnStretch(0, 0)
grid_lay.setColumnStretch(1, 1)

View File

@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, NumericalEvalTupleEntry, FCLabel
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, NumericalEvalTupleEntry, FCLabel, FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -21,7 +21,7 @@ class Tools2CalPrefGroupUI(OptionsGroupUI):
self.decimals = decimals
# ## Grid Layout
grid_lay = QtWidgets.QGridLayout()
grid_lay = FCGridLayout(v_spacing=3)
self.layout.addLayout(grid_lay)
grid_lay.setColumnStretch(0, 0)
grid_lay.setColumnStretch(1, 1)

View File

@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import FCCheckBox, RadioSet, FCDoubleSpinner, FCLabel
from appGUI.GUIElements import FCCheckBox, RadioSet, FCDoubleSpinner, FCLabel, FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -21,7 +21,7 @@ class Tools2EDrillsPrefGroupUI(OptionsGroupUI):
self.decimals = decimals
# ## Grid Layout
grid_lay = QtWidgets.QGridLayout()
grid_lay = FCGridLayout(v_spacing=3)
self.layout.addLayout(grid_lay)
grid_lay.setColumnStretch(0, 0)
grid_lay.setColumnStretch(1, 1)

View File

@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import FCDoubleSpinner, RadioSet, FCLabel
from appGUI.GUIElements import FCDoubleSpinner, RadioSet, FCLabel, FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -21,7 +21,7 @@ class Tools2FiducialsPrefGroupUI(OptionsGroupUI):
self.decimals = decimals
# ## Grid Layout
grid_lay = QtWidgets.QGridLayout()
grid_lay = FCGridLayout(v_spacing=3)
self.layout.addLayout(grid_lay)
grid_lay.setColumnStretch(0, 0)
grid_lay.setColumnStretch(1, 1)

View File

@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import FCDoubleSpinner, RadioSet, FCLabel
from appGUI.GUIElements import FCDoubleSpinner, RadioSet, FCLabel, FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -29,7 +29,7 @@ class Tools2InvertPrefGroupUI(OptionsGroupUI):
self.layout.addWidget(self.sublabel)
# Grid Layout
grid0 = QtWidgets.QGridLayout()
grid0 = FCGridLayout(v_spacing=3)
grid0.setColumnStretch(0, 0)
grid0.setColumnStretch(1, 1)
self.layout.addLayout(grid0)

View File

@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import FCSpinner, FCLabel
from appGUI.GUIElements import FCSpinner, FCLabel, FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -28,7 +28,7 @@ class Tools2OptimalPrefGroupUI(OptionsGroupUI):
)
self.layout.addWidget(self.optlabel)
grid0 = QtWidgets.QGridLayout()
grid0 = FCGridLayout(v_spacing=3)
self.layout.addLayout(grid0)
grid0.setColumnStretch(0, 0)
grid0.setColumnStretch(1, 1)

View File

@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import FCCheckBox, RadioSet, FCDoubleSpinner, FCLabel
from appGUI.GUIElements import FCCheckBox, RadioSet, FCDoubleSpinner, FCLabel, FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -21,7 +21,7 @@ class Tools2PunchGerberPrefGroupUI(OptionsGroupUI):
self.decimals = decimals
# ## Grid Layout
grid_lay = QtWidgets.QGridLayout()
grid_lay = FCGridLayout(v_spacing=3)
self.layout.addLayout(grid_lay)
grid_lay.setColumnStretch(0, 0)
grid_lay.setColumnStretch(1, 1)

View File

@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import FCSpinner, RadioSet, FCTextArea, FCLabel, FCColorEntry
from appGUI.GUIElements import FCSpinner, RadioSet, FCTextArea, FCLabel, FCColorEntry, FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -29,7 +29,7 @@ class Tools2QRCodePrefGroupUI(OptionsGroupUI):
self.layout.addWidget(self.qrlabel)
# ## Grid Layout
grid_lay = QtWidgets.QGridLayout()
grid_lay = FCGridLayout(v_spacing=3)
self.layout.addLayout(grid_lay)
grid_lay.setColumnStretch(0, 0)
grid_lay.setColumnStretch(1, 1)

View File

@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import FCCheckBox, FCDoubleSpinner, FCLabel
from appGUI.GUIElements import FCCheckBox, FCDoubleSpinner, FCLabel, FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -28,7 +28,7 @@ class Tools2RulesCheckPrefGroupUI(OptionsGroupUI):
self.layout.addWidget(self.crlabel)
# Form Layout
self.grid0 = QtWidgets.QGridLayout()
self.grid0 = FCGridLayout(v_spacing=3)
self.grid0.setColumnStretch(0, 0)
self.grid0.setColumnStretch(1, 1)
self.layout.addLayout(self.grid0)

View File

@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import FCDoubleSpinner, RadioSet, FCLabel
from appGUI.GUIElements import FCDoubleSpinner, RadioSet, FCLabel, FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -28,7 +28,7 @@ class Tools2sidedPrefGroupUI(OptionsGroupUI):
)
self.layout.addWidget(self.dblsided_label)
grid0 = QtWidgets.QGridLayout()
grid0 = FCGridLayout(v_spacing=3)
self.layout.addLayout(grid0)
# ## Drill diameter for alignment holes

View File

@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import FCDoubleSpinner, FCLabel
from appGUI.GUIElements import FCDoubleSpinner, FCLabel, FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -29,7 +29,7 @@ class ToolsCalculatorsPrefGroupUI(OptionsGroupUI):
)
self.layout.addWidget(self.vshape_tool_label)
grid0 = QtWidgets.QGridLayout()
grid0 = FCGridLayout(v_spacing=3)
grid0.setColumnStretch(0, 0)
grid0.setColumnStretch(1, 1)
self.layout.addLayout(grid0)

View File

@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import FCDoubleSpinner, FCLabel, RadioSet
from appGUI.GUIElements import FCDoubleSpinner, FCLabel, RadioSet, FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -20,7 +20,7 @@ class ToolsCornersPrefGroupUI(OptionsGroupUI):
self.setTitle(str(_("Corner Markers Options")))
self.decimals = decimals
grid0 = QtWidgets.QGridLayout()
grid0 = FCGridLayout(v_spacing=3)
grid0.setColumnStretch(0, 0)
grid0.setColumnStretch(1, 1)
self.layout.addLayout(grid0)

View File

@@ -1,6 +1,7 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import FCDoubleSpinner, FCCheckBox, RadioSet, FCComboBox, FCLabel, OptionalInputSection
from appGUI.GUIElements import FCDoubleSpinner, FCCheckBox, RadioSet, FCComboBox, FCLabel, OptionalInputSection, \
FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -29,7 +30,7 @@ class ToolsCutoutPrefGroupUI(OptionsGroupUI):
)
self.layout.addWidget(self.board_cutout_label)
grid0 = QtWidgets.QGridLayout()
grid0 = FCGridLayout(v_spacing=3)
self.layout.addLayout(grid0)
tdclabel = FCLabel('%s:' % _('Tool Diameter'))

View File

@@ -2,7 +2,7 @@ from PyQt6 import QtWidgets
from PyQt6.QtCore import Qt
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCComboBox, FCCheckBox, FCSpinner, NumericalEvalTupleEntry, \
OptionalInputSection, NumericalEvalEntry, FCLabel
OptionalInputSection, NumericalEvalEntry, FCLabel, FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -28,7 +28,7 @@ class ToolsDrillPrefGroupUI(OptionsGroupUI):
)
self.layout.addWidget(self.drill_label)
grid0 = QtWidgets.QGridLayout()
grid0 = FCGridLayout(v_spacing=3)
self.layout.addLayout(grid0)
# Tool order Radio Button

View File

@@ -1,6 +1,7 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, FCComboBox, FCColorEntry, FCLabel, FCSpinner
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, FCComboBox, FCColorEntry, FCLabel, FCSpinner, \
FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -28,7 +29,7 @@ class ToolsFilmPrefGroupUI(OptionsGroupUI):
)
self.layout.addWidget(self.film_label)
grid0 = QtWidgets.QGridLayout()
grid0 = FCGridLayout(v_spacing=3)
self.layout.addLayout(grid0)
self.film_type_radio = RadioSet([{'label': 'Pos', 'value': 'pos'},

View File

@@ -1,7 +1,7 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCComboBox2, FCCheckBox, FCSpinner, NumericalEvalTupleEntry, \
FCLabel
FCLabel, FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -28,7 +28,7 @@ class ToolsISOPrefGroupUI(OptionsGroupUI):
)
self.layout.addWidget(self.iso_label)
grid0 = QtWidgets.QGridLayout()
grid0 = FCGridLayout(v_spacing=3)
self.layout.addLayout(grid0)
# Tool Dias

View File

@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import FCDoubleSpinner, FCSpinner, RadioSet, FCLabel, FCComboBox
from appGUI.GUIElements import FCDoubleSpinner, FCSpinner, RadioSet, FCLabel, FCComboBox, FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -28,7 +28,7 @@ class ToolsLevelPrefGroupUI(OptionsGroupUI):
self.layout.addWidget(self.levelling_label)
# Grid Layout
grid0 = QtWidgets.QGridLayout()
grid0 = FCGridLayout(v_spacing=3)
grid0.setColumnStretch(0, 0)
grid0.setColumnStretch(1, 1)
self.layout.addLayout(grid0)

View File

@@ -2,7 +2,7 @@ from PyQt6 import QtWidgets
from PyQt6.QtCore import Qt
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCComboBox, FCCheckBox, FCSpinner, NumericalEvalTupleEntry, \
OptionalInputSection, NumericalEvalEntry, FCLabel, FCComboBox2, FCEntry
OptionalInputSection, NumericalEvalEntry, FCLabel, FCComboBox2, FCEntry, FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -28,7 +28,7 @@ class ToolsMillPrefGroupUI(OptionsGroupUI):
)
self.layout.addWidget(self.mill_label)
grid0 = QtWidgets.QGridLayout()
grid0 = FCGridLayout(v_spacing=3)
self.layout.addLayout(grid0)
# Tooldia

View File

@@ -1,6 +1,7 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, NumericalEvalTupleEntry, FCComboBox2, FCLabel
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, NumericalEvalTupleEntry, FCComboBox2, FCLabel, \
FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -28,7 +29,7 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI):
)
self.layout.addWidget(self.clearcopper_label)
grid0 = QtWidgets.QGridLayout()
grid0 = FCGridLayout(v_spacing=3)
self.layout.addLayout(grid0)
ncctdlabel = FCLabel('<b><font color="green">%s:</font></b>' % _('Tools Dia'))

View File

@@ -1,6 +1,7 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCComboBox2, FCCheckBox, NumericalEvalTupleEntry, FCLabel
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCComboBox2, FCCheckBox, NumericalEvalTupleEntry, FCLabel, \
FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -30,7 +31,7 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI):
)
self.layout.addWidget(self.paint_label)
grid0 = QtWidgets.QGridLayout()
grid0 = FCGridLayout(v_spacing=3)
grid0.setColumnStretch(0, 0)
grid0.setColumnStretch(1, 1)
self.layout.addLayout(grid0)

View File

@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import FCDoubleSpinner, FCSpinner, RadioSet, FCCheckBox, FCLabel
from appGUI.GUIElements import FCDoubleSpinner, FCSpinner, RadioSet, FCCheckBox, FCLabel, FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -29,7 +29,7 @@ class ToolsPanelizePrefGroupUI(OptionsGroupUI):
)
self.layout.addWidget(self.panelize_label)
grid0 = QtWidgets.QGridLayout()
grid0 = FCGridLayout(v_spacing=3)
self.layout.addLayout(grid0)
grid0.setColumnStretch(0, 0)
grid0.setColumnStretch(1, 1)

View File

@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets
from appGUI.GUIElements import FCDoubleSpinner, FCSpinner, FCComboBox, NumericalEvalTupleEntry, FCLabel
from appGUI.GUIElements import FCDoubleSpinner, FCSpinner, FCComboBox, NumericalEvalTupleEntry, FCLabel, FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -28,7 +28,7 @@ class ToolsSolderpastePrefGroupUI(OptionsGroupUI):
)
self.layout.addWidget(self.solderpastelabel)
grid0 = QtWidgets.QGridLayout()
grid0 = FCGridLayout(v_spacing=3)
self.layout.addLayout(grid0)
# Nozzle Tool Diameters

View File

@@ -1,6 +1,6 @@
from PyQt6 import QtWidgets, QtGui
from appGUI.GUIElements import FCDoubleSpinner, FCCheckBox, NumericalEvalTupleEntry, FCComboBox, FCLabel
from appGUI.GUIElements import FCDoubleSpinner, FCCheckBox, NumericalEvalTupleEntry, FCComboBox, FCLabel, FCGridLayout
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
@@ -28,7 +28,7 @@ class ToolsTransformPrefGroupUI(OptionsGroupUI):
)
self.layout.addWidget(self.transform_label)
grid0 = QtWidgets.QGridLayout()
grid0 = FCGridLayout(v_spacing=3)
self.layout.addLayout(grid0)
grid0.setColumnStretch(0, 0)
grid0.setColumnStretch(1, 1)