QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgstemporalrangeobject.h
Go to the documentation of this file.
1/***************************************************************************
2 qgstemporalrangeobject.h
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
19#ifndef QGSTEMPORALRANGEOBJECT_H
20#define QGSTEMPORALRANGEOBJECT_H
21
22#include "qgis_core.h"
23#include "qgis_sip.h"
24#include "qgsrange.h"
25
33class CORE_EXPORT QgsTemporalRangeObject
34{
35 public:
36
42 QgsTemporalRangeObject( bool enabled = false );
43
44 virtual ~QgsTemporalRangeObject() = default;
45
52 void setIsTemporal( bool enabled );
53
61 bool isTemporal() const;
62
73 void setTemporalRange( const QgsDateTimeRange &range );
74
82 const QgsDateTimeRange &temporalRange() const;
83
84 private:
85
87 bool mTemporal = false;
88
90 QgsDateTimeRange mDateTimeRange;
91
92};
93
94#endif // QGSTEMPORALRANGEOBJECT_H
const QgsDateTimeRange & temporalRange() const
Returns the datetime range for the object.
QgsTemporalRangeObject(bool enabled=false)
Constructor QgsTemporalRangeObject.
bool isTemporal() const
Returns true if the object's temporal range is enabled, and the object will be filtered when renderin...
void setIsTemporal(bool enabled)
Sets whether the temporal range is enabled (i.e.
virtual ~QgsTemporalRangeObject()=default
void setTemporalRange(const QgsDateTimeRange &range)
Sets the temporal range for the object.
QgsTemporalRange< QDateTime > QgsDateTimeRange
QgsRange which stores a range of date times.
Definition qgsrange.h:761