QGIS API Documentation  3.20.0-Odense (decaadbb31)
Public Types | Public Member Functions | List of all members
QgsRasterLayerTemporalProperties Class Reference

Implementation of map layer temporal properties for raster layers. More...

#include <qgsrasterlayertemporalproperties.h>

Inheritance diagram for QgsRasterLayerTemporalProperties:
Inheritance graph
[legend]

Public Types

enum  TemporalMode { ModeFixedTemporalRange = 0 , ModeTemporalRangeFromDataProvider = 1 }
 Mode of the raster temporal properties. More...
 
- Public Types inherited from QgsTemporalProperty
enum  Flag { FlagDontInvalidateCachedRendersWhenRangeChanges = 1 }
 Flags attached to the temporal property. More...
 

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...
 
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...
 
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...
 
QgsRasterDataProviderTemporalCapabilities::IntervalHandlingMethod 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...
 
TemporalMode 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 setFixedTemporalRange (const QgsDateTimeRange &range)
 Sets a temporal range to apply to the whole layer. More...
 
void setIntervalHandlingMethod (QgsRasterDataProviderTemporalCapabilities::IntervalHandlingMethod method)
 Sets the desired method to use when resolving a temporal interval to matching layers or bands in the data provider. More...
 
void setMode (TemporalMode 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...
 
- Public Member Functions inherited from QgsTemporalProperty
 QgsTemporalProperty (QObject *parent=nullptr, bool enabled=false)
 Constructor for QgsTemporalProperty, with the specified parent object. 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

- Signals inherited from QgsTemporalProperty
void changed ()
 Emitted when the temporal properties have changed. More...
 

Detailed Description

Implementation of map layer temporal properties for raster layers.

Since
QGIS 3.14

Definition at line 35 of file qgsrasterlayertemporalproperties.h.

Member Enumeration Documentation

◆ TemporalMode

Mode of the raster temporal properties.

Enumerator
ModeFixedTemporalRange 

Mode when temporal properties have fixed start and end datetimes.

ModeTemporalRangeFromDataProvider 

Mode when raster layer delegates temporal range handling to the dataprovider.

Definition at line 55 of file qgsrasterlayertemporalproperties.h.

Constructor & Destructor Documentation

◆ QgsRasterLayerTemporalProperties()

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.

Member Function Documentation

◆ allTemporalRanges()

QList< QgsDateTimeRange > QgsRasterLayerTemporalProperties::allTemporalRanges ( QgsMapLayer layer) const
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.

Since
QGIS 3.20

Reimplemented from QgsMapLayerTemporalProperties.

Definition at line 61 of file qgsrasterlayertemporalproperties.cpp.

◆ calculateTemporalExtent()

QgsDateTimeRange QgsRasterLayerTemporalProperties::calculateTemporalExtent ( QgsMapLayer layer) const
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.

Note
Not available in Python bindings

Reimplemented from QgsMapLayerTemporalProperties.

Definition at line 43 of file qgsrasterlayertemporalproperties.cpp.

◆ fixedTemporalRange()

const QgsDateTimeRange & QgsRasterLayerTemporalProperties::fixedTemporalRange ( ) const

Returns the fixed temporal range for the layer.

Warning
To be used only when mode() is QgsRasterLayerTemporalProperties::ModeFixedTemporalRange
See also
setFixedTemporalRange()

Definition at line 116 of file qgsrasterlayertemporalproperties.cpp.

◆ flags()

QgsTemporalProperty::Flags QgsRasterLayerTemporalProperties::flags ( ) const
overridevirtual

Returns flags associated to the temporal property.

Reimplemented from QgsTemporalProperty.

Definition at line 94 of file qgsrasterlayertemporalproperties.cpp.

◆ intervalHandlingMethod()

QgsRasterDataProviderTemporalCapabilities::IntervalHandlingMethod QgsRasterLayerTemporalProperties::intervalHandlingMethod ( ) const

Returns the desired method to use when resolving a temporal interval to matching layers or bands in the data provider.

See also
setIntervalHandlingMethod()

Definition at line 99 of file qgsrasterlayertemporalproperties.cpp.

◆ isVisibleInTemporalRange()

bool QgsRasterLayerTemporalProperties::isVisibleInTemporalRange ( const QgsDateTimeRange &  range) const
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.

◆ mode()

QgsRasterLayerTemporalProperties::TemporalMode QgsRasterLayerTemporalProperties::mode ( ) const

Returns the temporal properties mode.

See also
setMode()

Definition at line 82 of file qgsrasterlayertemporalproperties.cpp.

◆ readXml()

bool QgsRasterLayerTemporalProperties::readXml ( const QDomElement &  element,
const QgsReadWriteContext context 
)
overridevirtual

Reads temporal properties from a DOM element previously written by writeXml().

See also
writeXml()

Implements QgsMapLayerTemporalProperties.

Definition at line 121 of file qgsrasterlayertemporalproperties.cpp.

◆ setDefaultsFromDataProviderTemporalCapabilities()

void QgsRasterLayerTemporalProperties::setDefaultsFromDataProviderTemporalCapabilities ( const QgsDataProviderTemporalCapabilities capabilities)
overridevirtual

Sets the layers temporal settings to appropriate defaults based on a provider's temporal capabilities.

Implements QgsMapLayerTemporalProperties.

Definition at line 177 of file qgsrasterlayertemporalproperties.cpp.

◆ setFixedTemporalRange()

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.

Warning
This setting is only effective when mode() is QgsRasterLayerTemporalProperties::ModeFixedTemporalRange
See also
fixedTemporalRange()

Definition at line 111 of file qgsrasterlayertemporalproperties.cpp.

◆ setIntervalHandlingMethod()

void QgsRasterLayerTemporalProperties::setIntervalHandlingMethod ( QgsRasterDataProviderTemporalCapabilities::IntervalHandlingMethod  method)

Sets the desired method to use when resolving a temporal interval to matching layers or bands in the data provider.

See also
intervalHandlingMethod()

Definition at line 104 of file qgsrasterlayertemporalproperties.cpp.

◆ setMode()

void QgsRasterLayerTemporalProperties::setMode ( QgsRasterLayerTemporalProperties::TemporalMode  mode)

Sets the temporal properties mode.

See also
mode()

Definition at line 87 of file qgsrasterlayertemporalproperties.cpp.

◆ writeXml()

QDomElement QgsRasterLayerTemporalProperties::writeXml ( QDomElement &  element,
QDomDocument &  doc,
const QgsReadWriteContext context 
)
overridevirtual

Writes the properties to a DOM element, to be used later with readXml().

See also
readXml()

Implements QgsMapLayerTemporalProperties.

Definition at line 147 of file qgsrasterlayertemporalproperties.cpp.


The documentation for this class was generated from the following files: