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

Method __init__

SLiCAP/schematic/window.py:23–43  ·  view source on GitHub ↗
(self, config: str = "full", file: str | None = None)

Source from the content-addressed store, hash-verified

21
22class MainWindow(QMainWindow):
23 def __init__(self, config: str = "full", file: str | None = None):
24 super().__init__()
25 self._config = config
26 self.setWindowTitle("SLiCAP Schematic Capture")
27 self.resize(1200, 800)
28
29 self._scene = SchematicScene()
30 self._build_library() # system symbols only at startup
31 self._view = SchematicView(self._scene)
32 self._current_path: Path | None = None
33 self._doc_props = DocumentProperties.new()
34 self._symbol_loop_name: str | None = None
35 self._dirty: bool = False
36 self._scene.data_changed.connect(lambda: setattr(self, '_dirty', True))
37
38 self.setCentralWidget(self._view)
39
40 self._build_menu()
41
42 if file is not None:
43 self._load_file(Path(file))
44
45 # ── menu ─────────────────────────────────────────────────────────────────
46

Callers

nothing calls this directly

Calls 6

_build_libraryMethod · 0.95
_build_menuMethod · 0.95
_load_fileMethod · 0.95
SchematicSceneClass · 0.85
SchematicViewClass · 0.85
newMethod · 0.80

Tested by

no test coverage detected