QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
qgstemporalutils.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgstemporalutils.h
3  ------------------
4  Date : March 2020
5  Copyright : (C) 2020 by Nyall Dawson
6  Email : nyall dot dawson at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGSTEMPORALUTILS_H
17 #define QGSTEMPORALUTILS_H
18 
19 #include "qgis_core.h"
20 #include "qgsrange.h"
21 #include "qgsinterval.h"
22 
23 class QgsProject;
24 class QgsMapSettings;
25 class QgsFeedback;
26 class QgsMapDecoration;
27 
36 class CORE_EXPORT QgsTemporalUtils
37 {
38  public:
39 
46  static QgsDateTimeRange calculateTemporalRangeForProject( QgsProject *project );
47 
50  {
52  QgsDateTimeRange animationRange;
53 
56 
58  QString outputDirectory;
59 
68 
70  QList<QgsMapDecoration *> decorations;
71 
72  };
73 
91  static bool exportAnimation( const QgsMapSettings &mapSettings, const AnimationExportSettings &settings, QString &error SIP_OUT, QgsFeedback *feedback = nullptr );
92 };
93 
94 
95 #endif // QGSTEMPORALUTILS_H
QgsTemporalUtils::AnimationExportSettings
Contains settings relating to exporting animations.
Definition: qgstemporalutils.h:50
qgsinterval.h
SIP_OUT
#define SIP_OUT
Definition: qgis_sip.h:58
QgsTemporalUtils::AnimationExportSettings::animationRange
QgsDateTimeRange animationRange
Dictates the overall temporal range of the animation.
Definition: qgstemporalutils.h:52
qgsrange.h
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition: qgsproject.h:95
QgsTemporalUtils::AnimationExportSettings::outputDirectory
QString outputDirectory
Destination directory for created image files.
Definition: qgstemporalutils.h:58
QgsFeedback
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition: qgsfeedback.h:44
QgsTemporalUtils::AnimationExportSettings::fileNameTemplate
QString fileNameTemplate
The filename template for exporting the frames.
Definition: qgstemporalutils.h:67
QgsTemporalUtils
Contains utility methods for working with temporal layers and projects.
Definition: qgstemporalutils.h:37
QgsTemporalUtils::AnimationExportSettings::frameDuration
QgsInterval frameDuration
Duration of individual export frames.
Definition: qgstemporalutils.h:55
QgsInterval
A representation of the interval between two datetime values.
Definition: qgsinterval.h:41
QgsMapDecoration
Interface for map decorations.
Definition: qgsmapdecoration.h:33
QgsMapSettings
The QgsMapSettings class contains configuration for rendering of the map.
Definition: qgsmapsettings.h:88
QgsTemporalUtils::AnimationExportSettings::decorations
QList< QgsMapDecoration * > decorations
List of decorations to draw onto exported frames.
Definition: qgstemporalutils.h:70