QGIS API Documentation
3.20.0-Odense (decaadbb31)
|
Implementation of map layer temporal properties for mesh layers. More...
#include <qgsmeshlayertemporalproperties.h>
Public Member Functions | |
QgsMeshLayerTemporalProperties (QObject *parent=nullptr, bool enabled=true) | |
Constructor for QgsMeshLayerTemporalProperties. 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... | |
QgsMeshDataProviderTemporalCapabilities::MatchingTemporalDatasetMethod | matchingMethod () const |
Returns the method used to match dataset from temporal capabilities. More... | |
bool | readXml (const QDomElement &element, const QgsReadWriteContext &context) override |
Reads temporal properties from a DOM element previously written by writeXml(). More... | |
QDateTime | referenceTime () const |
Returns the reference time. More... | |
void | setDefaultsFromDataProviderTemporalCapabilities (const QgsDataProviderTemporalCapabilities *capabilities) override |
Sets the layers temporal settings to appropriate defaults based on a provider's temporal capabilities. More... | |
void | setMatchingMethod (const QgsMeshDataProviderTemporalCapabilities::MatchingTemporalDatasetMethod &matchingMethod) |
Sets the method used to match dataset from temporal capabilities. More... | |
void | setReferenceTime (const QDateTime &referenceTime, const QgsDataProviderTemporalCapabilities *capabilities) |
Sets the reference time and update the time extent from the temporal capabilities, if the temporal capabilities is null, set a void time extent (reference time to reference time) More... | |
QgsDateTimeRange | timeExtent () const |
Returns the time extent. 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 bool | isVisibleInTemporalRange (const QgsDateTimeRange &range) const |
Returns true if the layer should be visible and rendered for the specified time range. 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... | |
Signals inherited from QgsTemporalProperty | |
void | changed () |
Emitted when the temporal properties have changed. More... | |
Implementation of map layer temporal properties for mesh layers.
The time in a mesh layer is defined by :
Definition at line 51 of file qgsmeshlayertemporalproperties.h.
QgsMeshLayerTemporalProperties::QgsMeshLayerTemporalProperties | ( | QObject * | parent = nullptr , |
bool | enabled = true |
||
) |
Constructor for QgsMeshLayerTemporalProperties.
parent | pointer to the parent object |
enabled | argument specifies whether the temporal properties are initially enabled or not (see isActive()). |
Definition at line 23 of file qgsmeshlayertemporalproperties.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 79 of file qgsmeshlayertemporalproperties.cpp.
QgsMeshDataProviderTemporalCapabilities::MatchingTemporalDatasetMethod QgsMeshLayerTemporalProperties::matchingMethod | ( | ) | const |
Returns the method used to match dataset from temporal capabilities.
Definition at line 106 of file qgsmeshlayertemporalproperties.cpp.
|
overridevirtual |
Reads temporal properties from a DOM element previously written by writeXml().
Implements QgsMapLayerTemporalProperties.
Definition at line 43 of file qgsmeshlayertemporalproperties.cpp.
QDateTime QgsMeshLayerTemporalProperties::referenceTime | ( | ) | const |
Returns the reference time.
Definition at line 89 of file qgsmeshlayertemporalproperties.cpp.
|
overridevirtual |
Sets the layers temporal settings to appropriate defaults based on a provider's temporal capabilities.
Implements QgsMapLayerTemporalProperties.
Definition at line 67 of file qgsmeshlayertemporalproperties.cpp.
void QgsMeshLayerTemporalProperties::setMatchingMethod | ( | const QgsMeshDataProviderTemporalCapabilities::MatchingTemporalDatasetMethod & | matchingMethod | ) |
Sets the method used to match dataset from temporal capabilities.
matchingMethod | the matching method |
Definition at line 111 of file qgsmeshlayertemporalproperties.cpp.
void QgsMeshLayerTemporalProperties::setReferenceTime | ( | const QDateTime & | referenceTime, |
const QgsDataProviderTemporalCapabilities * | capabilities | ||
) |
Sets the reference time and update the time extent from the temporal capabilities, if the temporal capabilities is null, set a void time extent (reference time to reference time)
referenceTime | the reference time |
capabilities | the temporal capabilities of the data provider |
Definition at line 94 of file qgsmeshlayertemporalproperties.cpp.
QgsDateTimeRange QgsMeshLayerTemporalProperties::timeExtent | ( | ) | const |
Returns the time extent.
Definition at line 84 of file qgsmeshlayertemporalproperties.cpp.
|
overridevirtual |
Writes the properties to a DOM element, to be used later with readXml().
Implements QgsMapLayerTemporalProperties.
Definition at line 27 of file qgsmeshlayertemporalproperties.cpp.