| 75 | } |
| 76 | |
| 77 | void TOPPASSplitterVertex::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) |
| 78 | { |
| 79 | TOPPASVertex::paint(painter, option, widget); |
| 80 | |
| 81 | QString text = "Split"; |
| 82 | QRectF text_boundings = painter->boundingRect(QRectF(0, 0, 0, 0), Qt::AlignCenter, text); |
| 83 | painter->drawText(-(int)(text_boundings.width() / 2.0), (int)(text_boundings.height() / 4.0), text); |
| 84 | |
| 85 | if (round_total_ != -1) // draw round number |
| 86 | { |
| 87 | text = QString::number(round_counter_) + " / " + QString::number(round_total_); |
| 88 | text_boundings = painter->boundingRect(QRectF(0, 0, 0, 0), Qt::AlignCenter, text); |
| 89 | painter->drawText(-(int)(text_boundings.width() / 2.0), 31, text); |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | QRectF TOPPASSplitterVertex::boundingRect() const |
| 94 | { |