#include <Layer.h>

Public Member Functions | |
| virtual std::list < ContextMenuAction > | getContextMenuActions () const =0 |
| virtual LayerType | getLayerType () const =0 |
| virtual DataElement * | getDataElement () const =0 |
| virtual bool | hasUniqueElement () const =0 |
| virtual View * | getView () const =0 |
| virtual bool | linkLayer (Layer *pLayer)=0 |
| virtual void | getLinkedLayers (std::vector< Layer * > &linkedLayers) const =0 |
| virtual bool | isLayerLinked (Layer *pLayer) const =0 |
| virtual bool | unlinkLayer (Layer *pLayer)=0 |
| virtual Layer * | copy (const std::string &layerName=std::string(), bool bCopyElement=false, DataElement *pElement=NULL) const =0 |
| virtual bool | getExtents (double &minX, double &minY, double &maxX, double &maxY)=0 |
| virtual void | setXScaleFactor (double xScaleFactor)=0 |
| virtual double | getXScaleFactor () const =0 |
| virtual void | setYScaleFactor (double yScaleFactor)=0 |
| virtual double | getYScaleFactor () const =0 |
| virtual double | getXOffset () const =0 |
| virtual void | setXOffset (double xOffset)=0 |
| virtual double | getYOffset () const =0 |
| virtual void | setYOffset (double yOffset)=0 |
| virtual void | translateWorldToData (double worldX, double worldY, double &dataX, double &dataY) const =0 |
| virtual void | translateDataToWorld (double dataX, double dataY, double &worldX, double &worldY) const =0 |
| virtual void | translateScreenToData (double screenX, double screenY, double &dataX, double &dataY) const =0 |
| virtual void | translateDataToScreen (double dataX, double dataY, double &screenX, double &screenY) const =0 |
| virtual void | isFlipped (const LocationType &dataLowerLeft, const LocationType &dataUpperRight, bool &bHorizontalFlip, bool &bVerticalFlip) const =0 |
| virtual bool | rename (const std::string &newName)=0 |
Static Public Member Functions | |
| static const std::string & | signalNameChanged () |
| static const std::string & | signalExtentsModified () |
Protected Member Functions | |
| virtual | ~Layer () |
This abstract base class provides access to properties for all layers that can be displayed in a layer list. This class contains accessor methods to set and get the layer name, and each subclass contains accessor methods specific to the layer type.
This subclass of Subject will notify upon the following conditions:
Definition at line 42 of file Layer.h.
| virtual Layer::~Layer | ( | ) | [protected, virtual] |
This should be destroyed by calling SpatialDataView::deleteLayer.
| static const std::string& Layer::signalNameChanged | ( | ) | [static] |
| static const std::string& Layer::signalExtentsModified | ( | ) | [static] |
| virtual std::list<ContextMenuAction> Layer::getContextMenuActions | ( | ) | const [pure virtual] |
Returns the context menu actions available for this session item.
Implements SessionItem.
Implemented in RasterLayer.
| virtual LayerType Layer::getLayerType | ( | ) | const [pure virtual] |
Returns the layer type.
| virtual DataElement* Layer::getDataElement | ( | ) | const [pure virtual] |
Returns the associated data element.
| virtual bool Layer::hasUniqueElement | ( | ) | const [pure virtual] |
Determine if the DataElement within the Layer is unique to all layers.
| virtual View* Layer::getView | ( | ) | const [pure virtual] |
Returns the view in which the layer is displayed.
| virtual bool Layer::linkLayer | ( | Layer * | pLayer | ) | [pure virtual] |
Links a layer with this layer.
This method establishes a link between this layer and another layer. Linked layers are linked by action. Setting properties in a layer sets the same property values in linked layers.
| pLayer | The layer to link with this layer. Cannot be NULL and must be of the same layer type as this layer. |
| virtual void Layer::getLinkedLayers | ( | std::vector< Layer * > & | linkedLayers | ) | const [pure virtual] |
Retrieves layers linked with this layer.
| linkedLayers | A reference to a vector that is populated with pointers to layers linked with this layer. If no layers are linked, the vector is emptied. |
| virtual bool Layer::isLayerLinked | ( | Layer * | pLayer | ) | const [pure virtual] |
Queries whether a layer is linked with this layer.
| pLayer | The layer to query for linkage with this layer. |
| virtual bool Layer::unlinkLayer | ( | Layer * | pLayer | ) | [pure virtual] |
Breaks the link between this layer and a given layer.
| pLayer | The layer to unlink with this layer. Cannot be NULL. |
| virtual Layer* Layer::copy | ( | const std::string & | layerName = std::string(), |
|
| bool | bCopyElement = false, |
|||
| DataElement * | pElement = NULL | |||
| ) | const [pure virtual] |
Creates a new layer with the same settings and properties as this layer.
| layerName | The name for the new layer. If an empty string is passed in the name of this layer is used for the new layer. | |
| bCopyElement | Set this value to true to make a copy of this layer's element. Set this value to false to use this layer's element in the new layer. | |
| pElement | If the element is also copied, this is the parent of the new element. If the element is not being copied, this parameter is ignored. |
| virtual bool Layer::getExtents | ( | double & | minX, | |
| double & | minY, | |||
| double & | maxX, | |||
| double & | maxY | |||
| ) | [pure virtual] |
Retrieves the layer extents in world coordinates.
Layer extents are defined as the pixel coordinate range of all data in the data element being displayed by the layer. The populated extent coordinates already account for layer scaling and offset values.
| minX | The minimum coordinate value of the layer in the X dimension. | |
| minY | The minimum coordinate value of the layer in the Y dimension. | |
| maxX | The maximum coordinate value of the layer in the X dimension. | |
| maxY | The maximum coordinate value of the layer in the Y dimension. |
true if the extents of the layer were successfully retrieved; otherwise returns false.| virtual void Layer::setXScaleFactor | ( | double | xScaleFactor | ) | [pure virtual] |
Sets the X-dimension scale factor when drawing.
Any scaling is applied before the offset is applied.
| xScaleFactor | The factor by which the pixels in the X-dimension are scaled while drawing. If this value is negative or zero, this method does nothing. |
| virtual double Layer::getXScaleFactor | ( | ) | const [pure virtual] |
Returns the X-dimension scale factor when drawing.
Any scaling is applied before the offset is applied.
| virtual void Layer::setYScaleFactor | ( | double | yScaleFactor | ) | [pure virtual] |
Sets the Y-dimension scale factor when drawing.
Any scaling is applied before the offset is applied.
| yScaleFactor | The factor by which the pixels in the Y-dimension are scaled while drawing. If this value is negative or zero, this method does nothing. |
| virtual double Layer::getYScaleFactor | ( | ) | const [pure virtual] |
Returns the Y-dimension scale factor when drawing.
Any scaling is applied before the offset is applied.
| virtual double Layer::getXOffset | ( | ) | const [pure virtual] |
Get the X-coordinate offset from the view's coordinate system.
Offsets are applied after scale factors.
| virtual void Layer::setXOffset | ( | double | xOffset | ) | [pure virtual] |
Set the X-coordinate offset from the view's coordinate system.
Offsets are applied after scale factors.
| xOffset | The X offset. |
| virtual double Layer::getYOffset | ( | ) | const [pure virtual] |
Get the Y-coordinate offset from the view's coordinate system.
Offsets are applied after scale factors.
| virtual void Layer::setYOffset | ( | double | yOffset | ) | [pure virtual] |
Set the Y-coordinate offset from the view's coordinate system.
Offsets are applied after scale factors.
| yOffset | The Y offset. |
| virtual void Layer::translateWorldToData | ( | double | worldX, | |
| double | worldY, | |||
| double & | dataX, | |||
| double & | dataY | |||
| ) | const [pure virtual] |
Translate from world coordinates to data coordinates for this layer.
| worldX | The x-coordinate to translate from. | |
| worldY | The y-coordinate to translate from. | |
| dataX | The x-coordinate to translate to. | |
| dataY | The y-coordinate to translate to. |
| virtual void Layer::translateDataToWorld | ( | double | dataX, | |
| double | dataY, | |||
| double & | worldX, | |||
| double & | worldY | |||
| ) | const [pure virtual] |
Translate from data coordinates to world coordinates for this layer.
| dataX | The x-coordinate to translate from. | |
| dataY | The y-coordinate to translate from. | |
| worldX | The x-coordinate to translate to. | |
| worldY | The y-coordinate to translate to. |
| virtual void Layer::translateScreenToData | ( | double | screenX, | |
| double | screenY, | |||
| double & | dataX, | |||
| double & | dataY | |||
| ) | const [pure virtual] |
Translate from screen coordinates to data coordinates for this layer.
| screenX | The x-coordinate to translate from. | |
| screenY | The y-coordinate to translate from. | |
| dataX | The x-coordinate to translate to. | |
| dataY | The y-coordinate to translate to. |
| virtual void Layer::translateDataToScreen | ( | double | dataX, | |
| double | dataY, | |||
| double & | screenX, | |||
| double & | screenY | |||
| ) | const [pure virtual] |
Translate from data coordinates to screen coordinates for this layer.
| dataX | The x-coordinate to translate from. | |
| dataY | The y-coordinate to translate from. | |
| screenX | The x-coordinate to translate to. | |
| screenY | The y-coordinate to translate to. |
| virtual void Layer::isFlipped | ( | const LocationType & | dataLowerLeft, | |
| const LocationType & | dataUpperRight, | |||
| bool & | bHorizontalFlip, | |||
| bool & | bVerticalFlip | |||
| ) | const [pure virtual] |
Queries whether the layer's data coordinate system is flipped from the screen coordinate system.
| dataLowerLeft | A lower left data coordinate for which to perform the data-to-screen transformation. | |
| dataUpperRight | An upper right data coordinate for which to perform the data-to-screen transformation. | |
| bHorizontalFlip | This parameter is set to true if the data coordinate system is flipped about the y-axis relative to the screen coordinate system; otherwise the parameter is set to false. | |
| bVerticalFlip | This parameter is set to true if the data coordinate system is flipped about the x-axis relative to the screen coordinate system; otherwise the parameter is set to false. |
| virtual bool Layer::rename | ( | const std::string & | newName | ) | [pure virtual] |
Renames the layer to a given name.
| newName | The new name for the layer, which must be unique within the layer list for the layer type. This method does nothing and returns false if an empty string is passed in. |
true if the layer was successfully renamed. Returns false if another layer of the same type in the layer list already has the given name.