QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
qgstemporalcontrollerwidget.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgstemporalcontrollerwidget.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
18
#ifndef QGSTEMPORALCONTROLLERWIDGET_H
19
#define QGSTEMPORALCONTROLLERWIDGET_H
20
21
#include "ui_qgstemporalcontrollerwidgetbase.h"
22
23
#include "qgis_gui.h"
24
#include "
qgsrange.h
"
25
#include "
qgstemporalnavigationobject.h
"
26
27
class
QgsMapLayer
;
28
class
QgsMapLayerModel
;
29
class
QgsTemporalNavigationObject
;
30
class
QgsTemporalController
;
31
class
QgsInterval
;
32
39
class
GUI_EXPORT
QgsTemporalControllerWidget
:
public
QgsPanelWidget
,
private
Ui::QgsTemporalControllerWidgetBase
40
{
41
Q_OBJECT
42
public
:
46
QgsTemporalControllerWidget
( QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
);
47
53
QgsTemporalNavigationObject
*
temporalController
();
54
55
bool
applySizeConstraintsToStack
()
const override
;
56
57
#ifndef SIP_RUN
58
59
signals:
60
64
void
exportAnimation
();
65
66
#endif
67
68
protected
:
69
void
keyPressEvent
( QKeyEvent *e )
override
;
70
71
private
:
73
QgsTemporalNavigationObject
*mNavigationObject =
nullptr
;
74
75
int
mBlockSettingUpdates = 0;
76
int
mBlockFrameDurationUpdates = 0;
77
78
bool
mHasTemporalLayersLoaded =
false
;
79
80
std::unique_ptr<QMenu> mRangeMenu;
81
QAction *mRangeSetToProjectAction =
nullptr
;
82
QAction *mRangeSetToAllLayersAction =
nullptr
;
83
84
std::unique_ptr<QMenu> mRangeLayersSubMenu;
85
QgsMapLayerModel
*mMapLayerModel =
nullptr
;
86
87
void
firstTemporalLayerLoaded(
QgsMapLayer
*layer );
88
void
setTimeStep(
const
QgsInterval
&timeStep );
89
105
void
updateTimeStepInputs(
const
QgsInterval
&timeStep );
106
107
private
slots:
108
113
void
timeSlider_valueChanged(
int
value );
114
118
void
settings_clicked();
119
123
void
setDates(
const
QgsDateTimeRange
&range );
124
128
void
setDatesToAllLayers();
129
135
void
setDatesToProjectTime(
bool
tryLastStoredRange );
136
140
void
updateSlider(
const
QgsDateTimeRange
&range );
141
142
void
totalMovieFramesChanged(
long
long
frames );
143
147
void
updateRangeLabel(
const
QgsDateTimeRange
&range );
148
152
void
updateTemporalExtent();
153
157
void
updateFrameDuration();
158
159
void
setWidgetStateFromProject();
160
161
void
mNavigationOff_clicked();
162
void
mNavigationFixedRange_clicked();
163
void
mNavigationAnimated_clicked();
164
void
mNavigationMovie_clicked();
165
void
setWidgetStateFromNavigationMode(
Qgis::TemporalNavigationMode
mode );
166
167
void
onLayersAdded(
const
QList<QgsMapLayer *> &layers );
168
void
onProjectCleared();
169
170
void
startEndDateTime_changed();
171
void
fixedRangeStartEndDateTime_changed();
172
173
void
saveRangeToProject();
174
175
void
aboutToShowRangeMenu();
176
177
void
mRangeSetToProjectAction_triggered();
178
void
mRangeSetToAllLayersAction_triggered();
179
};
180
181
#endif
// QGSTEMPORALCONTROLLERWIDGET_H
Qgis::TemporalNavigationMode
TemporalNavigationMode
Temporal navigation modes.
Definition
qgis.h:2741
QgsInterval
A representation of the interval between two datetime values.
Definition
qgsinterval.h:52
QgsMapLayerModel
A model for display of map layers in widgets.
Definition
qgsmaplayermodel.h:37
QgsMapLayer
Base class for all map layer types.
Definition
qgsmaplayer.h:83
QgsPanelWidget::applySizeConstraintsToStack
virtual bool applySizeConstraintsToStack() const
Returns true if the size constraints and hints for the panel widget should be applied to the parent Q...
Definition
qgspanelwidget.cpp:79
QgsPanelWidget::QgsPanelWidget
QgsPanelWidget(QWidget *parent=nullptr)
Base class for any widget that can be shown as an inline panel.
Definition
qgspanelwidget.cpp:30
QgsPanelWidget::keyPressEvent
void keyPressEvent(QKeyEvent *event) override
Overridden key press event to handle the esc event on the widget.
Definition
qgspanelwidget.cpp:147
QgsTemporalControllerWidget::exportAnimation
void exportAnimation()
Triggered when an animation should be exported.
QgsTemporalControllerWidget::temporalController
QgsTemporalNavigationObject * temporalController()
Returns the temporal controller object used by this object in navigation.
Definition
qgstemporalcontrollerwidget.cpp:523
QgsTemporalControllerWidget::QgsTemporalControllerWidget
QgsTemporalControllerWidget(QWidget *parent=nullptr)
Constructor for QgsTemporalControllerWidget, with the specified parent widget.
Definition
qgstemporalcontrollerwidget.cpp:42
QgsTemporalController
A controller base class for temporal objects, contains a signal for notifying updates of the objects ...
Definition
qgstemporalcontroller.h:44
QgsTemporalNavigationObject
Implements a temporal controller based on a frame by frame navigation and animation.
Definition
qgstemporalnavigationobject.h:40
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
qgsrange.h
QgsDateTimeRange
QgsTemporalRange< QDateTime > QgsDateTimeRange
QgsRange which stores a range of date times.
Definition
qgsrange.h:764
qgstemporalnavigationobject.h
Generated on
for QGIS API Documentation by
1.17.0