| 462 | } |
| 463 | |
| 464 | void TaskEditWidget::multiFilesRefresh() { |
| 465 | if (! editTask) |
| 466 | return; |
| 467 | |
| 468 | if (editTask->getTaskType() != Task::Communication && editTask->getTaskType() != Task::CommunicationExec) |
| 469 | return; |
| 470 | |
| 471 | QStringList sourcePaths = editTask->getSourceFilesPath(); |
| 472 | QStringList sourceNames = editTask->getSourceFilesName(); |
| 473 | ui->sourceFilesTable->setRowCount(sourcePaths.length()); |
| 474 | |
| 475 | for (int i = 0; i < sourcePaths.length(); i++) { |
| 476 | ui->sourceFilesTable->setItem(i, 0, new QTableWidgetItem(sourcePaths[i])); |
| 477 | ui->sourceFilesTable->setItem(i, 1, new QTableWidgetItem(sourceNames[i])); |
| 478 | } |
| 479 | |
| 480 | QStringList graderPaths = editTask->getGraderFilesPath(); |
| 481 | QStringList graderNames = editTask->getGraderFilesName(); |
| 482 | ui->graderFilesTable->setRowCount(graderPaths.length()); |
| 483 | |
| 484 | for (int i = 0; i < graderPaths.length(); i++) { |
| 485 | ui->graderFilesTable->setItem(i, 0, new QTableWidgetItem(graderPaths[i])); |
| 486 | ui->graderFilesTable->setItem(i, 1, new QTableWidgetItem(graderNames[i])); |
| 487 | } |
| 488 | } |
| 489 | |
| 490 | void TaskEditWidget::addSourceFiles(const QString &path, const QString &name) { |
| 491 | if (! editTask) |
nothing calls this directly
no test coverage detected