| 423 | } |
| 424 | |
| 425 | void 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 | |
| 436 | void DatapickerPointPrivate::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) { |
| 437 | q->createContextMenu()->exec(event->screenPos()); |