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

Method paint

src/backend/worksheet/plots/cartesian/CustomPoint.cpp:181–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181void CustomPointPrivate::paint(QPainter* painter, const QStyleOptionGraphicsItem* /*option*/, QWidget*) {
182 if (!insidePlot)
183 return;
184
185 if (symbol->style() != Symbol::Style::NoSymbols) {
186 painter->setOpacity(symbol->opacity());
187 painter->setPen(symbol->pen());
188 painter->setBrush(symbol->brush());
189 painter->drawPath(m_shape);
190 }
191
192 if (m_hovered && !isSelected() && !q->isPrinting()) {
193 painter->setPen(QPen(QApplication::palette().color(QPalette::Shadow), 2, Qt::SolidLine));
194 painter->drawPath(m_shape);
195 }
196
197 if (isSelected() && !q->isPrinting()) {
198 painter->setPen(QPen(QApplication::palette().color(QPalette::Highlight), 2, Qt::SolidLine));
199 painter->drawPath(m_shape);
200 }
201}
202
203void CustomPointPrivate::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) {
204 // don't move when the parent is a InfoElement, because there

Callers

nothing calls this directly

Calls 6

setPenMethod · 0.80
setBrushMethod · 0.80
isPrintingMethod · 0.80
QPenClass · 0.50
setOpacityMethod · 0.45
colorMethod · 0.45

Tested by

no test coverage detected