| 481 | } |
| 482 | |
| 483 | void ReferenceRangePrivate::paint(QPainter* painter, const QStyleOptionGraphicsItem* /*option*/, QWidget*) { |
| 484 | if (!m_visible) |
| 485 | return; |
| 486 | |
| 487 | if (rect.width() == 0 || rect.height() == 0) |
| 488 | return; |
| 489 | |
| 490 | // draw the background filling |
| 491 | if (background->enabled()) |
| 492 | background->draw(painter, QPolygonF(rect)); |
| 493 | |
| 494 | // draw the border |
| 495 | if (line->style() != Qt::NoPen) { |
| 496 | painter->setPen(line->pen()); |
| 497 | painter->setBrush(Qt::NoBrush); |
| 498 | painter->setOpacity(line->opacity()); |
| 499 | } |
| 500 | |
| 501 | painter->drawPath(m_shape); |
| 502 | |
| 503 | if (m_hovered && !isSelected() && !q->isPrinting()) { |
| 504 | painter->setPen(QPen(QApplication::palette().color(QPalette::Shadow), 2, Qt::SolidLine)); |
| 505 | painter->drawPath(m_shape); |
| 506 | } |
| 507 | |
| 508 | if (isSelected() && !q->isPrinting()) { |
| 509 | painter->setPen(QPen(QApplication::palette().color(QPalette::Highlight), 2, Qt::SolidLine)); |
| 510 | painter->drawPath(m_shape); |
| 511 | } |
| 512 | } |
| 513 | |
| 514 | // ############################################################################## |
| 515 | // ################## Serialization/Deserialization ########################### |
nothing calls this directly
no test coverage detected