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 
40 namespace 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) {
75  }
76 
77 
82  }
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";
148  }
149  }
150 }
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
The main project for ipce.
Definition: Project.h:289
JigsawWorkOrder(Project *project)
Constructs a JigsawWorkOrder.
virtual bool isExecutable()
This method is no longer necessary and will remain commented out until it needs to be implemented...
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:162
~JigsawWorkOrder()
Destructor.
Directory * directory() const
Returns the directory associated with this Project.
Definition: Project.cpp:1229
bool dependsOn(WorkOrder *other) const
This method returns true if other depends on a JigsawWorkOrder.
Provide Undo/redo abilities, serialization, and history for an operation.
Definition: WorkOrder.h:322
BundleSettingsQsp m_bundleSettings
BundleSettings shared betweeen setup and execute.
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:40
bool m_isUndoable
Set the workorder to be undoable/redoable This is defaulted to true - his will allow the workorder to...
Definition: WorkOrder.h:534
virtual void execute()
Executes the work order by creating a jigsaw dialog that allows the user to run or re-setup the setti...
This work order allows the user to run a bundle adjustment (jigsaw).
Isis exception class.
Definition: IException.h:107
virtual JigsawWorkOrder * clone() const
This method clones the JigsawViewWorkOrder.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Project * project() const
Returns the Project this WorkOrder is attached to.
Definition: WorkOrder.cpp:1314
This dialog allows the user to select the bundle adjust parameters, run the bundle, and view the results.
Directory * directory() const
return the workorder project directory Returns the Directory object of the Project this WorkOrder is ...
Definition: WorkOrder.cpp:1304