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

Method start_junction_placement

SLiCAP/schematic/canvas.py:540–553  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

Callers 1

_build_place_menuMethod · 0.80

Calls 2

_end_wireMethod · 0.95
_cancel_placementMethod · 0.95

Tested by

no test coverage detected