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

Method paint

SLiCAP/schematic/wire_item.py:78–88  ·  view source on GitHub ↗
(self, painter: QPainter, option, widget=None)

Source from the content-addressed store, hash-verified

76 super().mouseReleaseEvent(event)
77
78 def paint(self, painter: QPainter, option, widget=None):
79 # Draw text without Qt's default selection indicator.
80 clean_option = option.__class__(option)
81 clean_option.state = option.state & ~QStyle.State_Selected
82 super().paint(painter, clean_option, widget)
83 if option.state & QStyle.State_Selected:
84 painter.save()
85 painter.setPen(QPen(QColor(0, 120, 215), 0.8))
86 painter.setBrush(Qt.NoBrush)
87 painter.drawRect(self.boundingRect())
88 painter.restore()
89
90 def itemChange(self, change, value):
91 wire = self.parentItem()

Callers

nothing calls this directly

Calls 3

paintMethod · 0.45
saveMethod · 0.45
boundingRectMethod · 0.45

Tested by

no test coverage detected