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 34 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 29 of file DisplayProperties.cpp.

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

◆ ~DisplayProperties()

Isis::DisplayProperties::~DisplayProperties ( )
virtual

destructor

Definition at line 50 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 108 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 159 of file DisplayProperties.cpp.

References displayName(), and m_propertyValues.

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

◆ setDisplayName()

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

Sets display name.

Parameters
displayNameDisplay name of the object.

Definition at line 97 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 122 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 68 of file DisplayProperties.cpp.

References displayName(), and m_propertyValues.

Referenced by Isis::Image::toPvl(), and Isis::Shape::toPvl().

Member Data Documentation

◆ m_displayName

QString Isis::DisplayProperties::m_displayName
private

This is the display name.

Definition at line 95 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 102 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 108 of file DisplayProperties.h.

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


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