2 #include "MosaicSceneWorkOrder.h"
4 #include <QProgressDialog>
7 #include "Footprint2DView.h"
8 #include "MosaicSceneWidget.h"
12 MosaicSceneWorkOrder::MosaicSceneWorkOrder(QString actionText, MosaicSceneWidget *scene,
13 Project *project) : WorkOrder(project) {
15 QAction::setText(actionText);
16 QUndoCommand::setText(tr(
"%1 on [%2]").arg(actionText).arg(scene->windowTitle()));
19 data.append(scene->windowTitle());
20 setInternalData(data);
24 MosaicSceneWorkOrder::MosaicSceneWorkOrder(Project *project) :
29 MosaicSceneWorkOrder::MosaicSceneWorkOrder(
const MosaicSceneWorkOrder &other) :
56 result =
scene->mosaicSceneWidget();
70 ASSERT(zPositions.count() ==
imageList()->count());
74 QProgressDialog progress(tr(
"Restoring Z Values"),
"", 0,
imageList()->count());
75 progress.setCancelButton(NULL);
76 for (
int i =
imageList()->count() - 1; i >= 0; i--) {
77 int originalZ = qRound(zPositions[i].
toDouble());
78 sceneWidget->
moveZ(
imageList()->at(i), originalZ, zValuesMightBeInUse);
79 progress.setValue(progress.value() + 1);
84 void MosaicSceneWorkOrder::storeZPositions(
QList<double> zPositions) {
88 foreach (
double zPosition, zPositions) {
89 data.append(QString::number(qRound(zPosition)));