QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
qgsprojecttimesettings.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsprojecttimesettings.h
3 ---------------
4 begin : February 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#ifndef QGSPROJECTTIMESETTINGS_H
18#define QGSPROJECTTIMESETTINGS_H
19
20#include "qgis_core.h"
21#include "qgsrange.h"
22#include "qgsunittypes.h"
23#include <QObject>
24
25class QDomElement;
27class QDomDocument;
28
36class CORE_EXPORT QgsProjectTimeSettings : public QObject
37{
38 Q_OBJECT
39
40 public:
41
45 QgsProjectTimeSettings( QObject *parent SIP_TRANSFERTHIS = nullptr );
46
50 void reset();
51
63 QgsDateTimeRange temporalRange() const;
64
76 void setTemporalRange( const QgsDateTimeRange &range );
77
82 bool readXml( const QDomElement &element, const QgsReadWriteContext &context );
83
88 QDomElement writeXml( QDomDocument &document, const QgsReadWriteContext &context ) const;
89
97 QgsUnitTypes::TemporalUnit timeStepUnit() const;
98
106 void setTimeStepUnit( QgsUnitTypes::TemporalUnit unit );
107
117 double timeStep() const;
118
128 void setTimeStep( double step );
129
135 void setFramesPerSecond( double rate );
136
142 double framesPerSecond() const;
143
149 void setIsTemporalRangeCumulative( bool state );
150
156 bool isTemporalRangeCumulative() const;
157
158 signals:
159
167
168 private:
169
170 QgsDateTimeRange mRange;
172 double mTimeStep = 1;
173 double mFrameRate = 1;
174 bool mCumulativeTemporalRange = false;
175};
176
177
178#endif // QGSPROJECTTIMESETTINGS_H
Contains temporal settings and properties for the project, this may be used when animating maps or sh...
void temporalRangeChanged()
Emitted when the temporal range changes.
The class is used as a container of context for various read/write operations on other objects.
TemporalUnit
Temporal units.
Definition: qgsunittypes.h:150
@ TemporalHours
Hours.
Definition: qgsunittypes.h:154
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:53