Isis Developer Reference
CnetDisplayProperties.h
Go to the documentation of this file.
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!
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:
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
Cube.h
Isis::CnetDisplayProperties::setShowsFullPaths
void setShowsFullPaths(bool newState)
Definition: CnetDisplayProperties.cpp:260
QList< QString >
Isis::CnetDisplayProperties::getInstance
static CnetDisplayProperties * getInstance()
Definition: CnetDisplayProperties.cpp:39
Isis::CnetDisplayProperties::getSerialNumber
QString getSerialNumber(QString imageId)
Definition: CnetDisplayProperties.cpp:178
CnetDisplayProperties.h
Isis::SerialNumber::Compose
static QString Compose(Pvl &label, bool def2filename=false)
Compose a SerialNumber from a PVL.
Definition: SerialNumber.cpp:38
Isis::CnetDisplayProperties::getShowsFullPaths
bool getShowsFullPaths() const
Definition: CnetDisplayProperties.cpp:203
Isis::CnetDisplayProperties::composeProgressRangeChanged
void composeProgressRangeChanged(int, int)
QStringList
Isis::ControlNet::GetCubeSerials
QList< QString > GetCubeSerials() const
Use this method to get a complete list of all the cube serial numbers in the network.
Definition: ControlNet.cpp:1016
IString.h
ControlNet.h
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::CnetDisplayProperties::getCubeList
QList< QString > getCubeList(ControlNet *cnet) const
TODO comment me.
Definition: CnetDisplayProperties.cpp:114
Isis::CnetDisplayProperties::getFileName
QString getFileName(QString fileName, bool forceFullPaths=false) const
Definition: CnetDisplayProperties.cpp:130
Isis::ControlNet
a control network
Definition: ControlNet.h:257
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::IException
Isis exception class.
Definition: IException.h:91
ASSERT
#define ASSERT(x)
Definition: IsisDebug.h:134
Isis::CnetDisplayProperties::getImageName
QString getImageName(QString cubeSerialNumber, bool forceFullPaths=false) const
Definition: CnetDisplayProperties.cpp:154
IException.h
Isis::IException::Programmer
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
Isis::CnetDisplayProperties::composeProgressChanged
void composeProgressChanged(int)
Isis::CnetDisplayProperties::setCubeList
void setCubeList(QString fileName)
Definition: CnetDisplayProperties.cpp:208
QFutureWatcher
This is free and unencumbered software released into the public domain.
Definition: AbstractTableModel.h:24
QMap< QString, QString >
Isis::CnetDisplayProperties::compositionFinished
void compositionFinished()
Isis::IString
Adds specific functionality to C++ strings.
Definition: IString.h:165
Isis::CnetDisplayProperties
Handles how control networks should be displayed to the user.
Definition: CnetDisplayProperties.h:41
QObject
Isis::Cube::open
void open(const QString &cfile, QString access="r")
This method will open an isis cube for reading or reading/writing.
Definition: Cube.cpp:627
Isis::CnetDisplayProperties::~CnetDisplayProperties
virtual ~CnetDisplayProperties()
Definition: CnetDisplayProperties.cpp:86
IsisDebug.h
SerialNumber.h
Isis::CnetDisplayProperties::setFileNameUsage
void setFileNameUsage(bool preferFileNames)
Definition: CnetDisplayProperties.cpp:242
Isis::CnetDisplayProperties::currentlyComposing
bool currentlyComposing() const
Definition: CnetDisplayProperties.cpp:101
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16