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

Method start_border_placement

SLiCAP/schematic/canvas.py:608–623  ·  view source on GitHub ↗
(self, width: int, height: int, show_in_export: bool)

Source from the content-addressed store, hash-verified

606 self.placing_started.emit()
607
608 def start_border_placement(self, width: int, height: int, show_in_export: bool):
609 self._end_wire(commit=False)
610 self._cancel_placement()
611 from PySide6.QtWidgets import QGraphicsRectItem
612 from PySide6.QtGui import QPen, QBrush, QColor
613 ghost = QGraphicsRectItem(0, 0, width, height)
614 ghost.setPen(QPen(QColor(80, 80, 180), 0.8, Qt.DashLine))
615 ghost.setBrush(QBrush(Qt.NoBrush))
616 ghost.setOpacity(0.5)
617 ghost.setAcceptedMouseButtons(Qt.NoButton)
618 self._ghost = ghost
619 self._ghost.setPos(QPointF(-9999, -9999))
620 self.addItem(self._ghost)
621 self._border_pending = (width, height, show_in_export)
622 self._mode = _Mode.PLACING_BORDER
623 self.placing_started.emit()
624
625 def start_library_placement(self, file_path: str, directive: str = "lib",
626 simulator: str = "SLiCAP", corner: str = ""):

Callers 1

_on_place_borderMethod · 0.80

Calls 2

_end_wireMethod · 0.95
_cancel_placementMethod · 0.95

Tested by

no test coverage detected