SpatialDataView Class Reference

A view to display layers. More...

#include <SpatialDataView.h>

Inheritance diagram for SpatialDataView:

Inheritance graph

List of all members.

Public Member Functions

virtual std::list
< ContextMenuAction
getContextMenuActions () const =0
virtual bool setPrimaryRasterElement (RasterElement *pRasterElement)=0
virtual void setTextureMode (const TextureMode &textureMode)=0
virtual TextureMode getTextureMode () const =0
virtual LayerListgetLayerList () const =0
virtual LayercreateLayer (const LayerType &layerType, DataElement *pElement)=0
virtual LayercreateLayer (const LayerType &layerType, DataElement *pElement, const std::string &layerName)=0
virtual bool addLayer (Layer *pLayer)=0
virtual bool addLayerList (const LayerList *pLayerList)=0
virtual std::vector< LayerTypegetDerivedLayerTypes (const Layer *pLayer) const =0
virtual std::vector< LayerTypegetDerivedLayerTypes (LayerType layerType) const =0
virtual LayerderiveLayer (const Layer *pLayer, const LayerType &newLayerType)=0
virtual LayerconvertLayer (Layer *pLayer, const LayerType &newLayerType)=0
virtual bool showLayer (Layer *pLayer)=0
virtual bool hideLayer (Layer *pLayer)=0
virtual void getDisplayedLayers (std::vector< Layer * > &displayedLayers) const =0
virtual bool isLayerDisplayed (Layer *pLayer) const =0
virtual LayergetTopMostLayer () const =0
virtual LayergetTopMostLayer (LayerType layerType) const =0
virtual LayergetTopMostLayer (const LocationType &worldCoord) const =0
virtual LayergetTopMostLayer (LayerType layerType, const LocationType &worldCoord) const =0
virtual DataElementgetTopMostElement () const =0
virtual DataElementgetTopMostElement (LayerType layerType) const =0
virtual DataElementgetTopMostElement (const LocationType &worldCoord) const =0
virtual DataElementgetTopMostElement (LayerType layerType, const LocationType &worldCoord) const =0
virtual DataElementgetTopMostElement (const std::string &elementType) const =0
virtual void setActiveLayer (Layer *pLayer)=0
virtual LayergetActiveLayer () const =0
virtual bool setFrontLayer (Layer *pLayer)=0
virtual bool setBackLayer (Layer *pLayer)=0
virtual bool bringLayerForward (Layer *pLayer)=0
virtual bool sendLayerBackward (Layer *pLayer)=0
virtual bool setLayerDisplayIndex (Layer *pLayer, int iIndex)=0
virtual int getLayerDisplayIndex (Layer *pLayer) const =0
virtual bool deleteLayer (Layer *pLayer)=0
virtual void clear ()=0
virtual void clearMarkings ()=0
virtual void displayOrigin (bool display)=0
virtual bool isOriginDisplayed () const =0
virtual void displayAxis (bool display)=0
virtual bool isAxisDisplayed () const =0
virtual bool getLayerImage (Layer *pLayer, unsigned char *&pImage, int &iWidth, int &iHeight, int &iDepth, int &iNumColors, ColorType &transparent, int bbox[4])=0
virtual bool getLayerImage (Layer *pLayer, QImage &image, ColorType &transparent, int bbox[4])=0
virtual void setPanLimit (PanLimitType eType)=0
virtual PanLimitType getPanLimit () const =0
virtual void setMinimumZoom (double dMinZoom)=0
virtual double getMinimumZoom () const =0
virtual void setMaximumZoom (double dMaxZoom)=0
virtual double getMaximumZoom () const =0
virtual AnimationcreateDefaultAnimation ()=0
virtual void resetStretch ()=0

Static Public Member Functions

static PositionType getSettingClassificationMarkingPositions ()
static bool hasSettingClassificationMarkingPositions ()
static void setSettingClassificationMarkingPositions (PositionType newValue, bool setIfSame=false)
static std::string getSettingClassificationMarkingPositionsKey ()
static bool getSettingDisplayOrigin ()
static bool hasSettingDisplayOrigin ()
static void setSettingDisplayOrigin (bool newValue, bool setIfSame=false)
static std::string getSettingDisplayOriginKey ()
static bool getSettingDisplayAxis ()
static bool hasSettingDisplayAxis ()
static void setSettingDisplayAxis (bool newValue, bool setIfSame=false)
static std::string getSettingDisplayAxisKey ()
static bool getSettingGeoCoordTooltip ()
static bool hasSettingGeoCoordTooltip ()
static void setSettingGeoCoordTooltip (bool newValue, bool setIfSame=false)
static std::string getSettingGeoCoordTooltipKey ()
static bool getSettingConfirmLayerDelete ()
static bool hasSettingConfirmLayerDelete ()
static void setSettingConfirmLayerDelete (bool newValue, bool setIfSame=false)
static std::string getSettingConfirmLayerDeleteKey ()
static int getSettingFastPanSpeed ()
static bool hasSettingFastPanSpeed ()
static void setSettingFastPanSpeed (int newValue, bool setIfSame=false)
static std::string getSettingFastPanSpeedKey ()
static double getSettingMaximumZoomRatio ()
static bool hasSettingMaximumZoomRatio ()
static void setSettingMaximumZoomRatio (double newValue, bool setIfSame=false)
static std::string getSettingMaximumZoomRatioKey ()
static double getSettingMinimumZoomPixels ()
static bool hasSettingMinimumZoomPixels ()
static void setSettingMinimumZoomPixels (double newValue, bool setIfSame=false)
static std::string getSettingMinimumZoomPixelsKey ()
static PanLimitType getSettingPanLimit ()
static bool hasSettingPanLimit ()
static void setSettingPanLimit (PanLimitType newValue, bool setIfSame=false)
static std::string getSettingPanLimitKey ()
static int getSettingSlowPanSpeed ()
static bool hasSettingSlowPanSpeed ()
static void setSettingSlowPanSpeed (int newValue, bool setIfSame=false)
static std::string getSettingSlowPanSpeedKey ()
static const std::string & signalTextureModeChanged ()
static const std::string & signalLayerShown ()
static const std::string & signalLayerHidden ()
static const std::string & signalLayerDisplayIndexesChanged ()
static const std::string & signalLayerActivated ()

