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";
147  throw IException(IException::Programmer, msg, _FILEINFO_);
148  }
149  }
150 }
Isis::JigsawWorkOrder::m_bundleSettings
BundleSettingsQsp m_bundleSettings
BundleSettings shared betweeen setup and execute.
Definition: JigsawWorkOrder.h:79
Isis::JigsawWorkOrder::dependsOn
bool dependsOn(WorkOrder *other) const
This method returns true if other depends on a JigsawWorkOrder.
Definition: JigsawWorkOrder.cpp:131
Isis::WorkOrder
Provide Undo/redo abilities, serialization, and history for an operation.
Definition: WorkOrder.h:311
Project.h
Isis::JigsawWorkOrder::isExecutable
virtual bool isExecutable()
This method is no longer necessary and will remain commented out until it needs to be implemented.
Definition: JigsawWorkOrder.cpp:115
Isis::JigsawWorkOrder::JigsawWorkOrder
JigsawWorkOrder(Project *project)
Constructs a JigsawWorkOrder.
Definition: JigsawWorkOrder.cpp:55
JigsawWorkOrder.h
Isis::WorkOrder::directory
Directory * directory() const
return the workorder project directory Returns the Directory object of the Project this WorkOrder is ...
Definition: WorkOrder.cpp:1290
Isis::Project
The main project for ipce.
Definition: Project.h:289
Isis::Project::directory
Directory * directory() const
Returns the directory associated with this Project.
Definition: Project.cpp:1229
Isis::WorkOrder::m_isUndoable
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
Isis::WorkOrder::project
Project * project() const
Returns the Project this WorkOrder is attached to.
Definition: WorkOrder.cpp:1300
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::JigsawWorkOrder::clone
virtual JigsawWorkOrder * clone() const
This method clones the JigsawViewWorkOrder.
Definition: JigsawWorkOrder.cpp:90
Isis::IException::Programmer
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
Isis::JigsawWorkOrder
This work order allows the user to run a bundle adjustment (jigsaw).
Definition: JigsawWorkOrder.h:62
Isis::JigsawWorkOrder::~JigsawWorkOrder
~JigsawWorkOrder()
Destructor.
Definition: JigsawWorkOrder.cpp:81
Isis::JigsawRunWidget
This dialog allows the user to select the bundle adjust parameters, run the bundle,...
Definition: JigsawRunWidget.h:109
Isis::JigsawWorkOrder::execute
virtual void execute()
Executes the work order by creating a jigsaw dialog that allows the user to run or re-setup the setti...
Definition: JigsawWorkOrder.cpp:143
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16