QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgstemporalrangeobject.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgstemporalrangeobject.cpp
3  ---------------
4  begin : January 2020
5  copyright : (C) 2020 by Samweli Mwakisambwe
6  email : samweli at kartoza dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #include "qgstemporalrangeobject.h"
19 
21  : mTemporal( enabled )
22 {
23 }
24 
26 {
27  mTemporal = enabled;
28 }
29 
31 {
32  return mTemporal;
33 }
34 
35 void QgsTemporalRangeObject::setTemporalRange( const QgsDateTimeRange &dateTimeRange )
36 {
37  if ( !isTemporal() )
38  setIsTemporal( true );
39 
40  mDateTimeRange = dateTimeRange;
41 }
42 
43 const QgsDateTimeRange &QgsTemporalRangeObject::temporalRange() const
44 {
45  return mDateTimeRange;
46 }
47 
qgstemporalrangeobject.h
QgsTemporalRangeObject::isTemporal
bool isTemporal() const
Returns true if the object's temporal range is enabled, and the object will be filtered when renderin...
Definition: qgstemporalrangeobject.cpp:30
QgsTemporalRangeObject::QgsTemporalRangeObject
QgsTemporalRangeObject(bool enabled=false)
Constructor QgsTemporalRangeObject.
Definition: qgstemporalrangeobject.cpp:20
QgsTemporalRangeObject::setIsTemporal
void setIsTemporal(bool enabled)
Sets whether the temporal range is enabled (i.e.
Definition: qgstemporalrangeobject.cpp:25
QgsTemporalRangeObject::temporalRange
const QgsDateTimeRange & temporalRange() const
Returns the datetime range for the object.
Definition: qgstemporalrangeobject.cpp:43
QgsTemporalRangeObject::setTemporalRange
void setTemporalRange(const QgsDateTimeRange &range)
Sets the temporal range for the object.
Definition: qgstemporalrangeobject.cpp:35