![]() |
LuciadCPillar 2024.1.05
|
A layer for raster models. More...
#include <luciad/layers/rasters/RasterLayer.h>
Classes | |
class | Builder |
Builder for creating a luciad::RasterLayer for a luciad::IRasterModel. More... | |
Public Member Functions | |
~RasterLayer () override | |
void | addObserver (std::shared_ptr< ILayerObserver > layerObserver) override |
Adds an observer that allows to receive change events from this layer. More... | |
Builder | asBuilder () const |
Returns a new builder based on this layer instance. More... | |
RasterLayerType | getLayerType () const |
Returns the type of this raster layer. More... | |
const std::shared_ptr< IRasterModel > & | getModel () const |
Returns the layer's model, which provides the raster to be presented. More... | |
const RasterStyle & | getRasterStyle () const |
Returns the raster style used for painting this layer. More... | |
const std::string & | getTitle () const override |
Returns the layer's title. More... | |
bool | isBusy () const override |
Returns whether this layer is busy loading data, rendering, loading attributions, or anything else. More... | |
bool | isVisible () const override |
Returns whether this layer is visible. More... | |
void | removeObserver (const std::shared_ptr< ILayerObserver > &layerObserver) override |
Removes the given observer. More... | |
void | setRasterStyle (RasterStyle rasterStyle) |
Sets the raster style used for painting this layer. More... | |
void | setTitle (std::string title) override |
Sets the layer's title. More... | |
void | setVisible (bool visible) override |
Sets whether this layer is visible. More... | |
![]() | |
Layer () | |
Default constructor. More... | |
virtual | ~Layer ()=default |
virtual void | addObserver (std::shared_ptr< ILayerObserver > layerObserver)=0 |
Adds an observer that allows to receive change events from this layer. More... | |
virtual LayerId | getId () const |
Returns the layer's unique id. More... | |
virtual const std::string & | getTitle () const =0 |
Returns the layer's title. More... | |
virtual bool | isBusy () const =0 |
Returns whether this layer is busy loading data, rendering, loading attributions, or anything else. More... | |
virtual bool | isVisible () const =0 |
Returns whether this layer is visible. More... | |
virtual void | removeObserver (const std::shared_ptr< ILayerObserver > &layerObserver)=0 |
Removes the given observer. More... | |
virtual void | setTitle (std::string title)=0 |
Sets the layer's title. More... | |
virtual void | setVisible (bool visible)=0 |
Sets whether this layer is visible. More... | |
Static Public Member Functions | |
static Builder | newBuilder () |
Returns the new builder for creating a RasterLayer. More... | |
static const std::string & | propertyRasterStyle () |
Property name for the LayerEvent that is fired as a result of changing the layer's style. More... | |
![]() | |
static const std::string & | propertyBusy () |
Property name for the LayerEvent that is fired as a result of the layer's busy flag changing. More... | |
static const std::string & | propertyTitle () |
Property name for the LayerEvent that is fired as a result of changing the layer's title. More... | |
static const std::string & | propertyVisible () |
Property name for the LayerEvent that is fired as a result of changing the layer's visible flag. More... | |
A layer for raster models.
Use luciad::RasterLayer::newBuilder to create a raster layer instance.
|
override |
|
overridevirtual |
Adds an observer that allows to receive change events from this layer.
Adding the same observer twice is forbidden, and will cause an exception to be thrown.
layerObserver | an observer. |
luciad::InvalidArgumentException | when the observer was already added. |
luciad::NullArgumentException | when the observer is nullptr . |
Implements luciad::Layer.
Builder luciad::RasterLayer::asBuilder | ( | ) | const |
Returns a new builder based on this layer instance.
You can use this builder, for example, to create a copy of this layer.
Note that observers will not be transferred to a new layer.
RasterLayerType luciad::RasterLayer::getLayerType | ( | ) | const |
const std::shared_ptr< IRasterModel > & luciad::RasterLayer::getModel | ( | ) | const |
Returns the layer's model, which provides the raster to be presented.
const RasterStyle & luciad::RasterLayer::getRasterStyle | ( | ) | const |
Returns the raster style used for painting this layer.
|
overridevirtual |
Returns the layer's title.
Should be suitable for presenting to the user.
Implements luciad::Layer.
|
overridevirtual |
Returns whether this layer is busy loading data, rendering, loading attributions, or anything else.
When this property changes, a LayerEvent
is delivered to the observers with the property name propertyBusy
.
Note: when the map is moving around it can be that the layer is repeatedly loading new data, but does this fast enough that it is done by the time new data is needed, resulting in a repeatedly changing busyness state.
Implements luciad::Layer.
|
overridevirtual |
Returns whether this layer is visible.
Implements luciad::Layer.
|
static |
Returns the new builder for creating a RasterLayer.
|
static |
Property name for the LayerEvent that is fired as a result of changing the layer's style.
|
overridevirtual |
Removes the given observer.
If the given observer was never added, an exception is thrown.
layerObserver | an observer. |
luciad::InvalidArgumentException | when the observer is not known. |
luciad::NullArgumentException | when the observer is nullptr . |
Implements luciad::Layer.
void luciad::RasterLayer::setRasterStyle | ( | RasterStyle | rasterStyle | ) |
Sets the raster style used for painting this layer.
If the new raster style is different from the old one, a LayerEvent
is delivered to the observers with the property name PropertyRasterStyle.
rasterStyle | the new raster style. |
|
overridevirtual |
Sets the layer's title.
Should be suitable for presenting to the user.
If the new title is indeed different from the old one, a LayerEvent is delivered to the observers with the property name PropertyTitle.
title | the new title. |
Implements luciad::Layer.
|
overridevirtual |
Sets whether this layer is visible.
Changes this layer's visibility. If the new visibility is different from the old one, a LayerEvent is delivered to the observers with the property name PropertyVisible.
visible | the new visibility. |
Implements luciad::Layer.