19#ifndef QGSTEMPORALNAVIGATIONOBJECT_H
20#define QGSTEMPORALNAVIGATIONOBJECT_H
104 void setAvailableTemporalRanges(
const QList< QgsDateTimeRange > &ranges );
115 QList< QgsDateTimeRange > availableTemporalRanges()
const;
125 void setCurrentFrameNumber(
long long frame );
132 long long currentFrameNumber()
const;
141 void setFrameDuration(
const QgsInterval &duration );
166 void setFramesPerSecond(
double rate );
176 double framesPerSecond()
const;
183 void setTemporalRangeCumulative(
bool state );
190 bool temporalRangeCumulative()
const;
195 long long totalFrameCount()
const;
202 bool isLooping()
const;
209 void setLooping(
bool loop );
214 long long findBestFrameNumberForFrameStart(
const QDateTime &frameStart )
const;
228 long long totalMovieFrames() const;
240 void setTotalMovieFrames(
long long frames );
343 Qgis::TemporalNavigationMode mNavigationMode =
Qgis::TemporalNavigationMode::Disabled;
346 long long mCurrentFrameNumber = 0;
352 double mFramesPerSecond = 1;
355 QTimer *mNewFrameTimer =
nullptr;
358 Qgis::AnimationState mPlayBackMode =
Qgis::AnimationState::Idle;
360 bool mLoopAnimation = false;
362 bool mCumulativeTemporalRange = false;
364 int mBlockUpdateTemporalRangeSignal = 0;
367 long long mTotalMovieFrames = 100;
Provides global constants and enumerations for use throughout the application.
TemporalNavigationMode
Temporal navigation modes.
AnimationState
Animation states.
Abstract interface for generating an expression context scope.
virtual QgsExpressionContextScope * createExpressionContextScope() const =0
This method needs to be reimplemented in all classes which implement this interface and return an exp...
Single scope for storing variables and functions for use within a QgsExpressionContext.
A representation of the interval between two datetime values.
Base class for all map layer types.
QgsTemporalController(QObject *parent=nullptr)
Constructor for QgsTemporalController, with the specified parent object.
void stateChanged(Qgis::AnimationState state)
Emitted whenever the animation state changes.
void previous()
Jumps back to the previous frame.
void navigationModeChanged(Qgis::TemporalNavigationMode mode)
Emitted whenever the navigation mode changes.
void setNavigationMode(const Qgis::TemporalNavigationMode mode)
Sets the temporal navigation mode.
void playForward()
Starts the animation playing in a forward direction up till the end of all frames.
void rewindToStart()
Rewinds the temporal navigation to start of the temporal extent.
void pause()
Pauses the temporal navigation.
Qgis::AnimationState animationState() const
Returns the current animation state.
void skipToEnd()
Skips the temporal navigation to end of the temporal extent.
void temporalFrameDurationChanged(const QgsInterval &interval)
Emitted whenever the frameDuration interval of the controller changes.
void next()
Advances to the next frame.
void totalMovieFramesChanged(long long frames)
Emitted whenever the total number of frames in the movie is changed.
Qgis::TemporalNavigationMode navigationMode() const
Returns the current temporal navigation mode.
void play()
Starts playing the temporal navigation from its current frame, using the direction specified by anima...
void playBackward()
Starts the animation playing in a reverse direction until the beginning of the time range.
void temporalExtentsChanged(const QgsDateTimeRange &extent)
Emitted whenever the temporalExtent extent changes.
QgsTemporalNavigationObject(QObject *parent=nullptr)
Constructor for QgsTemporalNavigationObject, with the specified parent object.
void setAnimationState(Qgis::AnimationState state)
Sets the current animation state.
QgsTemporalRange< QDateTime > QgsDateTimeRange
QgsRange which stores a range of date times.