MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / group

Method group

SLiCAP/schematic/preferences_dialog.py:125–145  ·  view source on GitHub ↗

rows = [(label, section, key, widget), ...]

(col: QVBoxLayout, title: str,
                  rows: list[tuple[str, str, str, object]])

Source from the content-addressed store, hash-verified

123
124 # ── group builder ─────────────────────────────────────────────────────
125 def group(col: QVBoxLayout, title: str,
126 rows: list[tuple[str, str, str, object]]) -> None:
127 """rows = [(label, section, key, widget), ...]"""
128 grp = QGroupBox(title)
129 form = QFormLayout()
130 form.setLabelAlignment(Qt.AlignLeft | Qt.AlignVCenter)
131 form.setFormAlignment(Qt.AlignLeft | Qt.AlignTop)
132 form.setSpacing(4)
133 grp.setLayout(form)
134 for label, sec, key, widget in rows:
135 self._widgets[(sec, key)] = widget
136 if isinstance(widget, _ColorButton):
137 # Right-align colour buttons with a stretch spacer
138 h = QHBoxLayout()
139 h.setContentsMargins(0, 0, 0, 0)
140 h.addStretch(1)
141 h.addWidget(widget)
142 form.addRow(label, h)
143 else:
144 form.addRow(label, widget)
145 col.addWidget(grp)
146
147 # ── left column ───────────────────────────────────────────────────────
148 group(left, "Symbol", [

Callers 10

t_PARDEFFunction · 0.80
t_EXPRFunction · 0.80
_replaceScaleFactorsFunction · 0.80
backAnnotateSchematicFunction · 0.80
_attrFunction · 0.80
_replFunction · 0.80
_parse_svg_lengthFunction · 0.80
_svg_length_to_pxFunction · 0.80
_rewrite_urlFunction · 0.80
from_dataMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected