| 43 | } |
| 44 | |
| 45 | void TOPPASOutputFileListVertex::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) |
| 46 | { |
| 47 | TOPPASVertex::paint(painter, option, widget); |
| 48 | |
| 49 | QString text = QString::number(files_written_) + "/" |
| 50 | + QString::number(files_total_) + " output file" + (files_total_ == 1 ? "" : "s"); |
| 51 | QRectF text_boundings = painter->boundingRect(QRectF(0, 0, 0, 0), Qt::AlignCenter, text); |
| 52 | painter->drawText(-(int)(text_boundings.width() / 2.0), (int)(text_boundings.height() / 4.0), text); |
| 53 | |
| 54 | // display file type(s) |
| 55 | QStringList text_l = TOPPASVertex::TOPPASFilenames(getFileNames()).getSuffixCounts(); |
| 56 | text = text_l.join(" | "); |
| 57 | // might get very long, especially if node was not reached yet, so trim |
| 58 | text = text.left(15) + " ..."; |
| 59 | text_boundings = painter->boundingRect(QRectF(0, 0, 0, 0), Qt::AlignCenter, text); |
| 60 | painter->drawText(-(int)(text_boundings.width() / 2.0), 35 - (int)(text_boundings.height() / 4.0), text); |
| 61 | |
| 62 | // output folder name |
| 63 | painter->drawText(painter->boundingRect(QRectF(0, 0, 0, 0), Qt::AlignCenter, output_folder_name_).width()/-2, -25, output_folder_name_); |
| 64 | } |
| 65 | |
| 66 | void TOPPASOutputFileListVertex::setOutputFolderName(const QString& name) |
| 67 | { |
nothing calls this directly
no test coverage detected