Isis 3 Programmer Reference
JigsawWorkOrder.cpp
Go to the documentation of this file.
1
23#include "JigsawWorkOrder.h"
24
25#include <QtDebug>
26
27#include <QDialog>
28#include <QDockWidget>
29#include <QFileDialog>
30#include <QInputDialog>
31#include <QMessageBox>
32
33#include "BundleSolutionInfo.h"
34#include "Control.h"
35#include "Directory.h"
36#include "JigsawRunWidget.h"
37#include "JigsawSetupDialog.h"
38#include "Project.h"
39
40namespace Isis {
41
56 WorkOrder(project) {
57 // This work order is synchronous and not undoable
58 m_isUndoable = false;
59 QAction::setText(tr("&Bundle Adjustment..."));
60 QUndoCommand::setText("&Bundle Adjustment...");
61 QString hoverText = "Runs a bundle adjustment. ";
62 hoverText += "You must import a control net and images before you can run a bundle adjustment.";
63 QAction::setToolTip(hoverText);
64 }
65
66
73 WorkOrder(other) {
74 m_bundleSettings = other.m_bundleSettings;
75 }
76
77
83
84
91 return new JigsawWorkOrder(*this);
92 }
93
94
105// bool JigsawWorkOrder::setupExecution() {
106// }
107
108
116 // Is this code ever run?
117 return (project()->controls().size() > 0 &&
118 project()->images().size() > 0 &&
119 !project()->directory()->jigsawRunWidget());
120 }
121
122
132 // depend on types of ourselves.
133 return dynamic_cast<JigsawWorkOrder *>(other);
134 }
135
136
144 JigsawRunWidget *runWidget = project()->directory()->addJigsawRunWidget();
145 if (!runWidget) {
146 QString msg = "Unable to open Jigsaw Run Widget";
147 throw IException(IException::Programmer, msg, _FILEINFO_);
148 }
149 }
150}
Isis exception class.
Definition IException.h:91
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition IException.h:146
This dialog allows the user to select the bundle adjust parameters, run the bundle,...
This work order allows the user to run a bundle adjustment (jigsaw).
virtual JigsawWorkOrder * clone() const
This method clones the JigsawViewWorkOrder.
virtual bool isExecutable()
This method is no longer necessary and will remain commented out until it needs to be implemented.
BundleSettingsQsp m_bundleSettings
BundleSettings shared betweeen setup and execute.
virtual void execute()
Executes the work order by creating a jigsaw dialog that allows the user to run or re-setup the setti...
bool dependsOn(WorkOrder *other) const
This method returns true if other depends on a JigsawWorkOrder.
JigsawWorkOrder(Project *project)
Constructs a JigsawWorkOrder.
The main project for ipce.
Definition Project.h:289
Directory * directory() const
Returns the directory associated with this Project.
Definition Project.cpp:1228
Provide Undo/redo abilities, serialization, and history for an operation.
Definition WorkOrder.h:311
bool m_isUndoable
Set the workorder to be undoable/redoable This is defaulted to true - his will allow the workorder to...
Definition WorkOrder.h:523
Directory * directory() const
return the workorder project directory Returns the Directory object of the Project this WorkOrder is ...
Project * project() const
Returns the Project this WorkOrder is attached to.
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16