MCPcopy Create free account
hub / github.com/SLiCAP/SLiCAP_python / _text_display_lines

Method _text_display_lines

SLiCAP/schematic/model_item.py:124–135  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

122 painter.restore()
123
124 def _text_display_lines(self) -> list:
125 lines = [f".model {self.model_name} {self.model_type}"]
126 for name, value in self.params:
127 n = name.strip()
128 if n:
129 v = value.strip()
130 if v:
131 wrapped = v if (v.startswith("{") and v.endswith("}")) else "{" + v + "}"
132 lines.append(f"{n} = {wrapped}")
133 else:
134 lines.append(f"{n}")
135 return lines
136
137 def _paint_text_fallback(self, painter: QPainter, r: QRectF) -> None:
138 lines = self._text_display_lines()

Callers 2

_natural_text_rectMethod · 0.95
_paint_text_fallbackMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected