Isis Developer Reference
DisplayProperties.h
Go to the documentation of this file.
1#ifndef DisplayProperties_H
2#define DisplayProperties_H
3
10/* SPDX-License-Identifier: CC0-1.0 */
11
12#include <QObject>
13
14// This is required since QColor is in a slot
15#include <QColor>
16
17class QAction;
18class QBitArray;
19class QXmlStreamWriter;
20
21namespace Isis {
22 class FileName;
23 class Project;
24 class Pvl;
25 class PvlObject;
26
32 class DisplayProperties : public QObject {
33 Q_OBJECT
34 public:
35 DisplayProperties(QString displayName, QObject *parent = NULL);
36 virtual ~DisplayProperties();
37
38 void fromPvl(const PvlObject &pvl);
39 void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const;
40 PvlObject toPvl() const;
41
42 void addSupport(int property);
43 bool supports(int property);
44
45 QVariant getValue(int property) const;
46
47 void setDisplayName(QString displayName);
48 QString displayName() const;
49
50 static QColor randomColor();
51
52 signals:
54 void supportAdded(int);
55
56 protected:
57 void setValue(int prop, QVariant value);
58
59 private:
60 Q_DISABLE_COPY(DisplayProperties);
61
62
63 private:
64
68 QString m_displayName;
69
75 int m_propertiesUsed;
76
81 QMap<int, QVariant> *m_propertyValues;
82 };
83}
84
85#endif
Definition DisplayProperties.h:32
QVariant getValue(int property) const
Get a property's associated data.
Definition DisplayProperties.cpp:138
QString displayName() const
Returns the display name.
Definition DisplayProperties.cpp:79
void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const
Output format:
Definition DisplayProperties.cpp:150
void propertyChanged(DisplayProperties *)
void setDisplayName(QString displayName)
Sets display name.
Definition DisplayProperties.cpp:88
void setValue(int prop, QVariant value)
This is the generic mutator for properties.
Definition DisplayProperties.cpp:122
virtual ~DisplayProperties()
destructor
Definition DisplayProperties.cpp:41
void fromPvl(const PvlObject &pvl)
Definition DisplayProperties.cpp:45
static QColor randomColor()
PvlObject toPvl() const
Convert to Pvl for project files.
Definition DisplayProperties.cpp:59
DisplayProperties(QString displayName, QObject *parent=NULL)
DisplayProperties constructor.
Definition DisplayProperties.cpp:28
bool supports(int property)
Support may come later, please make sure you are connected to the supportAdded signal.
Definition DisplayProperties.cpp:113
void addSupport(int property)
Call this with every property you support, otherwise they will not communicate properly between widge...
Definition DisplayProperties.cpp:99
File name manipulation and expansion.
Definition FileName.h:100
The main project for ipce.
Definition Project.h:287
Contains Pvl Groups and Pvl Objects.
Definition PvlObject.h:61
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16