Isis 3 Developer Reference
ImportControlNetWorkOrder.h
Go to the documentation of this file.
1 #ifndef ImportControlNetWorkOrder_H
2 #define ImportControlNetWorkOrder_H
3 
25 #include "WorkOrder.h"
26 
27 #include <functional>
28 
29 #include <QDir>
30 #include <QFutureWatcher>
31 #include <QString>
32 
33 #include "IException.h"
34 
35 namespace Isis {
36  class Control;
37  class FileName;
38  class Progress;
39  class Project;
40 
73  Q_OBJECT
74  public:
78 
79  virtual ImportControlNetWorkOrder *clone() const;
80 
81  virtual bool isExecutable(ProjectItem *item);
82  bool setupExecution();
83  void execute();
84 
85  protected:
86  void postExecution();
87 
88  private slots:
89  void cnetReady(int ready);
90 
91  private:
93 // Control *createControls(const QString &cnetFilename);
94 
101  class CreateControlsFunctor : public std::unary_function<
102  const QPair<FileName, Progress *> &, Control *> {
103  public:
104  CreateControlsFunctor(Project *project, QDir destinationFolder);
105  Control *operator()(const QPair<FileName, Progress *> &cnetFilename);
106  IException errors() const;
107 
108  private:
109  Project *m_project;
110  QDir m_destinationFolder;
111  QSharedPointer<IException> m_errors;
112  };
113 
114  private:
115  QFutureWatcher<Control *> *m_watcher;
116  ControlList *m_list;
117  QList<Progress *> m_readProgresses;
118  QString m_warning;
119  };
120 }
121 #endif // ImportControlNetWorkOrder_H
This represents an ISIS control net in a project-based GUI interface.
Definition: Control.h:79
virtual ImportControlNetWorkOrder * clone() const
This method clones the current ImportControlNetWorkOrder and returns it.
Definition: ImportControlNetWorkOrder.cpp:92
The main project for ipce.
Definition: Project.h:289
~ImportControlNetWorkOrder()
Destructor.
Definition: ImportControlNetWorkOrder.cpp:81
virtual bool isExecutable(ProjectItem *item)
This method returns true if the user clicked on a project tree node with the text "Control Networks"...
Definition: ImportControlNetWorkOrder.cpp:107
Maintains a list of Controls so that control nets can easily be copied from one Project to another...
Definition: ControlList.h:36
Provide Undo/redo abilities, serialization, and history for an operation.
Definition: WorkOrder.h:322
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
Add control networks to a project c Asks the user for a list of control nets and copies them into the...
Definition: ImportControlNetWorkOrder.h:72
Definition: AbstractTableModel.h:16
void postExecution()
Clears progress.
Definition: ImportControlNetWorkOrder.cpp:199
bool setupExecution()
Sets up the work order for execution.
Definition: ImportControlNetWorkOrder.cpp:126
Definition: JigsawWorkOrder.h:28
ImportControlNetWorkOrder(Project *project)
Creates a work order to import a control network.
Definition: ImportControlNetWorkOrder.cpp:47
void execute()
Imports the control network asynchronously.
Definition: ImportControlNetWorkOrder.cpp:151
Represents an item of a ProjectItemModel in Qt&#39;s model-view framework.
Definition: ProjectItem.h:146
Isis exception class.
Definition: IException.h:107
Definition: BoxcarCachingAlgorithm.h:29
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
Definition: CubeIoHandler.h:39