mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			231 lines
		
	
	
		
			5.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			231 lines
		
	
	
		
			5.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/core/qgstemporalnavigationobject.h                               *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | 
						|
 ************************************************************************/
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
class QgsTemporalNavigationObject : QgsTemporalController
 | 
						|
{
 | 
						|
%Docstring
 | 
						|
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
 | 
						|
 | 
						|
    enum AnimationState
 | 
						|
    {
 | 
						|
      Forward,
 | 
						|
      Reverse,
 | 
						|
      Idle,
 | 
						|
    };
 | 
						|
 | 
						|
    void setAnimationState( AnimationState state );
 | 
						|
%Docstring
 | 
						|
Sets the current animation ``state``.
 | 
						|
 | 
						|
.. seealso:: :py:func:`animationState`
 | 
						|
%End
 | 
						|
 | 
						|
    AnimationState animationState() const;
 | 
						|
%Docstring
 | 
						|
Returns the current animation state.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setAnimationState`
 | 
						|
%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 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 setCurrentFrameNumber( long long frame );
 | 
						|
%Docstring
 | 
						|
Sets the current animation ``frame`` number.
 | 
						|
 | 
						|
Caling this method will change the controllers current datetime range to match, based on the
 | 
						|
temporalExtents() and frameDuration() values.
 | 
						|
 | 
						|
.. seealso:: :py:func:`currentFrameNumber`
 | 
						|
%End
 | 
						|
 | 
						|
    long long currentFrameNumber() const;
 | 
						|
%Docstring
 | 
						|
Returns the current frame number.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setCurrentFrameNumber`
 | 
						|
%End
 | 
						|
 | 
						|
    void setFrameDuration( QgsInterval duration );
 | 
						|
%Docstring
 | 
						|
Sets the frame ``duration``, which dictates the temporal length of each frame in the animation.
 | 
						|
 | 
						|
.. note::
 | 
						|
 | 
						|
   Calling this will reset the currentFrameNumber() to the first frame.
 | 
						|
 | 
						|
.. 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 temporalExtents()),
 | 
						|
the specified ``frame`` number, and the frame duration (see 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
 | 
						|
 | 
						|
    long long totalFrameCount();
 | 
						|
%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
 | 
						|
 | 
						|
  signals:
 | 
						|
 | 
						|
    void stateChanged( AnimationState state );
 | 
						|
%Docstring
 | 
						|
Emitted whenever the animation ``state`` changes.
 | 
						|
%End
 | 
						|
 | 
						|
  public slots:
 | 
						|
 | 
						|
    void play();
 | 
						|
%Docstring
 | 
						|
Starts playing the temporal navigation from its current frame,
 | 
						|
using the direction specified by 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.pl again   *
 | 
						|
 ************************************************************************/
 |