| 28 | } |
| 29 | |
| 30 | void TOPPASMergerVertex::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) |
| 31 | { |
| 32 | TOPPASVertex::paint(painter, option, widget); |
| 33 | |
| 34 | QString text = round_based_mode_ ? "Merge" : "Collect"; |
| 35 | QRectF text_boundings = painter->boundingRect(QRectF(0, 0, 0, 0), Qt::AlignCenter, text); |
| 36 | painter->drawText(-(int)(text_boundings.width() / 2.0), (int)(text_boundings.height() / 4.0), text); |
| 37 | |
| 38 | if (round_total_ != -1) // draw round number |
| 39 | { |
| 40 | text = QString::number(round_counter_) + " / " + QString::number(round_total_); |
| 41 | text_boundings = painter->boundingRect(QRectF(0, 0, 0, 0), Qt::AlignCenter, text); |
| 42 | painter->drawText(-(int)(text_boundings.width() / 2.0), 31, text); |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | QRectF TOPPASMergerVertex::boundingRect() const |
| 47 | { |