QGIS API Documentation  3.21.0-Master (5b68dc587e)
Public Member Functions | List of all members
QgsTemporalRangeObject Class Reference

Base class for objects with an associated (optional) temporal range. More...

#include <qgstemporalrangeobject.h>

Inheritance diagram for QgsTemporalRangeObject:
Inheritance graph
[legend]

Public Member Functions

 QgsTemporalRangeObject (bool enabled=false)
 Constructor QgsTemporalRangeObject. More...
 
virtual ~QgsTemporalRangeObject ()=default
 
bool isTemporal () const
 Returns true if the object's temporal range is enabled, and the object will be filtered when rendering maps with a specific time range set. More...
 
void setIsTemporal (bool enabled)
 Sets whether the temporal range is enabled (i.e. More...
 
void setTemporalRange (const QgsDateTimeRange &range)
 Sets the temporal range for the object. More...
 
const QgsDateTimeRange & temporalRange () const
 Returns the datetime range for the object. More...
 

Detailed Description

Base class for objects with an associated (optional) temporal range.

Since
QGIS 3.14

Definition at line 33 of file qgstemporalrangeobject.h.

Constructor & Destructor Documentation

◆ QgsTemporalRangeObject()

QgsTemporalRangeObject::QgsTemporalRangeObject ( bool  enabled = false)

Constructor QgsTemporalRangeObject.

The enabled argument specifies whether the temporal range is initially enabled or not (see isTemporal()).

Definition at line 20 of file qgstemporalrangeobject.cpp.

◆ ~QgsTemporalRangeObject()

virtual QgsTemporalRangeObject::~QgsTemporalRangeObject ( )
virtualdefault

Member Function Documentation

◆ isTemporal()

bool QgsTemporalRangeObject::isTemporal ( ) const

Returns true if the object's temporal range is enabled, and the object will be filtered when rendering maps with a specific time range set.

For map settings, if false is returned, then any other temporal settings relating to the map will be ignored during rendering.

See also
setIsTemporal()

Definition at line 30 of file qgstemporalrangeobject.cpp.

◆ setIsTemporal()

void QgsTemporalRangeObject::setIsTemporal ( bool  enabled)

Sets whether the temporal range is enabled (i.e.

whether the object has a temporal range which will be considered when rendering maps with a specific time range set.)

See also
isTemporal()

Definition at line 25 of file qgstemporalrangeobject.cpp.

◆ setTemporalRange()

void QgsTemporalRangeObject::setTemporalRange ( const QgsDateTimeRange &  range)

Sets the temporal range for the object.

Calling setTemporalRange() automatically enables temporal properties on the object (see isTemporal()), regardless of its existing state.

When a temporal range is set it can be used to filter and request time base objects.

See also
temporalRange()

Definition at line 35 of file qgstemporalrangeobject.cpp.

◆ temporalRange()

const QgsDateTimeRange & QgsTemporalRangeObject::temporalRange ( ) const

Returns the datetime range for the object.

This should only be considered when isTemporal() returns true.

See also
setTemporalRange()

Definition at line 43 of file qgstemporalrangeobject.cpp.


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