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

Method paint

src/backend/datapicker/DatapickerPoint.cpp:425–434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423}
424
425void DatapickerPointPrivate::paint(QPainter* painter, const QStyleOptionGraphicsItem* /*option*/, QWidget*) {
426 symbol->draw(painter, QPointF(0., 0.));
427
428 if (isSelected() && !m_printing) {
429 // TODO: move the initialization of QPen to a parent class later so we don't
430 // need to create it in every paint() call.
431 painter->setPen(QPen(QApplication::palette().color(QPalette::Highlight), 1, Qt::SolidLine));
432 painter->drawPath(m_shape);
433 }
434}
435
436void DatapickerPointPrivate::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) {
437 q->createContextMenu()->exec(event->screenPos());

Callers

nothing calls this directly

Calls 5

setPenMethod · 0.80
QPointFClass · 0.70
QPenClass · 0.70
drawMethod · 0.45
colorMethod · 0.45

Tested by

no test coverage detected