Isis 3 Programmer Reference
CnetDisplayProperties.h
1 #ifndef CnetDisplayProperties_H
2 #define CnetDisplayProperties_H
3 
4 
5 #include <QObject>
6 
7 
8 class QAtomicInt;
9 template< typename T > class QFutureWatcher;
10 template< typename A, typename B > class QMap;
11 class QReadWriteLock;
12 class QString;
13 class QTimer;
14 
15 
16 namespace Isis {
17  class ControlNet;
18 
34  class CnetDisplayProperties : public QObject {
35  Q_OBJECT
36 
37  public:
38  // this is a singleton class!
39  static CnetDisplayProperties *getInstance();
40  virtual ~CnetDisplayProperties();
41 
42  bool currentlyComposing() const;
43 
45  QString getFileName(QString fileName, bool forceFullPaths = false) const;
46  QString getImageName(QString cubeSerialNumber,
47  bool forceFullPaths = false) const;
48  QString getSerialNumber(QString imageId);
49  bool getShowsFullPaths() const;
50 
51  void setCubeList(QString fileName);
52  void setFileNameUsage(bool preferFileNames);
53  void setShowsFullPaths(bool newState);
54 
55 
56  private:
58 
59 
60  private: // not implemented
62  CnetDisplayProperties &operator=(CnetDisplayProperties const &);
63 
64 
65  signals:
66  void composeProgressChanged(int);
67  void composeProgressRangeChanged(int, int);
68  void compositionFinished();
69 
70 
71  private:
72  QMap< QString, QString > composeSerialNumbers(QStringList fileNames);
73  void nullify();
74 
75 
76  private slots:
77  void composeStatusUpdated();
78  void serialNumbersComposed();
79 
80 
81  private:
82  bool useFileNames;
83  QMap< QString, QString > * m_serialNumberToFileNameMap;
84 
85  QFutureWatcher< QMap< QString, QString > > * m_composeWatcher;
86  QTimer *m_composeStatusPoller;
87 
88  QAtomicInt *m_composedCount;
89  QAtomicInt *m_interruptFlag;
90  bool m_curComposing;
91  bool m_showFullPath;
92  QReadWriteLock *m_readWriteLock;
93 
94  static CnetDisplayProperties *m_instance;
95  };
96 }
97 
98 #endif
99 
QString getImageName(QString cubeSerialNumber, bool forceFullPaths=false) const
a control network
Definition: ControlNet.h:271
QList< QString > getCubeList(ControlNet *cnet) const
TODO comment me.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Handles how control networks should be displayed to the user.