Isis 3 Programmer Reference
Isis::DisplayProperties Class Reference

#include <DisplayProperties.h>

Inheritance diagram for Isis::DisplayProperties:
Inheritance graph
Collaboration diagram for Isis::DisplayProperties:
Collaboration graph

Classes

class  XmlHandler
 

Signals

void propertyChanged (DisplayProperties *)
 
void supportAdded (int)
 

Public Member Functions

 DisplayProperties (QString displayName, QObject *parent=NULL)
 DisplayProperties constructor. More...
 
 DisplayProperties (XmlStackedHandlerReader *xmlReader, QObject *parent=NULL)
 
virtual ~DisplayProperties ()
 destructor More...
 
void fromPvl (const PvlObject &pvl)
 
void save (QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const
 Output format: More...
 
PvlObject toPvl () const
 Convert to Pvl for project files. More...
 
void addSupport (int property)
 Call this with every property you support, otherwise they will not communicate properly between widgets. More...
 
bool supports (int property)
 Support may come later, please make sure you are connected to the supportAdded signal. More...
 
QVariant getValue (int property) const
 Get a property's associated data. More...
 
void setDisplayName (QString displayName)
 Sets display name. More...
 
QString displayName () const
 Returns the display name. More...
 

Static Public Member Functions

static QColor randomColor ()
 

Protected Member Functions

void setValue (int prop, QVariant value)
 This is the generic mutator for properties. More...
 

Private Member Functions

 Q_DISABLE_COPY (DisplayProperties)
 

Private Attributes

QString m_displayName
 This is the display name. More...
 
int m_propertiesUsed
 This indicated whether any widgets with this DisplayProperties is using a particulay property. More...
 
QMap< int, QVariant > * m_propertyValues
 This is a map from Property to value – the reason I use an int is so Qt knows how to serialize this QMap into binary data. More...
 

Detailed Description

Author
2012-??-?? ???

Definition at line 26 of file DisplayProperties.h.

Constructor & Destructor Documentation

◆ DisplayProperties()

Isis::DisplayProperties::DisplayProperties ( QString  displayName,
QObject parent = NULL 
)

DisplayProperties constructor.

This sets default values and constructs the Cube *. You cannot have much more than 1K of these without calling closeCube().

Parameters
displayNameThe filename (fully expanded) of the object.
parentQt parent object (this is destroyed when parent is destroyed)

Definition at line 21 of file DisplayProperties.cpp.

References displayName(), m_displayName, m_propertiesUsed, and m_propertyValues.

◆ ~DisplayProperties()

Isis::DisplayProperties::~DisplayProperties ( )
virtual

destructor

Definition at line 42 of file DisplayProperties.cpp.

Member Function Documentation

◆ addSupport()

void Isis::DisplayProperties::addSupport ( int  property)

Call this with every property you support, otherwise they will not communicate properly between widgets.

Parameters
propThe property you are adding support for

Definition at line 100 of file DisplayProperties.cpp.

References m_propertiesUsed, and supports().

Referenced by Isis::ImageTreeWidgetItem::ImageTreeWidgetItem(), and Isis::MosaicSceneItem::MosaicSceneItem().

◆ displayName()

◆ getValue()

◆ save()

void Isis::DisplayProperties::save ( QXmlStreamWriter &  stream,
const Project project,
FileName  newProjectRoot 
) const

Output format:

<displayProperties displayname="..."> Hex-encoded data </displayProperties>

Definition at line 151 of file DisplayProperties.cpp.

References displayName().

Referenced by Isis::Image::save().

◆ setDisplayName()

void Isis::DisplayProperties::setDisplayName ( QString  displayName)

Sets display name.

Parameters
displayNameDisplay name of the object.

Definition at line 89 of file DisplayProperties.cpp.

References displayName(), and m_displayName.

◆ setValue()

void Isis::DisplayProperties::setValue ( int  property,
QVariant  value 
)
protected

◆ supports()

bool Isis::DisplayProperties::supports ( int  property)

Support may come later, please make sure you are connected to the supportAdded signal.

Returns
True if the property has support, false otherwise

Definition at line 114 of file DisplayProperties.cpp.

References m_propertiesUsed.

Referenced by addSupport(), Isis::ImageList::allSupport(), and setValue().

◆ toPvl()

PvlObject Isis::DisplayProperties::toPvl ( ) const

Convert to Pvl for project files.

This stores all of the data associated with all of the properties (but not what is supported). This also stores the cube filename.

Definition at line 60 of file DisplayProperties.cpp.

References displayName().

Member Data Documentation

◆ m_displayName

QString Isis::DisplayProperties::m_displayName
private

This is the display name.

Definition at line 87 of file DisplayProperties.h.

Referenced by displayName(), DisplayProperties(), and setDisplayName().

◆ m_propertiesUsed

int Isis::DisplayProperties::m_propertiesUsed
private

This indicated whether any widgets with this DisplayProperties is using a particulay property.

This helps others who can set but not display know whether they should give the option to set.

Definition at line 94 of file DisplayProperties.h.

Referenced by addSupport(), DisplayProperties(), and supports().

◆ m_propertyValues

QMap<int, QVariant>* Isis::DisplayProperties::m_propertyValues
private

This is a map from Property to value – the reason I use an int is so Qt knows how to serialize this QMap into binary data.

Definition at line 100 of file DisplayProperties.h.

Referenced by DisplayProperties(), getValue(), and setValue().


The documentation for this class was generated from the following files: