QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsMapLayerTemporalProperties Class Referenceabstract

Base class for storage of map layer temporal properties. More...

#include <qgsmaplayertemporalproperties.h>

Inheritance diagram for QgsMapLayerTemporalProperties:
Inheritance graph
[legend]

Public Member Functions

 QgsMapLayerTemporalProperties (QObject *parent, bool enabled=false)
 Constructor for QgsMapLayerTemporalProperties, with the specified parent object.
 
virtual QList< QgsDateTimeRangeallTemporalRanges (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.
 
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.
 
virtual bool isVisibleInTemporalRange (const QgsDateTimeRange &range) const
 Returns true if the layer should be visible and rendered for the specified time range.
 
virtual bool readXml (const QDomElement &element, const QgsReadWriteContext &context)=0
 Reads temporal properties from a DOM element previously written by writeXml().
 
virtual void setDefaultsFromDataProviderTemporalCapabilities (const QgsDataProviderTemporalCapabilities *capabilities)=0
 Sets the layers temporal settings to appropriate defaults based on a provider's temporal capabilities.
 
virtual QDomElement writeXml (QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context)=0
 Writes the properties to a DOM element, to be used later with readXml().
 
- Public Member Functions inherited from QgsTemporalProperty
 QgsTemporalProperty (QObject *parent=nullptr, bool enabled=false)
 Constructor for QgsTemporalProperty, with the specified parent object.
 
virtual QgsTemporalProperty::Flags flags () const
 Returns flags associated to the temporal property.
 
bool isActive () const
 Returns true if the temporal property is active.
 
void setIsActive (bool active)
 Sets whether the temporal property is active.
 

Additional Inherited Members

- Public Types inherited from QgsTemporalProperty
enum  Flag { FlagDontInvalidateCachedRendersWhenRangeChanges = 1 }
 Flags attached to the temporal property. More...
 
typedef QFlags< FlagFlags
 
- Signals inherited from QgsTemporalProperty
void changed ()
 Emitted when the temporal properties have changed.
 

Detailed Description

Base class for storage of map layer temporal properties.

QgsMapLayerTemporalProperties exposes user-configurable settings for controlling how an individual QgsMapLayer behaves in a temporal context, e.g. while animating a map object.

Since
QGIS 3.14

Definition at line 43 of file qgsmaplayertemporalproperties.h.

Constructor & Destructor Documentation

◆ QgsMapLayerTemporalProperties()

QgsMapLayerTemporalProperties::QgsMapLayerTemporalProperties ( QObject *  parent,
bool  enabled = false 
)

Constructor for QgsMapLayerTemporalProperties, with the specified parent object.

The enabled argument specifies whether the temporal properties are initially enabled or not (see isActive()).

Definition at line 21 of file qgsmaplayertemporalproperties.cpp.

Member Function Documentation

◆ allTemporalRanges()

QList< QgsDateTimeRange > QgsMapLayerTemporalProperties::allTemporalRanges ( QgsMapLayer layer) const
virtual

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 in QgsRasterLayerTemporalProperties.

Definition at line 36 of file qgsmaplayertemporalproperties.cpp.

◆ calculateTemporalExtent()

QgsDateTimeRange QgsMapLayerTemporalProperties::calculateTemporalExtent ( QgsMapLayer layer) const
virtual

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 in QgsMeshLayerTemporalProperties, QgsRasterLayerTemporalProperties, and QgsVectorLayerTemporalProperties.

Definition at line 31 of file qgsmaplayertemporalproperties.cpp.

◆ isVisibleInTemporalRange()

bool QgsMapLayerTemporalProperties::isVisibleInTemporalRange ( const QgsDateTimeRange range) const
virtual

Returns true if the layer should be visible and rendered for the specified time range.

Reimplemented in QgsRasterLayerTemporalProperties, and QgsVectorLayerTemporalProperties.

Definition at line 26 of file qgsmaplayertemporalproperties.cpp.

◆ readXml()

virtual bool QgsMapLayerTemporalProperties::readXml ( const QDomElement &  element,
const QgsReadWriteContext context 
)
pure virtual

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

See also
writeXml()

Implemented in QgsMeshLayerTemporalProperties, QgsRasterLayerTemporalProperties, and QgsVectorLayerTemporalProperties.

◆ setDefaultsFromDataProviderTemporalCapabilities()

virtual void QgsMapLayerTemporalProperties::setDefaultsFromDataProviderTemporalCapabilities ( const QgsDataProviderTemporalCapabilities capabilities)
pure virtual

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

Implemented in QgsMeshLayerTemporalProperties, QgsRasterLayerTemporalProperties, and QgsVectorLayerTemporalProperties.

◆ writeXml()

virtual QDomElement QgsMapLayerTemporalProperties::writeXml ( QDomElement &  element,
QDomDocument &  doc,
const QgsReadWriteContext context 
)
pure virtual

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

See also
readXml()

Implemented in QgsMeshLayerTemporalProperties, QgsRasterLayerTemporalProperties, and QgsVectorLayerTemporalProperties.


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