Protected Member Functions

virtual ~SpatialDataView ()


Detailed Description

A view to display layers.

The spatial data view provides a means by which one or more layers are displayed. Layers that are available for display are contained in the view's layer list, which has an associated data set. Layers for other data sets can be added to this view, which adds the layer to the layer list. It is also possible to add all layers in another layer list to the view. When displaying layers the view maintains a display index, which specifies the order in which the layers are drawn in the view. For raster layers, a texture mode is available that specifies how the pixels are drawn at their boundaries.

The spatial data view defines the following mouse modes, where the name given is the name populated by MouseMode::getName():

This subclass of Subject will notify upon the following conditions:

See also:
Layer, LayerList
Examples:

Tutorial/Tutorial5.cpp.

Definition at line 74 of file SpatialDataView.h.


Constructor & Destructor Documentation

virtual SpatialDataView::~SpatialDataView (  )  [protected, virtual]

This should be destroyed by calling DesktopServices::deleteView.

Definition at line 1383 of file SpatialDataView.h.


Member Function Documentation

static PositionType SpatialDataView::getSettingClassificationMarkingPositions (  )  [static]

Returns the current value for this setting.

If this setting does not exist in ConfigurationSettings, a verification error will be logged to the message log and potentially a verification error message box will be displayed to the user.

Please see Settings Macros for more details

Returns:
the current value for this setting.

Definition at line 87 of file SpatialDataView.h.

static bool SpatialDataView::hasSettingClassificationMarkingPositions (  )  [static]

Returns true if this setting exists and has a value in ConfigurationSettings.

Please see Settings Macros for more details

Returns:
true if this setting exists, false otherwise.

Definition at line 94 of file SpatialDataView.h.

static void SpatialDataView::setSettingClassificationMarkingPositions ( PositionType  newValue,
bool  setIfSame = false 
) [static]

Changes the current value of this setting to the new value.

Please see Settings Macros for more details

Parameters:
newValue the new value for this setting.
setIfSame If true, the value will be set into ConfigurationSettings even if the newValue and existing value are the same. This has the side-effect of making the value a per-user setting and stored in the user's configuration file. If false, this value will only be set if the newValue and existing value are different. Therefore the value will only be stored in the user's configuration file if the newValue is unique to the user.

Definition at line 110 of file SpatialDataView.h.

static std::string SpatialDataView::getSettingClassificationMarkingPositionsKey (  )  [static]

Returns the key for this setting that could be passed to ConfigurationSettings::getSetting() or ConfigurationSettings::setSetting().

Please see Settings Macros for more details

Returns:
the key used for this setting.

Definition at line 118 of file SpatialDataView.h.

static bool SpatialDataView::getSettingDisplayOrigin (  )  [static]

Returns the current value for this setting.

If this setting does not exist in ConfigurationSettings, a verification error will be logged to the message log and potentially a verification error message box will be displayed to the user.

Please see Settings Macros for more details

Returns:
the current value for this setting.

Definition at line 129 of file SpatialDataView.h.

static bool SpatialDataView::hasSettingDisplayOrigin (  )  [static]

Returns true if this setting exists and has a value in ConfigurationSettings.

Please see Settings Macros for more details

Returns:
true if this setting exists, false otherwise.

Definition at line 136 of file SpatialDataView.h.

static void SpatialDataView::setSettingDisplayOrigin ( bool  newValue,
bool  setIfSame = false 
) [static]

Changes the current value of this setting to the new value.

Please see Settings Macros for more details

Parameters:
newValue the new value for this setting.
setIfSame If true, the value will be set into ConfigurationSettings even if the newValue and existing value are the same. This has the side-effect of making the value a per-user setting and stored in the user's configuration file. If false, this value will only be set if the newValue and existing value are different. Therefore the value will only be stored in the user's configuration file if the newValue is unique to the user.

Definition at line 152 of file SpatialDataView.h.

static std::string SpatialDataView::getSettingDisplayOriginKey (  )  [static]

Returns the key for this setting that could be passed to ConfigurationSettings::getSetting() or ConfigurationSettings::setSetting().

Please see Settings Macros for more details

Returns:
the key used for this setting.

Definition at line 160 of file SpatialDataView.h.

static bool SpatialDataView::getSettingDisplayAxis (  )  [static]

Returns the current value for this setting.

If this setting does not exist in ConfigurationSettings, a verification error will be logged to the message log and potentially a verification error message box will be displayed to the user.

Please see Settings Macros for more details

Returns:
the current value for this setting.

Definition at line 171 of file SpatialDataView.h.

static bool SpatialDataView::hasSettingDisplayAxis (  )  [static]

Returns true if this setting exists and has a value in ConfigurationSettings.

Please see Settings Macros for more details

Returns:
true if this setting exists, false otherwise.

Definition at line 178 of file SpatialDataView.h.

static void SpatialDataView::setSettingDisplayAxis ( bool  newValue,
bool  setIfSame = false 
) [static]

Changes the current value of this setting to the new value.

Please see Settings Macros for more details

Parameters:
newValue the new value for this setting.
setIfSame If true, the value will be set into ConfigurationSettings even if the newValue and existing value are the same. This has the side-effect of making the value a per-user setting and stored in the user's configuration file. If false, this value will only be set if the newValue and existing value are different. Therefore the value will only be stored in the user's configuration file if the newValue is unique to the user.

Definition at line 194 of file SpatialDataView.h.

static std::string SpatialDataView::getSettingDisplayAxisKey (  )  [static]

Returns the key for this setting that could be passed to ConfigurationSettings::getSetting() or ConfigurationSettings::setSetting().

Please see Settings Macros for more details

Returns:
the key used for this setting.

Definition at line 202 of file SpatialDataView.h.

static bool SpatialDataView::getSettingGeoCoordTooltip (  )  [static]

Returns the current value for this setting.

If this setting does not exist in ConfigurationSettings, a verification error will be logged to the message log and potentially a verification error message box will be displayed to the user.

Please see Settings Macros for more details

Returns:
the current value for this setting.

