Isis Developer Reference
|
This is the GUI communication mechanism for cubes. More...
#include <ImageDisplayProperties.h>
Public Types | |
enum | Property { None = 0 , Color = 1 , Selected = 2 , ShowDNs = 4 , ShowFill = 8 , ShowLabel = 16 , ShowOutline = 32 , Zooming = 64 , ZOrdering = 128 , FootprintViewProperties } |
This is a list of properties and actions that are possible. More... | |
Public Slots | |
void | setColor (QColor newColor) |
Change the color associated with this cube. | |
void | setShowDNs (bool) |
Change the visibility of DNs associated with this cube. | |
void | setShowFill (bool) |
Change the visibility of the fill area associated with this cube. | |
void | setShowLabel (bool) |
Change the visibility of the display name associated with this cube. | |
void | setShowOutline (bool) |
Change the visibility of the outline associated with this cube. | |
void | setSelected (bool) |
Change the selected state associated with this cube. | |
Signals | |
void | moveUpOne () |
Z Order up one. | |
void | moveToTop () |
Z Order to top. | |
void | moveDownOne () |
Z Order down one. | |
void | moveToBottom () |
Z Order to bottom. | |
void | zoomFit () |
Fit in window. | |
void | propertyChanged (DisplayProperties *) |
void | supportAdded (int) |
Public Member Functions | |
ImageDisplayProperties (QString displayName, QObject *parent=NULL) | |
ImageDisplayProperties constructor. | |
ImageDisplayProperties (XmlStackedHandlerReader *xmlReader, QObject *parent=NULL) | |
virtual | ~ImageDisplayProperties () |
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 () |
Creates and returns a random color for the intial color of the footprint polygon. | |
Protected Member Functions | |
void | setValue (int prop, QVariant value) |
This is the generic mutator for properties. | |
This is the GUI communication mechanism for cubes.
This class is the connector between various GUI interfaces for cubes. We use this to communicate shared properties that various widgets need to know/should react to in a generic way.
This is how this class is supposed to "connect" widgets:
widgetA widgetB widgetC | | | ---—DisplayProperties ----—
When a user selects a cube in widgetA, widgetB and widgetC now have a chance to also select the same cube. This applies to all shared properties. Some of the properties are actions - such as zoomFit. This also allows a widget with no zooming (such as a list) to have an option to zoom (if any of the widgets support it*) and have that option work. There is no state associated with zoomFit - it's an action connected to a signal.
The proper way to detect a cube going away is to connect to the destroyed signal (from the parent QObject). Once that is emitted you cannot call any methods on this object.
This is a list of properties and actions that are possible.
Isis::ImageDisplayProperties::ImageDisplayProperties | ( | QString | displayName, |
QObject * | parent = NULL ) |
ImageDisplayProperties 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 cube file. |
parent | Qt parent object (this is destroyed when parent is destroyed) |
References randomColor(), setShowDNs(), setShowFill(), setShowOutline(), and Isis::DisplayProperties::setValue().
Isis::ImageDisplayProperties::ImageDisplayProperties | ( | XmlStackedHandlerReader * | xmlReader, |
QObject * | parent = NULL ) |
|
virtual |
|
inherited |
Call this with every property you support, otherwise they will not communicate properly between widgets.
prop | The property you are adding support for |
References Isis::DisplayProperties::supportAdded(), and Isis::DisplayProperties::supports().
Referenced by Isis::ImageTreeWidgetItem::ImageTreeWidgetItem(), and Isis::MosaicSceneItem::MosaicSceneItem().
|
inherited |
Returns the display name.
Referenced by Isis::Directory::addCnetEditorView(), Isis::MosaicSceneItem::contextMenuEvent(), Isis::DisplayProperties::DisplayProperties(), Isis::Image::initFootprint(), Isis::Shape::initFootprint(), Isis::JigsawSetupDialog::JigsawSetupDialog(), Isis::MosaicSceneItem::MosaicSceneItem(), Isis::GuiCamera::operator==(), Isis::MosaicSceneItem::reproject(), Isis::ControlDisplayProperties::save(), Isis::DisplayProperties::save(), Isis::GuiCameraDisplayProperties::save(), Isis::ShapeDisplayProperties::save(), Isis::TargetBodyDisplayProperties::save(), Isis::DisplayProperties::setDisplayName(), Isis::ExportControlNetWorkOrder::setupExecution(), Isis::TargetInfoWidget::TargetInfoWidget(), and Isis::DisplayProperties::toPvl().
|
inherited |
References Isis::DisplayProperties::setDisplayName().
Referenced by Isis::Image::fromPvl(), and Isis::Shape::fromPvl().
|
inherited |
Get a property's associated data.
prop | The property |
Referenced by Isis::MosaicSceneItem::color(), Isis::MosaicSceneItem::cubeDisplayChanged(), Isis::MosaicSceneItem::paint(), Isis::MosaicSceneItem::reproject(), and Isis::MosaicSceneItem::updateSelection().
|
signal |
Z Order down one.
|
signal |
Z Order to bottom.
|
signal |
Z Order to top.
|
signal |
Z Order up one.
|
signalinherited |
Referenced by Isis::DisplayProperties::setValue().
|
static |
Creates and returns a random color for the intial color of the footprint polygon.
Referenced by ImageDisplayProperties().
|
inherited |
Output format:
<displayProperties displayName="..."> Hex-encoded data </displayProperties>
References Isis::DisplayProperties::displayName().
Referenced by Isis::Image::save().
|
slot |
Change the color associated with this cube.
References Isis::DisplayProperties::setValue().
|
inherited |
Sets display name.
displayName | Display name of the object. |
References Isis::DisplayProperties::displayName().
Referenced by Isis::DisplayProperties::fromPvl().
|
slot |
Change the selected state associated with this cube.
References Selected, and Isis::DisplayProperties::setValue().
Referenced by Isis::ProjectItemModel::onSelectionChanged(), and Isis::MosaicSceneItem::updateSelection().
|
slot |
Change the visibility of DNs associated with this cube.
References Isis::DisplayProperties::setValue(), and ShowDNs.
Referenced by ImageDisplayProperties().
|
slot |
Change the visibility of the fill area associated with this cube.
References Isis::DisplayProperties::setValue(), and ShowFill.
Referenced by ImageDisplayProperties(), and Isis::ImageTreeWidgetItem::update().
|
slot |
Change the visibility of the display name associated with this cube.
References Isis::DisplayProperties::setValue(), and ShowLabel.
|
slot |
Change the visibility of the outline associated with this cube.
References Isis::DisplayProperties::setValue(), and ShowOutline.
Referenced by ImageDisplayProperties().
|
protectedinherited |
This is the generic mutator for properties.
Given a value, this will change it and emit propertyChanged if its different and supported.
References Isis::DisplayProperties::propertyChanged(), and Isis::DisplayProperties::supports().
Referenced by ImageDisplayProperties(), setColor(), setSelected(), setShowDNs(), setShowFill(), setShowLabel(), and setShowOutline().
|
signalinherited |
Referenced by Isis::DisplayProperties::addSupport().
|
inherited |
Support may come later, please make sure you are connected to the supportAdded signal.
Referenced by Isis::DisplayProperties::addSupport(), Isis::ImageList::allSupport(), and Isis::DisplayProperties::setValue().
|
inherited |
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.
References Isis::DisplayProperties::displayName().
Referenced by Isis::Image::toPvl(), and Isis::Shape::toPvl().
|
signal |
Fit in window.