Isis 3 Programmer Reference
CnetDisplayProperties.h
1 #ifndef CnetDisplayProperties_H
2 #define CnetDisplayProperties_H
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 #include <QObject>
13 
14 
15 class QAtomicInt;
16 template< typename T > class QFutureWatcher;
17 template< typename A, typename B > class QMap;
18 class QReadWriteLock;
19 class QString;
20 class QTimer;
21 
22 
23 namespace Isis {
24  class ControlNet;
25 
41  class CnetDisplayProperties : public QObject {
42  Q_OBJECT
43 
44  public:
45  // this is a singleton class!
46  static CnetDisplayProperties *getInstance();
47  virtual ~CnetDisplayProperties();
48 
49  bool currentlyComposing() const;
50 
52  QString getFileName(QString fileName, bool forceFullPaths = false) const;
53  QString getImageName(QString cubeSerialNumber,
54  bool forceFullPaths = false) const;
55  QString getSerialNumber(QString imageId);
56  bool getShowsFullPaths() const;
57 
58  void setCubeList(QString fileName);
59  void setFileNameUsage(bool preferFileNames);
60  void setShowsFullPaths(bool newState);
61 
62 
63  private:
65 
66 
67  private: // not implemented
69  CnetDisplayProperties &operator=(CnetDisplayProperties const &);
70 
71 
72  signals:
73  void composeProgressChanged(int);
74  void composeProgressRangeChanged(int, int);
75  void compositionFinished();
76 
77 
78  private:
79  QMap< QString, QString > composeSerialNumbers(QStringList fileNames);
80  void nullify();
81 
82 
83  private slots:
84  void composeStatusUpdated();
85  void serialNumbersComposed();
86 
87 
88  private:
89  bool useFileNames;
90  QMap< QString, QString > * m_serialNumberToFileNameMap;
91 
92  QFutureWatcher< QMap< QString, QString > > * m_composeWatcher;
93  QTimer *m_composeStatusPoller;
94 
95  QAtomicInt *m_composedCount;
96  QAtomicInt *m_interruptFlag;
97  bool m_curComposing;
98  bool m_showFullPath;
99  QReadWriteLock *m_readWriteLock;
100 
101  static CnetDisplayProperties *m_instance;
102  };
103 }
104 
105 #endif
QList< QString >
QStringList
Isis::CnetDisplayProperties::getCubeList
QList< QString > getCubeList(ControlNet *cnet) const
TODO comment me.
Definition: CnetDisplayProperties.cpp:114
Isis::ControlNet
a control network
Definition: ControlNet.h:257
Isis::CnetDisplayProperties::getImageName
QString getImageName(QString cubeSerialNumber, bool forceFullPaths=false) const
Definition: CnetDisplayProperties.cpp:154
QFutureWatcher
This is free and unencumbered software released into the public domain.
Definition: AbstractTableModel.h:24
QMap
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:22
Isis::CnetDisplayProperties
Handles how control networks should be displayed to the user.
Definition: CnetDisplayProperties.h:41
QObject
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16