Definition at line 213 of file SpatialDataView.h.

static bool SpatialDataView::hasSettingGeoCoordTooltip (  )  [static]

Returns true if this setting exists and has a value in ConfigurationSettings.

Please see Settings Macros for more details

Returns:
true if this setting exists, false otherwise.

Definition at line 220 of file SpatialDataView.h.

static void SpatialDataView::setSettingGeoCoordTooltip ( bool  newValue,
bool  setIfSame = false 
) [static]

Changes the current value of this setting to the new value.

Please see Settings Macros for more details

Parameters:
newValue the new value for this setting.
setIfSame If true, the value will be set into ConfigurationSettings even if the newValue and existing value are the same. This has the side-effect of making the value a per-user setting and stored in the user's configuration file. If false, this value will only be set if the newValue and existing value are different. Therefore the value will only be stored in the user's configuration file if the newValue is unique to the user.

Definition at line 236 of file SpatialDataView.h.

static std::string SpatialDataView::getSettingGeoCoordTooltipKey (  )  [static]

Returns the key for this setting that could be passed to ConfigurationSettings::getSetting() or ConfigurationSettings::setSetting().

Please see Settings Macros for more details

Returns:
the key used for this setting.

Definition at line 244 of file SpatialDataView.h.

static bool SpatialDataView::getSettingConfirmLayerDelete (  )  [static]

Returns the current value for this setting.

If this setting does not exist in ConfigurationSettings, a verification error will be logged to the message log and potentially a verification error message box will be displayed to the user.

Please see Settings Macros for more details

Returns:
the current value for this setting.

Definition at line 255 of file SpatialDataView.h.

static bool SpatialDataView::hasSettingConfirmLayerDelete (  )  [static]

Returns true if this setting exists and has a value in ConfigurationSettings.

Please see Settings Macros for more details

Returns:
true if this setting exists, false otherwise.

Definition at line 262 of file SpatialDataView.h.

static void SpatialDataView::setSettingConfirmLayerDelete ( bool  newValue,
bool  setIfSame = false 
) [static]

Changes the current value of this setting to the new value.

Please see Settings Macros for more details

Parameters:
newValue the new value for this setting.
setIfSame If true, the value will be set into ConfigurationSettings even if the newValue and existing value are the same. This has the side-effect of making the value a per-user setting and stored in the user's configuration file. If false, this value will only be set if the newValue and existing value are different. Therefore the value will only be stored in the user's configuration file if the newValue is unique to the user.

Definition at line 278 of file SpatialDataView.h.

static std::string SpatialDataView::getSettingConfirmLayerDeleteKey (  )  [static]

Returns the key for this setting that could be passed to ConfigurationSettings::getSetting() or ConfigurationSettings::setSetting().

Please see Settings Macros for more details

Returns:
the key used for this setting.

Definition at line 286 of file SpatialDataView.h.

static int SpatialDataView::getSettingFastPanSpeed (  )  [static]

Returns the current value for this setting.

If this setting does not exist in ConfigurationSettings, a verification error will be logged to the message log and potentially a verification error message box will be displayed to the user.

Please see Settings Macros for more details

Returns:
the current value for this setting.

Definition at line 297 of file SpatialDataView.h.

static bool SpatialDataView::hasSettingFastPanSpeed (  )  [static]

Returns true if this setting exists and has a value in ConfigurationSettings.

Please see Settings Macros for more details

Returns:
true if this setting exists, false otherwise.

Definition at line 304 of file SpatialDataView.h.

static void SpatialDataView::setSettingFastPanSpeed ( int  newValue,
bool  setIfSame = false 
) [static]

Changes the current value of this setting to the new value.

Please see Settings Macros for more details

Parameters:
newValue the new value for this setting.
setIfSame If true, the value will be set into ConfigurationSettings even if the newValue and existing value are the same. This has the side-effect of making the value a per-user setting and stored in the user's configuration file. If false, this value will only be set if the newValue and existing value are different. Therefore the value will only be stored in the user's configuration file if the newValue is unique to the user.

Definition at line 320 of file SpatialDataView.h.

static std::string SpatialDataView::getSettingFastPanSpeedKey (  )  [static]

Returns the key for this setting that could be passed to ConfigurationSettings::getSetting() or ConfigurationSettings::setSetting().

Please see Settings Macros for more details

Returns:
the key used for this setting.

Definition at line 328 of file SpatialDataView.h.

static double SpatialDataView::getSettingMaximumZoomRatio (  )  [static]

Returns the current value for this setting.

If this setting does not exist in ConfigurationSettings, a verification error will be logged to the message log and potentially a verification error message box will be displayed to the user.

Please see Settings Macros for more details

Returns:
the current value for this setting.

Definition at line 339 of file SpatialDataView.h.

static bool SpatialDataView::hasSettingMaximumZoomRatio (  )  [static]

Returns true if this setting exists and has a value in ConfigurationSettings.

Please see Settings Macros for more details

Returns:
true if this setting exists, false otherwise.

Definition at line 346 of file SpatialDataView.h.

static void SpatialDataView::setSettingMaximumZoomRatio ( double  newValue,
bool  setIfSame = false 
) [static]

Changes the current value of this setting to the new value.

Please see Settings Macros for more details

Parameters:
newValue the new value for this setting.
setIfSame If true, the value will be set into ConfigurationSettings even if the newValue and existing value are the same. This has the side-effect of making the value a per-user setting and stored in the user's configuration file. If false, this value will only be set if the newValue and existing value are different. Therefore the value will only be stored in the user's configuration file if the newValue is unique to the user.

Definition at line 362 of file SpatialDataView.h.

static std::string SpatialDataView::getSettingMaximumZoomRatioKey (  )  [static]

Returns the key for this setting that could be passed to ConfigurationSettings::getSetting() or ConfigurationSettings::setSetting().

Please see Settings Macros for more details

Returns:
the key used for this setting.

Definition at line 370 of file SpatialDataView.h.

static double SpatialDataView::getSettingMinimumZoomPixels (  )  [static]

Returns the current value for this setting.

If this setting does not exist in ConfigurationSettings, a verification error will be logged to the message log and potentially a verification error message box will be displayed to the user.

