| 39 | } |
| 40 | |
| 41 | void IPProcessInputOutputWidget::updateInputsOutputs() |
| 42 | { |
| 43 | if(_processStep && isVisible()) |
| 44 | { |
| 45 | // remove all children |
| 46 | while (layout()->count() > 0) |
| 47 | { |
| 48 | QLayoutItem* item = layout()->takeAt(0); |
| 49 | if(item != NULL) |
| 50 | { |
| 51 | delete item->widget(); |
| 52 | delete item; |
| 53 | } |
| 54 | } |
| 55 | // delete layout(); |
| 56 | |
| 57 | // add outputs |
| 58 | for(IPLProcessIO output: *_processStep->process()->outputs()) |
| 59 | { |
| 60 | //QString tmp = QString::fromStdString(dataTypeName(output.type)); |
| 61 | QString msgString("<b>Output %1: </b> %2"); |
| 62 | QLabel* msgLabel = new QLabel(msgString.arg(output.index).arg(QString::fromStdString(dataTypeName(output.type))), this); |
| 63 | msgLabel->setWordWrap(true); |
| 64 | msgLabel->setStyleSheet("color: #a94442; background-color: #f2dede; border: 1px solid #ebccd1; padding:4px; margin: 2px 0px 2px 0px;"); |
| 65 | this->layout()->addWidget(msgLabel); |
| 66 | } |
| 67 | } |
| 68 | } |
nothing calls this directly
no test coverage detected