mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-24 00:47:57 -05:00
344 lines
9.6 KiB
Plaintext
344 lines
9.6 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/qgstemporalnavigationobject.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsTemporalNavigationObject : QgsTemporalController, QgsExpressionContextScopeGenerator
|
|
{
|
|
%Docstring(signature="appended")
|
|
Implements a temporal controller based on a frame by frame navigation and animation.
|
|
|
|
.. versionadded:: 3.14
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgstemporalnavigationobject.h"
|
|
%End
|
|
public:
|
|
|
|
QgsTemporalNavigationObject( QObject *parent /TransferThis/ = 0 );
|
|
%Docstring
|
|
Constructor for QgsTemporalNavigationObject, with the specified ``parent`` object.
|
|
%End
|
|
|
|
void setAnimationState( Qgis::AnimationState state );
|
|
%Docstring
|
|
Sets the current animation ``state``.
|
|
|
|
.. seealso:: :py:func:`animationState`
|
|
%End
|
|
|
|
Qgis::AnimationState animationState() const;
|
|
%Docstring
|
|
Returns the current animation state.
|
|
|
|
.. seealso:: :py:func:`setAnimationState`
|
|
%End
|
|
|
|
void setNavigationMode( const Qgis::TemporalNavigationMode mode );
|
|
%Docstring
|
|
Sets the temporal navigation ``mode``.
|
|
|
|
.. seealso:: :py:func:`navigationMode`
|
|
%End
|
|
|
|
Qgis::TemporalNavigationMode navigationMode() const;
|
|
%Docstring
|
|
Returns the current temporal navigation mode.
|
|
|
|
.. seealso:: :py:func:`setNavigationMode`
|
|
%End
|
|
|
|
void setTemporalExtents( const QgsDateTimeRange &extents );
|
|
%Docstring
|
|
Sets the navigation temporal ``extents``, which dictate the earliest
|
|
and latest date time possible in the animation.
|
|
|
|
.. note::
|
|
|
|
Calling this will reset the :py:func:`~QgsTemporalNavigationObject.currentFrameNumber` to the first frame.
|
|
|
|
.. seealso:: :py:func:`temporalExtents`
|
|
%End
|
|
|
|
QgsDateTimeRange temporalExtents() const;
|
|
%Docstring
|
|
Returns the navigation temporal extents, which dictate the earliest
|
|
and latest date time possible in the animation.
|
|
|
|
.. seealso:: :py:func:`setTemporalExtents`
|
|
%End
|
|
|
|
void setAvailableTemporalRanges( const QList< QgsDateTimeRange > &ranges );
|
|
%Docstring
|
|
Sets the list of all available temporal ``ranges`` which have data available.
|
|
|
|
The ``ranges`` list can be a list of non-contiguous ranges (i.e. containing gaps)
|
|
which together describe the complete range of times which contain data.
|
|
|
|
.. seealso:: :py:func:`availableTemporalRanges`
|
|
|
|
.. versionadded:: 3.20
|
|
%End
|
|
|
|
QList< QgsDateTimeRange > availableTemporalRanges() const;
|
|
%Docstring
|
|
Returns the list of all available temporal ranges which have data available.
|
|
|
|
The ranges list can be a list of non-contiguous ranges (i.e. containing gaps)
|
|
which together describe the complete range of times which contain data.
|
|
|
|
.. seealso:: :py:func:`setAvailableTemporalRanges`
|
|
|
|
.. versionadded:: 3.20
|
|
%End
|
|
|
|
void setCurrentFrameNumber( long long frame );
|
|
%Docstring
|
|
Sets the current animation ``frame`` number.
|
|
|
|
Calling this method will change the controllers current datetime range to match,
|
|
based on the :py:func:`~QgsTemporalNavigationObject.temporalExtents` and :py:func:`~QgsTemporalNavigationObject.frameDuration` values.
|
|
|
|
.. seealso:: :py:func:`currentFrameNumber`
|
|
%End
|
|
|
|
long long currentFrameNumber() const;
|
|
%Docstring
|
|
Returns the current frame number.
|
|
|
|
.. seealso:: :py:func:`setCurrentFrameNumber`
|
|
%End
|
|
|
|
void setFrameDuration( const QgsInterval &duration );
|
|
%Docstring
|
|
Sets the frame ``duration``, which dictates the temporal length of each frame in the animation.
|
|
|
|
.. note::
|
|
|
|
Calling this will reset the :py:func:`~QgsTemporalNavigationObject.currentFrameNumber` to the closest temporal match for the previous temporal range.
|
|
|
|
.. seealso:: :py:func:`frameDuration`
|
|
%End
|
|
|
|
QgsInterval frameDuration() const;
|
|
%Docstring
|
|
Returns the current set frame duration, which dictates the temporal length of each frame in the animation.
|
|
|
|
.. seealso:: :py:func:`setFrameDuration`
|
|
%End
|
|
|
|
QgsDateTimeRange dateTimeRangeForFrameNumber( long long frame ) const;
|
|
%Docstring
|
|
Calculates the temporal range associated with a particular animation ``frame``.
|
|
|
|
This is calculated from the navigation start time (taken from :py:func:`~QgsTemporalNavigationObject.temporalExtents`),
|
|
the specified ``frame`` number, and the frame duration (see :py:func:`~QgsTemporalNavigationObject.frameDuration`).
|
|
%End
|
|
|
|
void setFramesPerSecond( double rate );
|
|
%Docstring
|
|
Sets the animation frame ``rate``, in frames per second.
|
|
|
|
This setting controls the overall playback speed of the animation, i.e. how quickly
|
|
a playing animation will advance to the next frame.
|
|
|
|
.. seealso:: :py:func:`framesPerSecond`
|
|
%End
|
|
|
|
double framesPerSecond() const;
|
|
%Docstring
|
|
Returns the animation frame rate, in frames per second.
|
|
|
|
This setting controls the overall playback speed of the animation, i.e. how quickly
|
|
a playing animation will advance to the next frame.
|
|
|
|
.. seealso:: :py:func:`setFramesPerSecond`
|
|
%End
|
|
|
|
void setTemporalRangeCumulative( bool state );
|
|
%Docstring
|
|
Sets the animation temporal range as cumulative.
|
|
|
|
.. seealso:: :py:func:`temporalRangeCumulative`
|
|
%End
|
|
|
|
bool temporalRangeCumulative() const;
|
|
%Docstring
|
|
Returns the animation temporal range cumulative settings.
|
|
|
|
.. seealso:: :py:func:`setTemporalRangeCumulative`
|
|
%End
|
|
|
|
long long totalFrameCount() const;
|
|
%Docstring
|
|
Returns the total number of frames for the navigation.
|
|
%End
|
|
|
|
bool isLooping() const;
|
|
%Docstring
|
|
Returns ``True`` if the animation should loop after hitting the end or start frame.
|
|
|
|
.. seealso:: :py:func:`setLooping`
|
|
%End
|
|
|
|
void setLooping( bool loop );
|
|
%Docstring
|
|
Sets whether the animation should ``loop`` after hitting the end or start frame.
|
|
|
|
.. seealso:: :py:func:`isLooping`
|
|
%End
|
|
|
|
long long findBestFrameNumberForFrameStart( const QDateTime &frameStart ) const;
|
|
%Docstring
|
|
Returns the best suited frame number for the specified datetime, based on the start of the corresponding temporal range.
|
|
%End
|
|
|
|
virtual QgsExpressionContextScope *createExpressionContextScope() const /Factory/;
|
|
|
|
|
|
long long totalMovieFrames() const;
|
|
%Docstring
|
|
Returns the total number of frames for the movie.
|
|
|
|
.. note::
|
|
|
|
This is only used when the :py:func:`~QgsTemporalNavigationObject.navigationMode` is set to :py:class:`Qgis`.TemporalNavigationMode.Movie.
|
|
|
|
.. seealso:: :py:func:`setTotalMovieFrames`
|
|
|
|
.. seealso:: :py:func:`totalMovieFramesChanged`
|
|
|
|
.. versionadded:: 3.36
|
|
%End
|
|
|
|
void setTotalMovieFrames( long long frames );
|
|
%Docstring
|
|
Sets the total number of ``frames`` for the movie.
|
|
|
|
.. note::
|
|
|
|
This is only used when the :py:func:`~QgsTemporalNavigationObject.navigationMode` is set to :py:class:`Qgis`.TemporalNavigationMode.Movie.
|
|
|
|
.. seealso:: :py:func:`totalMovieFrames`
|
|
|
|
.. seealso:: :py:func:`totalMovieFramesChanged`
|
|
|
|
.. versionadded:: 3.36
|
|
%End
|
|
|
|
signals:
|
|
|
|
void stateChanged( Qgis::AnimationState state );
|
|
%Docstring
|
|
Emitted whenever the animation ``state`` changes.
|
|
%End
|
|
|
|
void navigationModeChanged( Qgis::TemporalNavigationMode mode );
|
|
%Docstring
|
|
Emitted whenever the navigation ``mode`` changes.
|
|
%End
|
|
|
|
void temporalExtentsChanged( const QgsDateTimeRange &extent );
|
|
%Docstring
|
|
Emitted whenever the temporalExtent ``extent`` changes.
|
|
%End
|
|
|
|
void temporalFrameDurationChanged( const QgsInterval &interval );
|
|
%Docstring
|
|
Emitted whenever the frameDuration ``interval`` of the controller changes.
|
|
%End
|
|
|
|
void totalMovieFramesChanged( long long frames );
|
|
%Docstring
|
|
Emitted whenever the total number of ``frames`` in the movie is changed.
|
|
|
|
.. note::
|
|
|
|
This is only used when the :py:func:`~QgsTemporalNavigationObject.navigationMode` is set to :py:class:`Qgis`.TemporalNavigationMode.Movie.
|
|
|
|
.. seealso:: :py:func:`setTotalMovieFrames`
|
|
|
|
.. seealso:: :py:func:`totalMovieFrames`
|
|
|
|
.. versionadded:: 3.36
|
|
%End
|
|
|
|
public slots:
|
|
|
|
void play();
|
|
%Docstring
|
|
Starts playing the temporal navigation from its current frame,
|
|
using the direction specified by :py:func:`~QgsTemporalNavigationObject.animationState`
|
|
%End
|
|
|
|
void pause();
|
|
%Docstring
|
|
Pauses the temporal navigation.
|
|
|
|
Calling this slot changes the animation state to idle, preventing
|
|
automatic advancement of frames.
|
|
|
|
It does not affect the current animation frame number or the current
|
|
temporal range of the controller.
|
|
%End
|
|
|
|
void playForward();
|
|
%Docstring
|
|
Starts the animation playing in a forward direction up till the end of all frames.
|
|
%End
|
|
|
|
void playBackward();
|
|
%Docstring
|
|
Starts the animation playing in a reverse direction until the beginning of the time range.
|
|
%End
|
|
|
|
void next();
|
|
%Docstring
|
|
Advances to the next frame.
|
|
|
|
.. note::
|
|
|
|
Calling this slot does not change the current animation state, i.e. a paused animation
|
|
will remain paused.
|
|
%End
|
|
|
|
void previous();
|
|
%Docstring
|
|
Jumps back to the previous frame.
|
|
|
|
.. note::
|
|
|
|
Calling this slot does not change the current animation state, i.e. a paused animation
|
|
will remain paused.
|
|
%End
|
|
|
|
void rewindToStart();
|
|
%Docstring
|
|
Rewinds the temporal navigation to start of the temporal extent.
|
|
%End
|
|
|
|
void skipToEnd();
|
|
%Docstring
|
|
Skips the temporal navigation to end of the temporal extent.
|
|
%End
|
|
|
|
};
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/qgstemporalnavigationobject.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|