Please see Settings Macros for more details

Returns:
the current value for this setting.

Definition at line 381 of file SpatialDataView.h.

static bool SpatialDataView::hasSettingMinimumZoomPixels (  )  [static]

Returns true if this setting exists and has a value in ConfigurationSettings.

Please see Settings Macros for more details

Returns:
true if this setting exists, false otherwise.

Definition at line 388 of file SpatialDataView.h.

static void SpatialDataView::setSettingMinimumZoomPixels ( double  newValue,
bool  setIfSame = false 
) [static]

Changes the current value of this setting to the new value.

Please see Settings Macros for more details

Parameters:
newValue the new value for this setting.
setIfSame If true, the value will be set into ConfigurationSettings even if the newValue and existing value are the same. This has the side-effect of making the value a per-user setting and stored in the user's configuration file. If false, this value will only be set if the newValue and existing value are different. Therefore the value will only be stored in the user's configuration file if the newValue is unique to the user.

Definition at line 404 of file SpatialDataView.h.

static std::string SpatialDataView::getSettingMinimumZoomPixelsKey (  )  [static]

Returns the key for this setting that could be passed to ConfigurationSettings::getSetting() or ConfigurationSettings::setSetting().

Please see Settings Macros for more details

Returns:
the key used for this setting.

Definition at line 412 of file SpatialDataView.h.

static PanLimitType SpatialDataView::getSettingPanLimit (  )  [static]

Returns the current value for this setting.

If this setting does not exist in ConfigurationSettings, a verification error will be logged to the message log and potentially a verification error message box will be displayed to the user.

Please see Settings Macros for more details

Returns:
the current value for this setting.

Definition at line 423 of file SpatialDataView.h.

static bool SpatialDataView::hasSettingPanLimit (  )  [static]

Returns true if this setting exists and has a value in ConfigurationSettings.

Please see Settings Macros for more details

Returns:
true if this setting exists, false otherwise.

Definition at line 430 of file SpatialDataView.h.

static void SpatialDataView::setSettingPanLimit ( PanLimitType  newValue,
bool  setIfSame = false 
) [static]

Changes the current value of this setting to the new value.

Please see Settings Macros for more details

Parameters:
newValue the new value for this setting.
setIfSame If true, the value will be set into ConfigurationSettings even if the newValue and existing value are the same. This has the side-effect of making the value a per-user setting and stored in the user's configuration file. If false, this value will only be set if the newValue and existing value are different. Therefore the value will only be stored in the user's configuration file if the newValue is unique to the user.

Definition at line 446 of file SpatialDataView.h.

static std::string SpatialDataView::getSettingPanLimitKey (  )  [static]

Returns the key for this setting that could be passed to ConfigurationSettings::getSetting() or ConfigurationSettings::setSetting().

Please see Settings Macros for more details

Returns:
the key used for this setting.

Definition at line 454 of file SpatialDataView.h.

static int SpatialDataView::getSettingSlowPanSpeed (  )  [static]

Returns the current value for this setting.

If this setting does not exist in ConfigurationSettings, a verification error will be logged to the message log and potentially a verification error message box will be displayed to the user.

Please see Settings Macros for more details

Returns:
the current value for this setting.

Definition at line 465 of file SpatialDataView.h.

static bool SpatialDataView::hasSettingSlowPanSpeed (  )  [static]

Returns true if this setting exists and has a value in ConfigurationSettings.

Please see Settings Macros for more details

Returns:
true if this setting exists, false otherwise.

Definition at line 472 of file SpatialDataView.h.

static void SpatialDataView::setSettingSlowPanSpeed ( int  newValue,
bool  setIfSame = false 
) [static]

Changes the current value of this setting to the new value.

Please see Settings Macros for more details

Parameters:
newValue the new value for this setting.
setIfSame If true, the value will be set into ConfigurationSettings even if the newValue and existing value are the same. This has the side-effect of making the value a per-user setting and stored in the user's configuration file. If false, this value will only be set if the newValue and existing value are different. Therefore the value will only be stored in the user's configuration file if the newValue is unique to the user.

Definition at line 488 of file SpatialDataView.h.

static std::string SpatialDataView::getSettingSlowPanSpeedKey (  )  [static]

Returns the key for this setting that could be passed to ConfigurationSettings::getSetting() or ConfigurationSettings::setSetting().

Please see Settings Macros for more details

Returns:
the key used for this setting.

Definition at line 496 of file SpatialDataView.h.

static const std::string& SpatialDataView::signalTextureModeChanged (  )  [static]

Emitted with boost::any<TextureMode> when the texture mode is changed.

Definition at line 501 of file SpatialDataView.h.

static const std::string& SpatialDataView::signalLayerShown (  )  [static]

Emitted with boost::any<Layer*> when a layer is shown.

Definition at line 506 of file SpatialDataView.h.

static const std::string& SpatialDataView::signalLayerHidden (  )  [static]

Emitted with boost::any<Layer*> when a layer is hidden.

Definition at line 511 of file SpatialDataView.h.

static const std::string& SpatialDataView::signalLayerDisplayIndexesChanged (  )  [static]

Emitted when the display index of any layer changes.

Definition at line 516 of file SpatialDataView.h.

static const std::string& SpatialDataView::signalLayerActivated (  )  [static]

Emitted with boost::any<Layer*> when the layer that is edited with the LayerMode mouse mode changes.

This signal may be emitted if the layer is not displayed.

See also:
setActiveLayer()

Definition at line 526 of file SpatialDataView.h.

virtual std::list<ContextMenuAction> SpatialDataView::getContextMenuActions (  )  const [pure virtual]

Returns the context menu actions available for this session item.

Returns:
The list of context menu actions that should be displayed when the user right-clicks on a widget displaying or containing the session item.
See also:
ContextMenuAction

Default Implementation:
The default implementation returns the context menu actions listed here. The default actions can be removed or additional actions can be added by attaching to the signalAboutToShowContextMenu() signal.

Implements SessionItem.

virtual bool SpatialDataView::setPrimaryRasterElement ( RasterElement pRasterElement  )  [pure virtual]

Associates a RasterElement with the view.

