(self)
| 538 | return f"{prefix}{n}" |
| 539 | |
| 540 | def start_junction_placement(self): |
| 541 | self._end_wire(commit=False) |
| 542 | self._cancel_placement() |
| 543 | r = JUNCTION_RADIUS |
| 544 | ghost = QGraphicsEllipseItem(-r, -r, 2 * r, 2 * r) |
| 545 | ghost.setPen(QPen(Qt.NoPen)) |
| 546 | ghost.setBrush(QBrush(JUNCTION_COLOR)) |
| 547 | ghost.setOpacity(0.4) |
| 548 | ghost.setAcceptedMouseButtons(Qt.NoButton) |
| 549 | self._ghost = ghost |
| 550 | self._ghost.setPos(QPointF(-9999, -9999)) |
| 551 | self.addItem(self._ghost) |
| 552 | self._mode = _Mode.PLACING_JUNCTION |
| 553 | self.placing_started.emit() |
| 554 | |
| 555 | def start_text_placement(self, text: str = "Text"): |
| 556 | from .config import TEXT_FONT, TEXT_COLOR |
no test coverage detected