| 320 | } |
| 321 | |
| 322 | void MainWindow::showProcessSettings(IPProcessStep* processStep) |
| 323 | { |
| 324 | ui->dockSettings->setVisible(true); |
| 325 | ui->dockProcesses->setVisible(false); |
| 326 | |
| 327 | // add description |
| 328 | if(processStep->process()->description().length() > 0) |
| 329 | { |
| 330 | ui->lblProcessDescription->setText(QString::fromStdString(processStep->process()->description())); |
| 331 | ui->lblProcessDescription->setVisible(true); |
| 332 | } |
| 333 | else |
| 334 | { |
| 335 | ui->lblProcessDescription->setVisible(false); |
| 336 | } |
| 337 | |
| 338 | // change title |
| 339 | QString title = QString::fromStdString(processStep->process()->title()); |
| 340 | ui->lblProcessSettings->setText(title); |
| 341 | |
| 342 | // hide help button because it is currently not used |
| 343 | //ui->btnHelpPage->hide(); |
| 344 | |
| 345 | // add inputs/outputs |
| 346 | if(processStep->process()->inputs()->size() > 0 || processStep->process()->outputs()->size() > 0) |
| 347 | { |
| 348 | QString msgInputsOutputs; |
| 349 | |
| 350 | if(processStep->process()->inputs()->size() > 0) |
| 351 | { |
| 352 | msgInputsOutputs.append("<b>Inputs:</b>"); |
| 353 | for(int i=0; i < (int)processStep->process()->inputs()->size(); i++) |
| 354 | { |
| 355 | IPLProcessIO input = processStep->process()->inputs()->at(i); |
| 356 | QString msgString("<br />%1: %2 (<i>%3</i>)"); |
| 357 | msgInputsOutputs.append(msgString |
| 358 | .arg(input.index) |
| 359 | .arg(QString::fromStdString(input.name)) |
| 360 | .arg(QString::fromStdString(dataTypeName(input.type)))); |
| 361 | } |
| 362 | } |
| 363 | |
| 364 | if(processStep->process()->outputs()->size() > 0) |
| 365 | { |
| 366 | if(processStep->process()->inputs()->size() > 0) |
| 367 | msgInputsOutputs.append("<br />"); |
| 368 | |
| 369 | msgInputsOutputs.append("<b>Outputs:</b>"); |
| 370 | for(int i=0; i < (int)processStep->process()->outputs()->size(); i++) |
| 371 | { |
| 372 | IPLProcessIO output = processStep->process()->outputs()->at(i); |
| 373 | QString msgString("<br />%1: %2 (<i>%3</i>)"); |
| 374 | msgInputsOutputs.append(msgString |
| 375 | .arg(output.index) |
| 376 | .arg(QString::fromStdString(output.name)) |
| 377 | .arg(QString::fromStdString(dataTypeName(output.type)))); |
| 378 | } |
| 379 | } |