This method associates a RasterElement with the view. Once the RasterElement is associated with the view, it cannot be changed.

Returns:
TRUE if the element was successfully associated with the view. FALSE is returned if another RasterElement was previously associated with the view.
See also:
RasterElement

LayerList::getPrimaryRasterElement()

Examples:
Tutorial/Tutorial5.cpp.

virtual void SpatialDataView::setTextureMode ( const TextureMode textureMode  )  [pure virtual]

Sets the view texture mode.

When zoomed in such that a scene pixel maps to more than one screen pixel, the window can either replicate the scene pixel or interpolate between scene pixels.

This method does not call refresh() so that multiple calls to modify view settings can be made without refreshing the view after each modification.

Parameters:
textureMode The new texture mode.
Subject Notifications:
This method will notify signalTextureModeChanged() with boost::any<TextureMode>.
See also:
TextureMode

virtual TextureMode SpatialDataView::getTextureMode (  )  const [pure virtual]

Returns the view texture mode.

Returns:
The current texture mode.
See also:
TextureMode

virtual LayerList* SpatialDataView::getLayerList (  )  const [pure virtual]

Returns the list of available display layers.

Returns:
The layer list used for displaying layers in the view.

virtual Layer* SpatialDataView::createLayer ( const LayerType layerType,
DataElement pElement 
) [pure virtual]

Adds a new layer to the view.

This method creates a new layer of a given type based on a given element and adds it to this view. The layer is created with a name based on the name of the data element. If a layer already exists with the same name as the element, then the layer is created with a unique name based on the given layer type. In this case, the element name will not necessarily match the layer name.

Parameters:
layerType The layer type.
pElement The data element used as the basis for drawing the layer. If NULL is passed in, an element is created with a unique default name based on the element type associated with the given layer type.
Returns:
A pointer to the created layer, which can be safely cast to a derived layer class according to the layer type. NULL is returned if the layer or data element could not be created.
See also:
createLayer(const LayerType&, DataElement*, const std::string&)
Examples:
Tutorial/Tutorial5.cpp.

virtual Layer* SpatialDataView::createLayer ( const LayerType layerType,
DataElement pElement,
const std::string &  layerName 
) [pure virtual]

Adds a new layer to the view.

This method creates a new layer of a given type with a given name based on a given element and adds it to this view. The layer is created with a name based on the name of the data element. If a layer already exists with the same name as the element, then the layer is created with a unique name based on the given layer type. In this case, the element name will not necessarily match the layer name.

Parameters:
layerType The layer type.
pElement The data element used as the basis for drawing the layer. If NULL is passed in, an element is created with a unique default name based on the element type associated with the given layer type.
layerName The name to assign to the created layer. If the given name is empty, the name of the data element is used.
Returns:
A pointer to the created layer, which can be safely cast to a derived layer class according to the layer type. NULL is returned if the layer or data element could not be created.
See also:
createLayer(const LayerType&, DataElement*)

virtual bool SpatialDataView::addLayer ( Layer pLayer  )  [pure virtual]

Adds an existing layer to the view.

Parameters:
pLayer The layer to add to the view. Cannot be NULL.
Returns:
TRUE if the layer was successfully added to the view. FALSE is returned if the layer already exists in the view.
See also:
createLayer(), addLayerList()

virtual bool SpatialDataView::addLayerList ( const LayerList pLayerList  )  [pure virtual]

Adds the layers from a layer list to the view.

The method adds the layers from a layer list into the view. If the given layer list contains a layer that already exists in this list, the layer is not added again.

Parameters:
pLayerList The layer list from which to add its layers to the view. Cannot be NULL.
Returns:
TRUE if the layers from the layer list were successfully added to the view. This includes the cases where layers are not added to this list if they already exist in this list. FALSE is returned if an error occurs.
See also:
addLayer()

virtual std::vector<LayerType> SpatialDataView::getDerivedLayerTypes ( const Layer pLayer  )  const [pure virtual]

Returns layer types from which a given layer can be derived.

This is a convenience method that calls Layer::getLayerType() and then calls getDerivedLayerTypes(LayerType) const.

Parameters:
pLayer The layer to query for layer types which can be derived.
Returns:
All layer types that can be derived from the given layer.
See also:
getDerivedLayerTypes(LayerType) const, deriveLayer()

virtual std::vector<LayerType> SpatialDataView::getDerivedLayerTypes ( LayerType  layerType  )  const [pure virtual]

Returns layer types that can be derived from a given layer type.

Parameters:
layerType The layer type to query for layer types which can be derived.
Returns:
All layer types that can be derived from the given layer type.
See also:
getDerivedLayerTypes(const Layer*) const, deriveLayer()

virtual Layer* SpatialDataView::deriveLayer ( const Layer pLayer,
const LayerType newLayerType 
) [pure virtual]

Creates a new layer based on an existing layer of another type.

This method creates a new layer with a different type, but the same data element and name as an existing layer. If a new annotation or AOI layer is created, the data element is copied.

Parameters:
pLayer The existing layer from which to derive the new layer. This layer can, but does not need to be contained in this view.
newLayerType The layer type for the new layer. If newLayerType is the same as the type for pLayer a copy of the layer is made.
Returns:
A pointer to the created layer, which can be safely cast to a derived layer class according to the new layer type. NULL is returned if the given layer does not support creating a new layer of the given type.
See also:
getDerivedLayerTypes()

virtual Layer* SpatialDataView::convertLayer ( Layer pLayer,
const LayerType newLayerType 
) [pure virtual]

Converts an existing layer from one type to another.

This method is a convenience method that calls deriveLayer() followed by deleteLayer() with both calls wrapped in a single undo action group.

Parameters:
pLayer The existing layer to convert to the new type. The existing layer does not need to be contained in the view, but the new converted layer is only added to this view.
newLayerType The new layer type.
Returns:
A pointer to the created layer, which can be safely cast to a derived layer class according to the new layer type. NULL is returned if the given layer cannot be converted to the new layer type.

virtual bool SpatialDataView::showLayer ( Layer pLayer  )  [pure virtual]

Displays a layer in the layer list.

This method displays the given layer in the view. The layer is displayed on top of the other displayed layers and has a display index of 0.

