An official website of the United States government
Here’s how you know
Official websites use .gov
A
.gov website belongs to an official government
organization in the United States.
Secure .gov websites use HTTPS
A
lock
( ) or https:// means you’ve safely connected to
the .gov website. Share sensitive information only on official,
secure websites.
Isis Developer Reference
|
This is the GUI communication mechanism for cubes. More...
#include <ControlDisplayProperties.h>
Public Types | |
enum | Property { None = 0 , Color = 1 , Selected = 2 , ShowLabel = 16 } |
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 | setShowLabel (bool) |
Change the visibility of the display name associated with this cube. | |
void | setSelected (bool) |
Change the selected state associated with this cube. | |
Signals | |
void | propertyChanged (ControlDisplayProperties *) |
void | supportAdded (Property) |
void | propertyChanged (DisplayProperties *) |
void | supportAdded (int) |
Public Member Functions | |
ControlDisplayProperties (QString displayName, QObject *parent=NULL) | |
ControlDisplayProperties constructor. | |
virtual | ~ControlDisplayProperties () |
destructor | |
void | addSupport (Property prop) |
Call this with every property you support, otherwise they will not communicate properly between widgets. | |
bool | supports (Property prop) |
Support may come later, please make sure you are connected to the supportAdded signal. | |
QVariant | getValue (Property prop) const |
Get a property's associated data. | |
void | save (QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const |
void | fromPvl (const PvlObject &pvl) |
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::ControlDisplayProperties::ControlDisplayProperties | ( | QString | displayName, |
QObject * | parent = NULL ) |
ControlDisplayProperties constructor.
This sets default values and constructs the object *.
displayName | The filename (fully expanded) of the object. |
parent | Qt parent object (this is destroyed when parent is destroyed) |
References Color, Isis::DisplayProperties::displayName(), Isis::DisplayProperties::DisplayProperties(), None, randomColor(), setSelected(), and setShowLabel().
Referenced by propertyChanged(), and supportAdded().
|
virtual |
destructor
void Isis::ControlDisplayProperties::addSupport | ( | Property | prop | ) |
Call this with every property you support, otherwise they will not communicate properly between widgets.
prop | The property you are adding support for |
References supportAdded(), and supports().
|
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 supportAdded(), and supports().
Referenced by Isis::ImageTreeWidgetItem::ImageTreeWidgetItem(), and Isis::MosaicSceneItem::MosaicSceneItem().
|
inherited |
Returns the display name.
Referenced by Isis::Directory::addCnetEditorView(), Isis::ControlDisplayProperties::ControlDisplayProperties(), DisplayProperties(), Isis::GuiCameraDisplayProperties::GuiCameraDisplayProperties(), Isis::ImageDisplayProperties::ImageDisplayProperties(), Isis::ImageTreeWidgetItem::ImageTreeWidgetItem(), Isis::Image::initFootprint(), Isis::Shape::initFootprint(), Isis::JigsawSetupDialog::JigsawSetupDialog(), Isis::GuiCamera::operator==(), Isis::ControlDisplayProperties::save(), save(), Isis::GuiCameraDisplayProperties::save(), Isis::ShapeDisplayProperties::save(), Isis::TargetBodyDisplayProperties::save(), setDisplayName(), Isis::ExportControlNetWorkOrder::setupExecution(), Isis::ShapeDisplayProperties::ShapeDisplayProperties(), Isis::TargetBodyDisplayProperties::TargetBodyDisplayProperties(), and toPvl().
|
inherited |
References setDisplayName().
Referenced by Isis::Image::fromPvl(), and Isis::Shape::fromPvl().
QVariant Isis::ControlDisplayProperties::getValue | ( | Property | prop | ) | const |
Get a property's associated data.
prop | The property |
|
inherited |
Get a property's associated data.
prop | The property |
Referenced by Isis::ImageListActionWorkOrder::qualifyString(), and Isis::ImageTreeWidgetItem::update().
|
signal |
References ControlDisplayProperties().
|
signalinherited |
References DisplayProperties().
Referenced by setValue().
|
static |
Creates and returns a random color for the intial color of the footprint polygon.
Referenced by ControlDisplayProperties().
void Isis::ControlDisplayProperties::save | ( | QXmlStreamWriter & | stream, |
const Project * | project, | ||
FileName | newProjectRoot ) const |
References Isis::DisplayProperties::displayName().
|
slot |
Change the color associated with this cube.
References Color.
|
inherited |
Sets display name.
displayName | Display name of the object. |
References displayName().
Referenced by fromPvl().
|
slot |
Change the selected state associated with this cube.
References Selected.
Referenced by ControlDisplayProperties().
|
slot |
Change the visibility of the display name associated with this cube.
References ShowLabel.
Referenced by ControlDisplayProperties().
|
protectedinherited |
This is the generic mutator for properties.
Given a value, this will change it and emit propertyChanged if its different and supported.
References propertyChanged(), 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().
|
signal |
References ControlDisplayProperties().
Referenced by addSupport().
|
signalinherited |
References DisplayProperties().
Referenced by addSupport().
bool Isis::ControlDisplayProperties::supports | ( | Property | prop | ) |
Support may come later, please make sure you are connected to the supportAdded signal.
Referenced by addSupport().
|
inherited |
Support may come later, please make sure you are connected to the supportAdded signal.
Referenced by addSupport(), Isis::ImageList::allSupport(), setValue(), and Isis::ImageTreeWidgetItem::update().
|
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 displayName().
Referenced by Isis::Image::toPvl(), and Isis::Shape::toPvl().