(self, file_path: str, directive: str = "lib",
simulator: str = "SLiCAP", corner: str = "")
| 623 | self.placing_started.emit() |
| 624 | |
| 625 | def start_library_placement(self, file_path: str, directive: str = "lib", |
| 626 | simulator: str = "SLiCAP", corner: str = ""): |
| 627 | from pathlib import Path |
| 628 | from PySide6.QtWidgets import QGraphicsSimpleTextItem |
| 629 | from PySide6.QtGui import QBrush |
| 630 | self._end_wire(commit=False) |
| 631 | self._cancel_placement() |
| 632 | name = Path(file_path).name if file_path else "" |
| 633 | ghost_text = f".{directive} {name}" |
| 634 | if corner: |
| 635 | ghost_text += f" {corner}" |
| 636 | ghost = QGraphicsSimpleTextItem(ghost_text) |
| 637 | ghost.setFont(COMMAND_FONT) |
| 638 | ghost.setBrush(QBrush(COMMAND_COLOR)) |
| 639 | ghost.setOpacity(0.5) |
| 640 | ghost.setAcceptedMouseButtons(Qt.NoButton) |
| 641 | self._ghost = ghost |
| 642 | self._ghost.setPos(QPointF(-9999, -9999)) |
| 643 | self.addItem(self._ghost) |
| 644 | self._library_pending = (file_path, directive, simulator, corner) |
| 645 | self._mode = _Mode.PLACING_LIBRARY |
| 646 | self.placing_started.emit() |
| 647 | |
| 648 | def start_image_placement(self, file_path: str, width: int, height: int): |
| 649 | from pathlib import Path as _Path |
no test coverage detected