QGIS API Documentation
3.24.2-Tisler (13c1a02865)
src
core
project
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
25
class
QDomElement;
26
class
QgsReadWriteContext
;
27
class
QDomDocument;
28
36
class
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
166
void
temporalRangeChanged
();
167
168
private
:
169
170
QgsDateTimeRange mRange;
171
QgsUnitTypes::TemporalUnit
mTimeStepUnit =
QgsUnitTypes::TemporalHours
;
172
double
mTimeStep = 1;
173
double
mFrameRate = 1;
174
bool
mCumulativeTemporalRange =
false
;
175
};
176
177
178
#endif
// QGSPROJECTTIMESETTINGS_H
QgsProjectTimeSettings
Contains temporal settings and properties for the project, this may be used when animating maps or sh...
Definition:
qgsprojecttimesettings.h:37
QgsProjectTimeSettings::temporalRangeChanged
void temporalRangeChanged()
Emitted when the temporal range changes.
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition:
qgsreadwritecontext.h:35
QgsUnitTypes::TemporalUnit
TemporalUnit
Temporal units.
Definition:
qgsunittypes.h:150
QgsUnitTypes::TemporalHours
@ TemporalHours
Hours.
Definition:
qgsunittypes.h:154
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition:
qgis_sip.h:53
qgsrange.h
qgsunittypes.h
Generated on Fri Apr 29 2022 19:08:16 for QGIS API Documentation by
1.9.1