USGS

Isis 3.0 Developer's Reference (API)

Home

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 <QDir>
28 #include <QFutureWatcher>
29 
30 namespace Isis {
31  class Control;
32  class FileName;
33  class Progress;
34  class Project;
35 
48  Q_OBJECT
49  public:
53 
54  virtual ImportControlNetWorkOrder *clone() const;
55 
56  bool execute();
57 
58  protected:
59  void syncRedo();
60  void asyncRedo();
61  void postSyncRedo();
62  void syncUndo();
63 
64  private slots:
65  void cnetReady(int ready);
66 
67  private:
69 // Control *createControls(const QString &cnetFilename);
70 
77  class CreateControlsFunctor : public std::unary_function<
78  const QPair<FileName, Progress *> &, Control *> {
79  public:
80  CreateControlsFunctor(Project *project, QDir destinationFolder);
81  Control *operator()(const QPair<FileName, Progress *> &cnetFilename);
82 
83  private:
84  Project *m_project;
85  QDir m_destinationFolder;
86  };
87 
88  private:
89  QFutureWatcher<Control *> *m_watcher;
90  QList<Progress *> m_readProgresses;
91  };
92 }
93 #endif // ImportControlNetWorkOrder_H