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

Method __init__

SLiCAP/schematic/component_item.py:284–296  ·  view source on GitHub ↗
(self, prop_key: str, parent: "ComponentItem")

Source from the content-addressed store, hash-verified

282 """
283
284 def __init__(self, prop_key: str, parent: "ComponentItem"):
285 super().__init__(parent)
286 self.prop_key = prop_key
287 self._text: str = ""
288 self._svg_renderer: QSvgRenderer | None = None
289 self._svg_bytes: bytes = b"" # kept for SVG export
290 self._svg_rect: QRectF = QRectF() # scaled draw rect, centered at (0,0)
291 self._prefix: str = "" # plain text before the SVG
292 self._prefix_w: float = 0.0 # cached width of prefix string
293 self.setFlag(QGraphicsItem.ItemIsMovable)
294 self.setFlag(QGraphicsItem.ItemIsSelectable, False)
295 self.setFlag(QGraphicsItem.ItemSendsGeometryChanges)
296 self.setAcceptedMouseButtons(Qt.LeftButton)
297
298 def itemChange(self, change, value):
299 p = self.parentItem()

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected