QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
|
Implementation of map layer temporal properties for raster layers. More...
#include <qgsrasterlayertemporalproperties.h>
Public Member Functions | |
QgsRasterLayerTemporalProperties (QObject *parent=nullptr, bool enabled=false) | |
Constructor for QgsRasterLayerTemporalProperties, with the specified parent object. More... | |
QList< QgsDateTimeRange > | allTemporalRanges (QgsMapLayer *layer) const override |
Attempts to calculate the overall list of all temporal extents which are contained in the specified layer, using the settings defined by the temporal properties object. More... | |
int | bandForTemporalRange (QgsRasterLayer *layer, const QgsDateTimeRange &range) const |
Returns the band corresponding to the specified range. More... | |
QgsDateTimeRange | calculateTemporalExtent (QgsMapLayer *layer) const override |
Attempts to calculate the overall temporal extent for the specified layer, using the settings defined by the temporal properties object. More... | |
QMap< int, QgsDateTimeRange > | fixedRangePerBand () const |
Returns the fixed temporal range for each band. More... | |
const QgsDateTimeRange & | fixedTemporalRange () const |
Returns the fixed temporal range for the layer. More... | |
QgsTemporalProperty::Flags | flags () const override |
Returns flags associated to the temporal property. More... | |
Qgis::TemporalIntervalMatchMethod | intervalHandlingMethod () const |
Returns the desired method to use when resolving a temporal interval to matching layers or bands in the data provider. More... | |
bool | isVisibleInTemporalRange (const QgsDateTimeRange &range) const override |
Returns true if the layer should be visible and rendered for the specified time range. More... | |
Qgis::RasterTemporalMode | mode () const |
Returns the temporal properties mode. More... | |
bool | readXml (const QDomElement &element, const QgsReadWriteContext &context) override |
Reads temporal properties from a DOM element previously written by writeXml(). More... | |
void | setDefaultsFromDataProviderTemporalCapabilities (const QgsDataProviderTemporalCapabilities *capabilities) override |
Sets the layers temporal settings to appropriate defaults based on a provider's temporal capabilities. More... | |
void | setFixedRangePerBand (const QMap< int, QgsDateTimeRange > &ranges) |
Sets the fixed temporal range for each band. More... | |
void | setFixedTemporalRange (const QgsDateTimeRange &range) |
Sets a temporal range to apply to the whole layer. More... | |
void | setIntervalHandlingMethod (Qgis::TemporalIntervalMatchMethod method) |
Sets the desired method to use when resolving a temporal interval to matching layers or bands in the data provider. More... | |
void | setMode (Qgis::RasterTemporalMode mode) |
Sets the temporal properties mode. More... | |
QDomElement | writeXml (QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context) override |
Writes the properties to a DOM element, to be used later with readXml(). More... | |
Public Member Functions inherited from QgsMapLayerTemporalProperties | |
QgsMapLayerTemporalProperties (QObject *parent, bool enabled=false) | |
Constructor for QgsMapLayerTemporalProperties, with the specified parent object. More... | |
virtual QList< QgsDateTimeRange > | allTemporalRanges (QgsMapLayer *layer) const |
Attempts to calculate the overall list of all temporal extents which are contained in the specified layer, using the settings defined by the temporal properties object. More... | |
virtual QgsDateTimeRange | calculateTemporalExtent (QgsMapLayer *layer) const |
Attempts to calculate the overall temporal extent for the specified layer, using the settings defined by the temporal properties object. More... | |
virtual bool | isVisibleInTemporalRange (const QgsDateTimeRange &range) const |
Returns true if the layer should be visible and rendered for the specified time range. More... | |
virtual bool | readXml (const QDomElement &element, const QgsReadWriteContext &context)=0 |
Reads temporal properties from a DOM element previously written by writeXml(). More... | |
virtual void | setDefaultsFromDataProviderTemporalCapabilities (const QgsDataProviderTemporalCapabilities *capabilities)=0 |
Sets the layers temporal settings to appropriate defaults based on a provider's temporal capabilities. More... | |
virtual QDomElement | writeXml (QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context)=0 |
Writes the properties to a DOM element, to be used later with readXml(). More... | |
Public Member Functions inherited from QgsTemporalProperty | |
QgsTemporalProperty (QObject *parent=nullptr, bool enabled=false) | |
Constructor for QgsTemporalProperty, with the specified parent object. More... | |
virtual QgsTemporalProperty::Flags | flags () const |
Returns flags associated to the temporal property. More... | |
bool | isActive () const |
Returns true if the temporal property is active. More... | |
void | setIsActive (bool active) |
Sets whether the temporal property is active. More... | |
Additional Inherited Members | |
Public Types inherited from QgsTemporalProperty | |
enum | Flag { FlagDontInvalidateCachedRendersWhenRangeChanges = 1 } |
Flags attached to the temporal property. More... | |
typedef QFlags< Flag > | Flags |
Signals inherited from QgsTemporalProperty | |
void | changed () |
Emitted when the temporal properties have changed. More... | |
Implementation of map layer temporal properties for raster layers.
Definition at line 37 of file qgsrasterlayertemporalproperties.h.
QgsRasterLayerTemporalProperties::QgsRasterLayerTemporalProperties | ( | QObject * | parent = nullptr , |
bool | enabled = false |
||
) |
Constructor for QgsRasterLayerTemporalProperties, with the specified parent object.
The enabled argument specifies whether the temporal properties are initially enabled or not (see isActive()).
Definition at line 22 of file qgsrasterlayertemporalproperties.cpp.
|
overridevirtual |
Attempts to calculate the overall list of all temporal extents which are contained in the specified layer, using the settings defined by the temporal properties object.
May return an empty list if the ranges could not be calculated.
Reimplemented from QgsMapLayerTemporalProperties.
Definition at line 105 of file qgsrasterlayertemporalproperties.cpp.
int QgsRasterLayerTemporalProperties::bandForTemporalRange | ( | QgsRasterLayer * | layer, |
const QgsDateTimeRange & | range | ||
) | const |
Returns the band corresponding to the specified range.
Definition at line 204 of file qgsrasterlayertemporalproperties.cpp.
|
overridevirtual |
Attempts to calculate the overall temporal extent for the specified layer, using the settings defined by the temporal properties object.
May return an infinite range if the extent could not be calculated.
Reimplemented from QgsMapLayerTemporalProperties.
Definition at line 54 of file qgsrasterlayertemporalproperties.cpp.
QMap< int, QgsDateTimeRange > QgsRasterLayerTemporalProperties::fixedRangePerBand | ( | ) | const |
Returns the fixed temporal range for each band.
Definition at line 190 of file qgsrasterlayertemporalproperties.cpp.
const QgsDateTimeRange & QgsRasterLayerTemporalProperties::fixedTemporalRange | ( | ) | const |
Returns the fixed temporal range for the layer.
Definition at line 185 of file qgsrasterlayertemporalproperties.cpp.
|
overridevirtual |
Returns flags associated to the temporal property.
Reimplemented from QgsTemporalProperty.
Definition at line 153 of file qgsrasterlayertemporalproperties.cpp.
Qgis::TemporalIntervalMatchMethod QgsRasterLayerTemporalProperties::intervalHandlingMethod | ( | ) | const |
Returns the desired method to use when resolving a temporal interval to matching layers or bands in the data provider.
Definition at line 168 of file qgsrasterlayertemporalproperties.cpp.
|
overridevirtual |
Returns true
if the layer should be visible and rendered for the specified time range.
Reimplemented from QgsMapLayerTemporalProperties.
Definition at line 27 of file qgsrasterlayertemporalproperties.cpp.
Qgis::RasterTemporalMode QgsRasterLayerTemporalProperties::mode | ( | ) | const |
Returns the temporal properties mode.
Definition at line 141 of file qgsrasterlayertemporalproperties.cpp.
|
overridevirtual |
Reads temporal properties from a DOM element previously written by writeXml().
Implements QgsMapLayerTemporalProperties.
Definition at line 237 of file qgsrasterlayertemporalproperties.cpp.
|
overridevirtual |
Sets the layers temporal settings to appropriate defaults based on a provider's temporal capabilities.
Implements QgsMapLayerTemporalProperties.
Definition at line 351 of file qgsrasterlayertemporalproperties.cpp.
void QgsRasterLayerTemporalProperties::setFixedRangePerBand | ( | const QMap< int, QgsDateTimeRange > & | ranges | ) |
Sets the fixed temporal range for each band.
Definition at line 195 of file qgsrasterlayertemporalproperties.cpp.
void QgsRasterLayerTemporalProperties::setFixedTemporalRange | ( | const QgsDateTimeRange & | range | ) |
Sets a temporal range to apply to the whole layer.
All bands from the raster layer will be rendered whenever the current datetime range of a render context intersects the specified range.
Definition at line 180 of file qgsrasterlayertemporalproperties.cpp.
void QgsRasterLayerTemporalProperties::setIntervalHandlingMethod | ( | Qgis::TemporalIntervalMatchMethod | method | ) |
Sets the desired method to use when resolving a temporal interval to matching layers or bands in the data provider.
Definition at line 173 of file qgsrasterlayertemporalproperties.cpp.
void QgsRasterLayerTemporalProperties::setMode | ( | Qgis::RasterTemporalMode | mode | ) |
Sets the temporal properties mode.
Definition at line 146 of file qgsrasterlayertemporalproperties.cpp.
|
overridevirtual |
Writes the properties to a DOM element, to be used later with readXml().
Implements QgsMapLayerTemporalProperties.
Definition at line 292 of file qgsrasterlayertemporalproperties.cpp.