QGIS API Documentation
3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
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 "
qgis.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
Qgis::TemporalUnit
timeStepUnit()
const
;
98
106
void
setTimeStepUnit(
Qgis::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
167
long
long
totalMovieFrames()
const
;
168
178
void
setTotalMovieFrames(
long
long
frames );
179
180
signals:
181
188
void
temporalRangeChanged
();
189
190
private
:
191
192
QgsDateTimeRange
mRange;
193
Qgis::TemporalUnit
mTimeStepUnit =
Qgis::TemporalUnit::Hours
;
194
double
mTimeStep = 1;
195
double
mFrameRate = 1;
196
bool
mCumulativeTemporalRange =
false
;
197
long
long
mTotalMovieFrames = 100;
198
};
199
200
201
#endif
// QGSPROJECTTIMESETTINGS_H
Qgis::TemporalUnit
TemporalUnit
Temporal units.
Definition
qgis.h:4823
Qgis::TemporalUnit::Hours
@ Hours
Hours.
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:34
QgsTemporalRange< QDateTime >
qgis.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:53
qgsrange.h
Generated on Tue Nov 19 2024 18:20:01 for QGIS API Documentation by
1.9.8