Isis 3 Programmer Reference
ConcurrentControlNetReader.h
Go to the documentation of this file.
1 #ifndef ConcurrentControlNetReader_h
2 #define ConcurrentControlNetReader_h
3 
26 #include <QObject>
27 #include <QPair>
28 #include <QPointer>
29 #include <QString>
30 #include <QStringList>
31 
32 #include "ProgressBar.h"
33 
34 template<typename A> class QAtomicPointer;
35 template<typename A> class QFutureWatcher;
36 
37 namespace Isis {
38  class Control;
39  class FileName;
40  class Progress;
41  class ProgressBar;
42 
43 
58  Q_OBJECT
59 
60  public:
63  void read(QString filename);
64  void read(QStringList filenames);
65  ProgressBar *progressBar();
66 
67  signals:
68  void networksReady(QList<Control *>);
69 
70  private:
71  void nullify();
72  void start();
73 
74  private slots:
75  void updateProgressValue();
76  void mappedFinished();
77 
78  private:
79  void initProgress();
80 
81  private:
84  QStringList m_backlog;
85  bool m_mappedRunning;
86  QList<Progress *> m_progress;
87  QPointer<ProgressBar> m_progressBar;
88  QPointer<QTimer> m_progressUpdateTimer;
89 
97  class FileNameToControlFunctor : public std::unary_function<
98  const QPair<FileName, Progress *> &, Control *> {
99  public:
103  Control * operator()(const QPair<FileName, Progress *> &) const;
105 
106  private:
107  QThread *m_targetThread;
108  };
109  };
110 }
111 
112 #endif
This represents an ISIS control net in a project-based GUI interface.
Definition: Control.h:79
void nullify()
Initializes members to NULL.
QFutureWatcher< Control * > * m_watcher
provides SIGNALS / SLOTS for FileNameToControlFunctor
ConcurrentControlNetReader()
Allocates memory at construction instead of as needed.
~ConcurrentControlNetReader()
This destructor will cancel all running threads and block.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
This reads a control net in the background.