MCPcopy Create free account
hub / github.com/KDE/labplot / paint

Method paint

src/backend/datapicker/Segment.cpp:111–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111void SegmentPrivate::paint(QPainter* painter, const QStyleOptionGraphicsItem* /*option*/, QWidget*) {
112 painter->setPen(pen);
113 painter->drawPath(linePath);
114
115 if (m_hovered && !isSelected()) {
116 painter->setPen(QPen(QApplication::palette().color(QPalette::Highlight), 2, Qt::SolidLine));
117 painter->drawPath(linePath);
118 }
119
120 // if (isSelected()) {
121 // painter->setPen(QPen(QApplication::palette().color(QPalette::Highlight), 2, Qt::SolidLine));
122 // painter->setOpacity(selectedOpacity);
123 // painter->drawPath(itemShape);
124 // }
125}
126
127void SegmentPrivate::hoverEnterEvent(QGraphicsSceneHoverEvent*) {
128 if (!isSelected()) {

Callers

nothing calls this directly

Calls 3

setPenMethod · 0.80
QPenClass · 0.70
colorMethod · 0.45

Tested by

no test coverage detected