Isis Developer Reference
ConcurrentControlNetReader.h
Go to the documentation of this file.
1 #ifndef ConcurrentControlNetReader_h
2 #define ConcurrentControlNetReader_h
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 #include <QObject>
13 #include <QPair>
14 #include <QPointer>
15 #include <QString>
16 #include <QStringList>
17 
18 #include "ProgressBar.h"
19 
20 template<typename A> class QAtomicPointer;
21 template<typename A> class QFutureWatcher;
22 
23 namespace Isis {
24  class Control;
25  class FileName;
26  class Progress;
27  class ProgressBar;
28 
29 
44  Q_OBJECT
45 
46  public:
49  void read(QString filename);
50  void read(QStringList filenames);
52 
53  signals:
55 
56  private:
57  void nullify();
58  void start();
59 
60  private slots:
61  void updateProgressValue();
62  void mappedFinished();
63 
64  private:
65  void initProgress();
66 
67  private:
69  QFutureWatcher<Control *> * m_watcher;
70  QStringList m_backlog;
71  bool m_mappedRunning;
72  QList<Progress *> m_progress;
73  QPointer<ProgressBar> m_progressBar;
74  QPointer<QTimer> m_progressUpdateTimer;
75 
83  class FileNameToControlFunctor : public std::unary_function<
84  const QPair<FileName, Progress *> &, Control *> {
85  public:
86  FileNameToControlFunctor(QThread *);
87  FileNameToControlFunctor(const FileNameToControlFunctor &);
88  ~FileNameToControlFunctor();
89  Control * operator()(const QPair<FileName, Progress *> &) const;
90  FileNameToControlFunctor & operator=(const FileNameToControlFunctor &);
91 
92  private:
93  QThread *m_targetThread;
94  };
95  };
96 }
97 
98 #endif
Isis::ConcurrentControlNetReader
This reads a control net in the background.
Definition: ConcurrentControlNetReader.h:43
FileName.h
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::ProgressBar
Definition: ProgressBar.h:15
Isis::ConcurrentControlNetReader::~ConcurrentControlNetReader
~ConcurrentControlNetReader()
This destructor will cancel all running threads and block.
Definition: ConcurrentControlNetReader.cpp:56
Isis::ConcurrentControlNetReader::ConcurrentControlNetReader
ConcurrentControlNetReader()
Allocates memory at construction instead of as needed.
Definition: ConcurrentControlNetReader.cpp:39
Isis::Control
This represents an ISIS control net in a project-based GUI interface.
Definition: Control.h:66
QStringList
IString.h
ConcurrentControlNetReader.h
ControlNet.h
Isis::ConcurrentControlNetReader::networksReady
void networksReady(QList< Control * >)
ProgressBar.h
IException.h
QThread
QPair
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:23
QFutureWatcher
This is free and unencumbered software released into the public domain.
Definition: AbstractTableModel.h:24
Isis::ConcurrentControlNetReader::read
void read(QString filename)
Definition: ConcurrentControlNetReader.cpp:79
QAtomicPointer
This is free and unencumbered software released into the public domain.
Definition: ConcurrentControlNetReader.h:20
Control.h
Isis::ConcurrentControlNetReader::progressBar
ProgressBar * progressBar()
Definition: ConcurrentControlNetReader.cpp:71
QObject
Progress.h
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16