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

Method __init__

SLiCAP/schematic/parameter_item.py:30–46  ·  view source on GitHub ↗
(self, params: list,        # list[tuple[str, str]]
                 preamble_path: str,
                 display_width: int, display_height: int,
                 pos: QPointF = QPointF(0, 0))

Source from the content-addressed store, hash-verified

28 """
29
30 def __init__(self, params: list, # list[tuple[str, str]]
31 preamble_path: str,
32 display_width: int, display_height: int,
33 pos: QPointF = QPointF(0, 0)):
34 super().__init__()
35 self.params: list = list(params) # [(name, value), ...]
36 self.preamble_path: str = preamble_path
37 self._svg_bytes: bytes | None = None
38 self.display_width: int = display_width
39 self.display_height: int = display_height
40 self.setPos(pos)
41 self.setFlag(QGraphicsItem.ItemIsSelectable)
42 self.setFlag(QGraphicsItem.ItemIsMovable)
43 self.setFlag(QGraphicsItem.ItemSendsGeometryChanges)
44 self._renderer = None
45 _live_param_items.add(self)
46 self._load_renderer()
47
48 def rescale(self, ratio: float) -> None:
49 self.prepareGeometryChange()

Callers

nothing calls this directly

Calls 1

_load_rendererMethod · 0.95

Tested by

no test coverage detected