Isis 3 Programmer Reference
|
#include <DisplayProperties.h>
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... | |
Definition at line 26 of file DisplayProperties.h.
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().
displayName | The filename (fully expanded) of the object. |
parent | Qt 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.
|
virtual |
destructor
Definition at line 42 of file DisplayProperties.cpp.
void Isis::DisplayProperties::addSupport | ( | int | property | ) |
Call this with every property you support, otherwise they will not communicate properly between widgets.
prop | The 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().
QString Isis::DisplayProperties::displayName | ( | ) | const |
Returns the display name.
Definition at line 80 of file DisplayProperties.cpp.
References m_displayName.
Referenced by Isis::Directory::addCnetEditorView(), Isis::MosaicSceneItem::contextMenuEvent(), DisplayProperties(), Isis::TargetInfoWidget::errorMsg(), Isis::ImageTreeWidgetItem::ImageTreeWidgetItem(), Isis::Shape::initFootprint(), Isis::Image::initFootprint(), Isis::MosaicSceneItem::MosaicSceneItem(), Isis::ImageList::CopyImageDataFunctor::operator()(), Isis::GuiCamera::operator==(), Isis::MosaicSceneItem::reproject(), Isis::MosaicSceneWidget::reprojectItems(), save(), Isis::ShapeDisplayProperties::save(), Isis::GuiCameraDisplayProperties::save(), Isis::TargetBodyDisplayProperties::save(), Isis::SensorInfoWidget::SensorInfoWidget(), setDisplayName(), Isis::ExportControlNetWorkOrder::setupExecution(), Isis::ShapeDisplayProperties::XmlHandler::startElement(), Isis::TargetBodyDisplayProperties::XmlHandler::startElement(), Isis::GuiCameraDisplayProperties::XmlHandler::startElement(), Isis::TargetInfoWidget::TargetInfoWidget(), and toPvl().
QVariant Isis::DisplayProperties::getValue | ( | int | property | ) | const |
Get a property's associated data.
prop | The property |
Definition at line 139 of file DisplayProperties.cpp.
References m_propertyValues.
Referenced by Isis::ImageList::applyAlphas(), Isis::ImageList::askAlpha(), Isis::ImageList::askNewColor(), Isis::MosaicSceneItem::cubeDisplayChanged(), Isis::MosaicControlNetTool::displayConnectivity(), Isis::ImageReader::VariantToImageFunctor::operator()(), Isis::MosaicSceneItem::paint(), Isis::ImageListActionWorkOrder::qualifyString(), Isis::MosaicSceneItem::reproject(), Isis::ImageList::saveAndApplyAlpha(), Isis::ImageList::saveAndApplyColor(), Isis::ImageList::saveAndApplyRandomColor(), Isis::ImageList::saveAndToggleShowDNs(), Isis::ImageList::saveAndToggleShowFill(), Isis::ImageList::saveAndToggleShowLabel(), Isis::ImageList::saveAndToggleShowOutline(), Isis::MosaicSceneItem::updateChildren(), and Isis::MosaicSceneItem::updateSelection().
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().
void Isis::DisplayProperties::setDisplayName | ( | QString | displayName | ) |
Sets display name.
displayName | Display name of the object. |
Definition at line 89 of file DisplayProperties.cpp.
References displayName(), and m_displayName.
|
protected |
This is the generic mutator for properties.
Given a value, this will change it and emit propertyChanged if its different and supported.
Definition at line 123 of file DisplayProperties.cpp.
References m_propertyValues, and supports().
Referenced by Isis::ImageDisplayProperties::ImageDisplayProperties(), Isis::ImageDisplayProperties::setColor(), Isis::ImageDisplayProperties::setSelected(), Isis::ImageDisplayProperties::setShowDNs(), Isis::ImageDisplayProperties::setShowFill(), Isis::ImageDisplayProperties::setShowLabel(), and Isis::ImageDisplayProperties::setShowOutline().
bool Isis::DisplayProperties::supports | ( | int | property | ) |
Support may come later, please make sure you are connected to the supportAdded signal.
Definition at line 114 of file DisplayProperties.cpp.
References m_propertiesUsed.
Referenced by addSupport(), Isis::ImageList::allSupport(), and setValue().
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().
|
private |
This is the display name.
Definition at line 87 of file DisplayProperties.h.
Referenced by displayName(), DisplayProperties(), and setDisplayName().
|
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().
|
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().