18#ifndef QGSMESHLAYERTEMPORALPROPERTIES_H
19#define QGSMESHLAYERTEMPORALPROPERTIES_H
135 QDateTime mReferenceTime;
139 bool mIsValid =
false;
140 bool mAlwaysLoadReferenceTimeFromSource =
false;
Base class for handling properties relating to a data 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().
virtual QgsDateTimeRange calculateTemporalExtent(QgsMapLayer *layer) const
Attempts to calculate the overall temporal extent for the specified layer, using the settings defined...
virtual void setDefaultsFromDataProviderTemporalCapabilities(const QgsDataProviderTemporalCapabilities *capabilities)=0
Sets the layers temporal settings to appropriate defaults based on a provider's temporal capabilities...
QgsMapLayerTemporalProperties(QObject *parent, bool enabled=false)
Constructor for QgsMapLayerTemporalProperties, with the specified parent object.
virtual bool readXml(const QDomElement &element, const QgsReadWriteContext &context)=0
Reads temporal properties from a DOM element previously written by writeXml().
Base class for all map layer types.
MatchingTemporalDatasetMethod
Method for selection of temporal mesh dataset from a range time.
@ FindClosestDatasetBeforeStartRangeTime
QDateTime referenceTime() const
Returns the reference time.
void setAlwaysLoadReferenceTimeFromSource(bool autoReloadFromProvider)
Sets whether the time proporties are automatically reloaded from provider when project is opened or l...
bool isValid() const
Returns whether the instance is valid.
void setMatchingMethod(const QgsMeshDataProviderTemporalCapabilities::MatchingTemporalDatasetMethod &matchingMethod)
Sets the method used to match dataset from temporal capabilities.
QgsMeshDataProviderTemporalCapabilities::MatchingTemporalDatasetMethod matchingMethod() const
Returns the method used to match dataset from temporal capabilities.
void setReferenceTime(const QDateTime &referenceTime, const QgsDataProviderTemporalCapabilities *capabilities)
Sets the reference time and update the time extent from the temporal capabilities,...
bool alwaysLoadReferenceTimeFromSource() const
Returns whether the time proporties are automatically reloaded from provider when project is opened o...
void setIsValid(bool isValid)
Sets whether the instance is valid.
QgsDateTimeRange timeExtent() const
Returns the time extent.
QgsMeshLayerTemporalProperties(QObject *parent=nullptr, bool enabled=true)
Constructor for QgsMeshLayerTemporalProperties.
A container for the context for various read/write operations on objects.
QgsTemporalRange< QDateTime > QgsDateTimeRange
QgsRange which stores a range of date times.