Parameters:
pLayer The layer to display. The layer must be included in the layer list. Cannot be NULL.
Returns:
TRUE is the layer was successfully displayed. FALSE if the layer does not exist in the layer list or if an error occurred.
Subject Notifications:
This method will notify signalLayerShown() with boost::any<Layer*>.

virtual bool SpatialDataView::hideLayer ( Layer pLayer  )  [pure virtual]

Hides a displayed layer in the layer list.

This method hides a displayed layer, but does not remove or delete the layer from the layer list.

Parameters:
pLayer The layer to remove from the display. The layer must be included in the layer list. Cannot be NULL.
Returns:
TRUE is the layer was successfully hidden. FALSE if the layer does not exist in the layer list or if an error occurred.
Subject Notifications:
This method will notify signalLayerHidden() with boost::any<Layer*>.

virtual void SpatialDataView::getDisplayedLayers ( std::vector< Layer * > &  displayedLayers  )  const [pure virtual]

Retrieves the displayed layers in the layer list.

Parameters:
displayedLayers A reference to a vector to contain pointers for each displayed layer.
See also:
isLayerDisplayed()

virtual bool SpatialDataView::isLayerDisplayed ( Layer pLayer  )  const [pure virtual]

Queries whether a layer is currently displayed.

Parameters:
pLayer The layer to query for its display. Cannot be NULL.
Returns:
TRUE if the layer is displayed. FALSE if the layer is not displayed, or the layer does not exist.

virtual Layer* SpatialDataView::getTopMostLayer (  )  const [pure virtual]

Returns the top-most layer.

Returns:
A pointer to the top-most visible layer, regardless of the layer type. NULL is returned if no layers are currently visible in the view.
See also:
getTopMostLayer(LayerType) const, getTopMostLayer(const LocationType&) const, getTopMostLayer(LayerType, const LocationType&) const, getTopMostElement() const

virtual Layer* SpatialDataView::getTopMostLayer ( LayerType  layerType  )  const [pure virtual]

Returns the top-most layer of a given type.

Parameters:
layerType The type of layer for which to get the top-most layer.
Returns:
A pointer to the top-most visible layer of the given type. NULL is returned if no layers of the given type are currently visible in the view.
See also:
getTopMostLayer() const, getTopMostLayer(const LocationType&) const, getTopMostLayer(LayerType, const LocationType&) const

virtual Layer* SpatialDataView::getTopMostLayer ( const LocationType worldCoord  )  const [pure virtual]

Returns the top-most layer at a given pixel coordinate regardless of layer type.

Parameters:
worldCoord The pixel coordinate in world coordinates.
Returns:
A pointer to the top-most displayed layer in the view whose extents include the given pixel coordinate. NULL is returned if no layers are currently visible in the view whose extents include the given pixel coordinate.
See also:
getTopMostLayer() const, getTopMostLayer(LayerType) const, getTopMostLayer(LayerType, const LocationType&) const

virtual Layer* SpatialDataView::getTopMostLayer ( LayerType  layerType,
const LocationType worldCoord 
) const [pure virtual]

Returns the top-most layer of a given type at a given pixel coordinate.

Parameters:
layerType The layer type.
worldCoord The pixel coordinate in world coordinates.
Returns:
A pointer to the top-most displayed layer of the given type in the view whose extents include the given pixel coordinate. NULL is returned if no layers of the given type are currently visible in the view whose extents include the given pixel coordinate.
See also:
getTopMostLayer() const, getTopMostLayer(LayerType) const, getTopMostLayer(const LocationType&) const

virtual DataElement* SpatialDataView::getTopMostElement (  )  const [pure virtual]

Returns the data element of the top-most layer.

Returns:
A pointer to the data element being displayed by the top-most visible layer in the view, regardless of layer type. NULL is returned if no layers are currently visible in the view.
See also:
getTopMostElement(LayerType) const, getTopMostElement(const LocationType&) const, getTopMostElement(LayerType, const LocationType&) const, getTopMostElement(const std::string&) const, getTopMostLayer() const

virtual DataElement* SpatialDataView::getTopMostElement ( LayerType  layerType  )  const [pure virtual]

Returns the data element of the top-most layer of a given type.

Parameters:
layerType The type of layer for which to get the element.
Returns:
A pointer to the data element being displayed by the top-most visible layer of the given type. NULL is returned if no layers of the given type are currently visible in the view.
See also:
getTopMostElement() const, getTopMostElement(const LocationType&) const, getTopMostElement(LayerType, const LocationType&) const, getTopMostElement(const std::string&) const

virtual DataElement* SpatialDataView::getTopMostElement ( const LocationType worldCoord  )  const [pure virtual]

Returns the data element of the top-most layer at a given pixel coordinate regardless of layer type.

Parameters:
worldCoord The pixel coordinate in world coordinates.
Returns:
A pointer to the data element being displayed by the top-most displayed layer in the view whose extents include the given pixel coordinate. NULL is returned if no layers are currently visible in the view whose extents include the given pixel coordinate.
See also:
getTopMostElement() const, getTopMostElement(LayerType) const, getTopMostElement(LayerType, const LocationType&) const, getTopMostElement(const std::string&) const

virtual DataElement* SpatialDataView::getTopMostElement ( LayerType  layerType,
const LocationType worldCoord 
) const [pure virtual]

Returns the data element of the top-most layer of a given type at a given pixel coordinate.

Parameters:
layerType The type of layer for which to get the element.
worldCoord The pixel coordinate in world coordinates.
Returns:
A pointer to the data element being displayed by the top-most displayed layer of the given type in the view whose extents include the given pixel coordinate. NULL is returned if no layers of the given type are currently visible in the view whose extents include the given pixel coordinate.
See also:
getTopMostElement() const, getTopMostElement(LayerType) const, getTopMostElement(const LocationType&) const, getTopMostElement(const std::string&) const

virtual DataElement* SpatialDataView::getTopMostElement ( const std::string &  elementType  )  const [pure virtual]

Returns the data element the top-most layer displaying an element of the given type.

