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

Static Public Member Functions

static QColor randomColor ()
 

Protected Member Functions

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

Private Member Functions

 Q_DISABLE_COPY (DisplayProperties)
 

Private Attributes

QString m_displayName
 This is the display name.
 
int m_propertiesUsed
 This indicated whether any widgets with this DisplayProperties is using a particulay property.
 
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.
 

Detailed Description

Author
2012-??-?? ???

Definition at line 34 of file DisplayProperties.h.

Constructor & Destructor Documentation

◆ DisplayProperties() [1/2]

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() [2/2]

Isis::DisplayProperties::DisplayProperties ( XmlStackedHandlerReader * xmlReader,
QObject * parent = NULL )

Definition at line 39 of file DisplayProperties.cpp.

◆ ~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()

◆ fromPvl()

void Isis::DisplayProperties::fromPvl ( const PvlObject & pvl)

Definition at line 54 of file DisplayProperties.cpp.

◆ 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: