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
20template<typename A> class QAtomicPointer;
21template<typename A> class QFutureWatcher;
22
23namespace 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
This reads a control net in the background.
Definition: ConcurrentControlNetReader.h:43
void read(QString filename)
Definition: ConcurrentControlNetReader.cpp:79
ProgressBar * progressBar()
Definition: ConcurrentControlNetReader.cpp:71
void networksReady(QList< Control * >)
ConcurrentControlNetReader()
Allocates memory at construction instead of as needed.
Definition: ConcurrentControlNetReader.cpp:39
~ConcurrentControlNetReader()
This destructor will cancel all running threads and block.
Definition: ConcurrentControlNetReader.cpp:56
This represents an ISIS control net in a project-based GUI interface.
Definition: Control.h:66
Definition: ProgressBar.h:15
This is free and unencumbered software released into the public domain.
Definition: ConcurrentControlNetReader.h:20
This is free and unencumbered software released into the public domain.
Definition: AbstractTableModel.h:24
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:23