Isis 3 Programmer 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. More... | |
void | setShowDNs (bool) |
Change the visibility of DNs associated with this cube. More... | |
void | setShowFill (bool) |
Change the visibility of the fill area associated with this cube. More... | |
void | setShowLabel (bool) |
Change the visibility of the display name associated with this cube. More... | |
void | setShowOutline (bool) |
Change the visibility of the outline associated with this cube. More... | |
void | setSelected (bool) |
Change the selected state associated with this cube. More... | |
Signals | |
void | moveUpOne () |
Z Order up one. More... | |
void | moveToTop () |
Z Order to top. More... | |
void | moveDownOne () |
Z Order down one. More... | |
void | moveToBottom () |
Z Order to bottom. More... | |
void | zoomFit () |
Fit in window. More... | |
void | propertyChanged (DisplayProperties *) |
void | supportAdded (int) |
Public Member Functions | |
ImageDisplayProperties (QString displayName, QObject *parent=NULL) | |
ImageDisplayProperties constructor. More... | |
ImageDisplayProperties (XmlStackedHandlerReader *xmlReader, QObject *parent=NULL) | |
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 () |
Creates and returns a random color for the intial color of the footprint polygon. More... | |
Protected Member Functions | |
void | setValue (int prop, QVariant value) |
This is the generic mutator for properties. More... | |
Private Member Functions | |
ImageDisplayProperties (const ImageDisplayProperties &) | |
ImageDisplayProperties & | operator= (const ImageDisplayProperties &) |
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.
2011-05-11 Steven Lambright - Added accessors for data that is complicated to get or expensive (i.e. Camera statistics and the footprint).
2011-05-18 Steven Lambright - Fixed the second constructor
2012-04-13 Steven Lambright, Stuart Sides, Ken Edmundson, Tracie Sucharski - Renamed CubeDisplayProperties to DisplayProperties and reduced functionality to just DisplayProperties.
2012-06-12 Ken Edmundson - Made DisplayProperties a base class, derived ControlNetworkDisplayProperties and ImageDisplayProperties from it.
Definition at line 85 of file ImageDisplayProperties.h.
This is a list of properties and actions that are possible.
Definition at line 91 of file ImageDisplayProperties.h.
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) |
Definition at line 26 of file ImageDisplayProperties.cpp.
References randomColor(), setShowDNs(), setShowFill(), setShowOutline(), and Isis::DisplayProperties::setValue().
|
inherited |
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 Isis::DisplayProperties::m_propertiesUsed, and Isis::DisplayProperties::supports().
Referenced by Isis::ImageTreeWidgetItem::ImageTreeWidgetItem(), and Isis::MosaicSceneItem::MosaicSceneItem().
|
inherited |
Returns the display name.
Definition at line 80 of file DisplayProperties.cpp.
References Isis::DisplayProperties::m_displayName.
Referenced by Isis::Directory::addCnetEditorView(), Isis::MosaicSceneItem::contextMenuEvent(), Isis::DisplayProperties::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(), Isis::DisplayProperties::save(), Isis::ShapeDisplayProperties::save(), Isis::GuiCameraDisplayProperties::save(), Isis::TargetBodyDisplayProperties::save(), Isis::SensorInfoWidget::SensorInfoWidget(), Isis::DisplayProperties::setDisplayName(), Isis::ExportControlNetWorkOrder::setupExecution(), Isis::ShapeDisplayProperties::XmlHandler::startElement(), Isis::TargetBodyDisplayProperties::XmlHandler::startElement(), Isis::GuiCameraDisplayProperties::XmlHandler::startElement(), Isis::TargetInfoWidget::TargetInfoWidget(), and Isis::DisplayProperties::toPvl().
|
inherited |
Get a property's associated data.
prop | The property |
Definition at line 139 of file DisplayProperties.cpp.
References Isis::DisplayProperties::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().
|
signal |
Z Order down one.
|
signal |
Z Order to bottom.
|
signal |
Z Order to top.
|
signal |
Z Order up one.
|
static |
Creates and returns a random color for the intial color of the footprint polygon.
Definition at line 54 of file ImageDisplayProperties.cpp.
Referenced by Isis::MosaicControlNetTool::displayConnectivity(), ImageDisplayProperties(), Isis::ImageList::saveAndApplyRandomColor(), and Isis::ImageList::showRandomColor().
|
inherited |
Output format:
<displayProperties displayname="..."> Hex-encoded data </displayProperties>
Definition at line 151 of file DisplayProperties.cpp.
References Isis::DisplayProperties::displayName().
Referenced by Isis::Image::save().
|
slot |
Change the color associated with this cube.
Definition at line 74 of file ImageDisplayProperties.cpp.
References Isis::DisplayProperties::setValue().
Referenced by Isis::ImageList::applyAlphas(), Isis::MosaicControlNetTool::displayConnectivity(), Isis::ImageReader::VariantToImageFunctor::operator()(), Isis::ImageList::saveAndApplyAlpha(), Isis::ImageList::saveAndApplyColor(), Isis::ImageList::saveAndApplyRandomColor(), and Isis::ImageList::showRandomColor().
|
inherited |
Sets display name.
displayName | Display name of the object. |
Definition at line 89 of file DisplayProperties.cpp.
References Isis::DisplayProperties::displayName(), and Isis::DisplayProperties::m_displayName.
|
slot |
Change the selected state associated with this cube.
Definition at line 82 of file ImageDisplayProperties.cpp.
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.
Definition at line 90 of file ImageDisplayProperties.cpp.
References Isis::DisplayProperties::setValue(), and ShowDNs.
Referenced by Isis::ImageList::applyShowDNs(), ImageDisplayProperties(), and Isis::ImageList::saveAndToggleShowDNs().
|
slot |
Change the visibility of the fill area associated with this cube.
Definition at line 98 of file ImageDisplayProperties.cpp.
References Isis::DisplayProperties::setValue(), and ShowFill.
Referenced by Isis::ImageList::applyShowFill(), ImageDisplayProperties(), Isis::ImageReader::VariantToImageFunctor::operator()(), and Isis::ImageList::saveAndToggleShowFill().
|
slot |
Change the visibility of the display name associated with this cube.
Definition at line 106 of file ImageDisplayProperties.cpp.
References Isis::DisplayProperties::setValue(), and ShowLabel.
Referenced by Isis::ImageList::applyShowLabel(), and Isis::ImageList::saveAndToggleShowLabel().
|
slot |
Change the visibility of the outline associated with this cube.
Definition at line 114 of file ImageDisplayProperties.cpp.
References Isis::DisplayProperties::setValue(), and ShowOutline.
Referenced by Isis::ImageList::applyShowOutline(), ImageDisplayProperties(), and Isis::ImageList::saveAndToggleShowOutline().
|
protectedinherited |
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 Isis::DisplayProperties::m_propertyValues, and Isis::DisplayProperties::supports().
Referenced by ImageDisplayProperties(), setColor(), setSelected(), setShowDNs(), setShowFill(), setShowLabel(), and setShowOutline().
|
inherited |
Support may come later, please make sure you are connected to the supportAdded signal.
Definition at line 114 of file DisplayProperties.cpp.
References Isis::DisplayProperties::m_propertiesUsed.
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.
Definition at line 60 of file DisplayProperties.cpp.
References Isis::DisplayProperties::displayName().
|
signal |
Fit in window.