Parameters:
elementType The element type corresponding the to class name of element for which to get the data element being displayed by the top-most layer. Subclass element types are also checked.
Returns:
A pointer to the data element being displayed by the top-most layer that displays an element of the given type. NULL is returned if no layers displaying an element of the given type are currently visible in the view.
See also:
getTopMostElement() const, getTopMostElement(LayerType) const, getTopMostElement(const LocationType&) const, getTopMostElement(LayerType, const LocationType&) const, TypeConverter::toString()

virtual void SpatialDataView::setActiveLayer ( Layer pLayer  )  [pure virtual]

Enables an existing layer to be edited with the mouse.

This method sets the layer that will be edited with the mouse if the "LayerMode" mouse mode is active. The active layer is maintained when the "LayerMode" mouse mode is not active.

Parameters:
pLayer The layer to activate, which must be able to accept mouse events or NULL to set no layer as active. If the given layer is not present in this view, this method does nothing.
Subject Notifications:
This method will notify signalLayerActivated() if the active layer is successfully set.
See also:
getTopMostLayer(), setMouseMode()

virtual Layer* SpatialDataView::getActiveLayer (  )  const [pure virtual]

Returns the layer that is edited with the mouse.

Returns:
The active layer that receives mouse events when the "LayerMode" mouse mode is active. NULL is returned if an active layer has not yet been set on the view.
See also:
setActiveLayer()

virtual bool SpatialDataView::setFrontLayer ( Layer pLayer  )  [pure virtual]

Moves an existing layer to the top position of the display order.

This method moves the given layer to the top of the display order. If the given layer is already the top layer in the display, its position does not change. Layers in the top position may obscur other layers on the display.

Parameters:
pLayer The layer to set as the top layer. The layer must be included in the layer list. Cannot be NULL.
Returns:
TRUE is the layer was successfully repositioned to the top of the display order. FALSE if the layer does not exist in the layer list or an error occurred.
See also:
bringLayerForward()
Subject Notifications:
This method will notify signalLayerDisplayIndexesChanged().

virtual bool SpatialDataView::setBackLayer ( Layer pLayer  )  [pure virtual]

Moves an existing layer to the bottom position of the display order.

This method moves the given layer to the bottom of the display order. If the given layer is already the bottom layer in the display, its position does not change. Layers in the bottom position may be obscurred by other layers on the display.

Parameters:
pLayer The layer to set as the bottom layer. The layer must be included in the layer list. Cannot be NULL.
Returns:
TRUE is the layer was successfully repositioned to the bottom of the display order. FALSE if the layer does not exist in the layer list or an error occurred.
See also:
sendLayerBackward()
Subject Notifications:
This method will notify signalLayerDisplayIndexesChanged().

virtual bool SpatialDataView::bringLayerForward ( Layer pLayer  )  [pure virtual]

Moves an existing layer up one position in the display order.

This method increases the display order of an existing layer by one position. If the given layer is already the top layer in the display, its position does not change.

Parameters:
pLayer The layer to reposition. The layer must be included in the layer list. Cannot be NULL.
Returns:
TRUE is the layer was successfully repositioned in the display order. FALSE if the layer does not exist in the layer list or an error occurred.
See also:
setFrontLayer()
Subject Notifications:
This method will notify signalLayerDisplayIndexesChanged().

virtual bool SpatialDataView::sendLayerBackward ( Layer pLayer  )  [pure virtual]

Moves an existing layer down one position in the display order.

This method decreases the display order of an existing layer by one position. If the given layer is already the bottom layer in the display, its position does not change.

Parameters:
pLayer The layer to reposition. The layer must be included in the layer list. Cannot be NULL.
Returns:
TRUE is the layer was successfully repositioned in the display order. FALSE if the layer does not exist in the layer list or an error occurred.
See also:
setBackLayer()
Subject Notifications:
This method will notify signalLayerDisplayIndexesChanged().

virtual bool SpatialDataView::setLayerDisplayIndex ( Layer pLayer,
int  iIndex 
) [pure virtual]

Sets the display order for the given layer.

This method sets the layer z-order of a currently displayed layer. If the given layer is hidden, it is automatically shown.

Parameters:
pLayer The layer for which to set the display index. The layer must be included in the layer list. Cannot be NULL.
iIndex The new zero-based display index for the layer. A display index of 0 is the topmost layer.
Returns:
TRUE if the layer order was successfully set. FALSE if the layer does not exist in the layer list or an error occurred.
Subject Notifications:
This method will notify signalLayerDisplayIndexesChanged().

virtual int SpatialDataView::getLayerDisplayIndex ( Layer pLayer  )  const [pure virtual]

Returns the display index for the given layer.

This method returns an index value representing the layer z-order in the displayed layers. The topmost layer has a display order of 0, and pixels drawn in this may obscure those in lower layers.

Parameters:
pLayer The layer for which to get its current display index.
Returns:
The zero-based layer index representing the z-order value. A value of -1 is returned if the layer is not displayed or if the layer does not exist in the layer list.

virtual bool SpatialDataView::deleteLayer ( Layer pLayer  )  [pure virtual]

Deletes a layer in the view.

This method removes the given layer from the view and deletes it. It also deletes its corresponding data element only if no other layers are currently displaying the same element.

Parameters:
pLayer The layer in the view to delete. Cannot be NULL.
Returns:
TRUE is the layer was successfully removed and deleted from the view, otherwise FALSE.
See also:
clear()

virtual void SpatialDataView::clear (  )  [pure virtual]

Deletes all layers in the view.

virtual void SpatialDataView::clearMarkings (  )  [pure virtual]

Clears all analyst markings on the view.

The resulting view is as if the RasterElement had just been loaded. This action cannot be undone.

virtual void SpatialDataView::displayOrigin ( bool  display  )  [pure virtual]

Toggles the display of the origin location marker in the view.

Parameters:
display Set this value to true to display the origin location marker in the view or to false to hide the origin marker.
See also:
isOriginDisplayed()

virtual bool SpatialDataView::isOriginDisplayed (  )  const [pure virtual]

Queries whether the origin location marker is displayed in the view.

Returns:
Returns true if the origin location marker is currently displayed in the view. Returns false if the origin is currently hidden.
See also:
displayOrigin()

virtual void SpatialDataView::displayAxis ( bool  display  )  [pure virtual]

