QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
19 #ifndef QGSVECTORLAYERTEMPORALPROPERTIES_H
20 #define QGSVECTORLAYERTEMPORALPROPERTIES_H
22 #include "qgis_core.h"
91 ModeFixedTemporalRange = 0,
104 TemporalMode mode()
const;
111 void setMode( TemporalMode mode );
116 QgsTemporalProperty::Flags
flags()
const override;
128 void setFixedTemporalRange(
const QgsDateTimeRange &range );
138 const QgsDateTimeRange &fixedTemporalRange()
const;
150 QString startField()
const;
162 void setStartField(
const QString &field );
171 QString endField()
const;
180 void setEndField(
const QString &field );
191 QString startExpression()
const;
202 void setStartExpression(
const QString &expression );
213 QString endExpression()
const;
224 void setEndExpression(
const QString &endExpression );
238 QString durationField()
const;
252 void setDurationField(
const QString &field );
279 double fixedDuration()
const;
292 void setFixedDuration(
double duration );
303 bool accumulateFeatures()
const;
314 void setAccumulateFeatures(
bool accumulate );
334 void guessDefaultsFromFields(
const QgsFields &fields );
343 TemporalMode mMode = ModeFixedTemporalRange;
346 QgsDateTimeRange mFixedRange;
348 QString mStartFieldName;
349 QString mEndFieldName;
350 QString mDurationFieldName;
353 double mFixedDuration = 0;
355 bool mAccumulateFeatures =
false;
357 QString mStartExpression;
358 QString mEndExpression;
362 #endif // QGSVECTORLAYERTEMPORALPROPERTIES_H
virtual QgsTemporalProperty::Flags flags() const
Returns flags associated to the temporal property.
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...
@ ModeFeatureDateTimeStartAndEndFromExpressions
Mode when features use expressions for start and end times.
TemporalUnit
Temporal units.
@ ModeFeatureDateTimeStartAndEndFromFields
Mode when features have separate fields for start and end times.
virtual bool readXml(const QDomElement &element, const QgsReadWriteContext &context)=0
Reads temporal properties from a DOM element previously written by writeXml().
@ ModeFeatureDateTimeInstantFromField
Mode when features have a datetime instant taken from a single field.
virtual bool isVisibleInTemporalRange(const QgsDateTimeRange &range) const
Returns true if the layer should be visible and rendered for the specified time range.
@ ModeFeatureDateTimeStartAndDurationFromFields
Mode when features have a field for start time and a field for event duration.
@ TemporalMinutes
Minutes.
@ ModeRedrawLayerOnly
Redraw the layer when temporal range changes, but don't apply any filtering. Useful when symbology or...
virtual void setDefaultsFromDataProviderTemporalCapabilities(const QgsDataProviderTemporalCapabilities *capabilities)=0
Sets the layers temporal settings to appropriate defaults based on a provider's temporal capabilities...
TemporalMode
Mode of the vector temporal properties.