Changeset 9cf98b9bd6 in tspsg for src/mainwindow.cpp
- Timestamp:
- Sep 2, 2009, 2:37:39 AM (15 years ago)
- Branches:
- 0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
- Children:
- 41d264adbd
- Parents:
- 244c614c6b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mainwindow.cpp
r244c614c6b r9cf98b9bd6 457 457 sStep *step = root; 458 458 n = 1; 459 QString path = "";460 459 while (n <= spinCities->value()) { 461 460 if (step->prNode->prNode != NULL || (step->prNode->prNode == NULL && step->plNode->prNode == NULL)) { … … 467 466 output.append("<p> </p>"); 468 467 } 469 path += QString(" (%1,%2)").arg(step->candidate.nRow + 1).arg(step->candidate.nCol + 1);470 468 } 471 469 if (step->prNode->prNode != NULL) … … 476 474 break; 477 475 } 478 output.append("<p>" + trUtf8("Optimal path:") + "</p>"); 479 output.append("<p> " + path + "</p>"); 476 if (solver.isOptimal()) 477 output.append("<p>" + trUtf8("Optimal path:") + "</p>"); 478 else 479 output.append("<p>" + trUtf8("Resulting path:") + "</p>"); 480 output.append("<p> " + solver.getSortedPath() + "</p>"); 480 481 output.append("<p>" + trUtf8("The price is <b>%1</b> units.").arg(step->price) + "</p>"); 482 if (!solver.isOptimal()) { 483 output.append("<p> </p>"); 484 output.append("<p>" + trUtf8("<b>WARNING!!!</b><br>This result is a record, but it may not be optimal.<br>Iterations need to be continued to check whether this result is optimal or get an optimal one.") + "</p>"); 485 } 481 486 solutionText->setHtml(output.join("")); 482 487 solutionText->setDocumentTitle(trUtf8("Solution of Variant #%1 task").arg(spinVariant->value()));
Note: See TracChangeset
for help on using the changeset viewer.