Toggles the display of the orientation axis in the upper left corner of the view.

Parameters:
display Set this value to true to display the orientation axis in the view or to false to hide the axis.
See also:
isAxisDisplayed()

virtual bool SpatialDataView::isAxisDisplayed (  )  const [pure virtual]

Queries whether the orientation axis is displayed in the view.

Returns:
Returns true if the orientation axis is currently displayed in the view. Returns false if the axis is currently hidden.
See also:
displayAxis()

virtual bool SpatialDataView::getLayerImage ( Layer pLayer,
unsigned char *&  pImage,
int &  iWidth,
int &  iHeight,
int &  iDepth,
int &  iNumColors,
ColorType transparent,
int  bbox[4] 
) [pure virtual]

Retrieves 2D image data for a displayed layer.

Parameters:
pLayer The layer for which to get an image.
pImage A pointer to the layer image pixel data.
iWidth The number of pixel columns in the layer image.
iHeight The number of pixel rows in the layer image.
iDepth The number of bits per pixel in the layer image.
iNumColors The number of colors present in the layer image. This is not the total number of available colors specified by the depth.
transparent A reference to a color that is populated with the color value that is used to represent transparent pixels in the image. Transparent pixels are those pixels within the layer extents that do not contain valid layer data. If a valid color is passed in, this will be used as the transparency color.
bbox An integer array that is populated with the extents of the layer in screen pixels.
Returns:
TRUE if the layer image was successfully retrieved, otherwise FALSE.

virtual bool SpatialDataView::getLayerImage ( Layer pLayer,
QImage &  image,
ColorType transparent,
int  bbox[4] 
) [pure virtual]

Retrieves 2D image data for a displayed layer.

Parameters:
pLayer The layer for which to get an image.
image The QImage which will contain the layer image. The state of this object will be reset.
transparent A reference to a color that is populated with the color value that is used to represent transparent pixels in the image. Transparent pixels are those pixels within the layer extents that do not contain valid layer data. If a valid color is passed in, this will be used as the transparency color.
bbox Contains layer extents for drawing.
  • This parameter is used as input if the layer is not currently displayed. When used as input, the values are interpreted as follows:
    • bbox[0] The width of the image
    • bbox[1] The height of the image
    • bbox[2] Ignored
    • bbox[3] Ignored
  • When the method returns this parameter is populated with the bounding box of the drawn portion of the layer.
    • bbox[0] Minimum X
    • bbox[1] Minimum Y
    • bbox[2] Maximum X
    • bbox[3] Maximum Y
Returns:
True if the layer image was successfully retrieved, otherwise false.

virtual void SpatialDataView::setPanLimit ( PanLimitType  eType  )  [pure virtual]

Sets the type of limit on panning the view.

This method sets how panning will be limited within the view.

Parameters:
eType The type of panning limit for the view.
See also:
PanLimitType, getPanLimit()

virtual PanLimitType SpatialDataView::getPanLimit (  )  const [pure virtual]

Returns the current type of limit on panning in the view.

This method returns how panning is currently limited within the view.

Returns:
The type of panning limit for the view.
See also:
PanLimitType, setPanLimit()

virtual void SpatialDataView::setMinimumZoom ( double  dMinZoom  )  [pure virtual]

Sets the limits for the minimum zoom.

This method sets the minimum zoom which is the ratio of the scene extents to the current view size, e.g., a value of 0.5 would limit zooming out such that the scene would fill no less than one half of the view's shortest dimension.

A value of 0 will disable the minimum zoom limit.

Parameters:
dMinZoom The ratio of the scene extents to the current view size.
See also:
getMinimumZoom()

virtual double SpatialDataView::getMinimumZoom (  )  const [pure virtual]

Returns the current minimum zoom.

This method returns the current minimum zoom.

Returns:
The current minimum zoom.
See also:
setMinimumZoom()

virtual void SpatialDataView::setMaximumZoom ( double  dMaxZoom  )  [pure virtual]

Sets the limits for the maximum zoom.

This method sets the maximum zoom which is defined as the minimum number of scene pixels that are visible in the view in the shortest view dimension, e.g., a value of 1.5 would limit zooming in such that one and a half scene pixels would fill the view in the shortest dimension.

A value of 0 will disable the maximum zoom limit.

Parameters:
dMaxZoom The maximum zoom.
See also:
getMaximumZoom()

virtual double SpatialDataView::getMaximumZoom (  )  const [pure virtual]

Returns the current maximum zoom.

This method returns the current maximum zoom.

Returns:
The current maximum zoom.
See also:
setMaximumZoom()

virtual Animation* SpatialDataView::createDefaultAnimation (  )  [pure virtual]

Creates a new animation attached to the primary raster layer.

This method creates a frame-based animation in the view's animation controller that is attached to the primary raster layer so that the displayed bands are automatically updated when the animation is played.

The animation name is set to the primary raster layer name. If the primary raster layer already contains an animation, a new animation is not created.

An animation controller is created if the view does not already have an associated animation controller. If the view already has an animation controller that is time-based and it is empty, the controller will be deleted and a new frame-based controller will be created with the same name as the view. If the existing time-based controller is not empty, a new animation is not created.

If the animation is successfully created, the animation controller is activated on the animation toolbar, and the toolbar is displayed if necessary.

Returns:
A pointer to the created Animation for the primary raster layer. NULL is returned if there is no primary raster layer, or if the animation could not be created.
Subject Notifications:
This method may notify AnimationServices::signalControllerCreated() with boost::any<AnimationController*> if the animation controller for the view needs to be created and may also notify AnimationToolBar::signalControllerChanged() with boost::any<AnimationController*> if the controller is successfully activated on the animation toolbar.
See also:
getAnimationController(), RasterLayer::getAnimation()

virtual void SpatialDataView::resetStretch (  )  [pure virtual]

Resets the stretch type, units, values, and displayed band(s) for all channels in all visible raster layers back to those used when the layer was created.

Subject Notifications:
This method may notify the same signals as RasterLayer::resetStretch() for each visible RasterLayer.
See also:
RasterLayer::resetStretch()


Software Development Kit - Opticks 4.9.0 Build 16218