Skip to content
Permalink
Browse files

Emit signals when animation state changes

  • Loading branch information
nyalldawson committed Mar 12, 2020
1 parent 1e4c252 commit fb13b0f0dc15d0ad643943408e46c4017c0e635a
@@ -137,6 +137,13 @@ a playing animation will advance to the next frame.
long long totalFrameCount();
%Docstring
Returns the total number of frames for the navigation.
%End

signals:

void stateChanged( AnimationState state );
%Docstring
Emitted whenever the animation ``state`` changes.
%End

public slots:
@@ -169,7 +169,11 @@ long long QgsTemporalNavigationObject::totalFrameCount()

void QgsTemporalNavigationObject::setAnimationState( AnimationState mode )
{
mPlayBackMode = mode;
if ( mode != mPlayBackMode )
{
mPlayBackMode = mode;
emit stateChanged( mPlayBackMode );
}
}

QgsTemporalNavigationObject::AnimationState QgsTemporalNavigationObject::animationState() const
@@ -152,6 +152,13 @@ class CORE_EXPORT QgsTemporalNavigationObject : public QgsTemporalController
*/
long long totalFrameCount();

signals:

/**
* Emitted whenever the animation \a state changes.
*/
void stateChanged( AnimationState state );

public slots:

/**

0 comments on commit fb13b0f

Please sign in to comment.
You can’t perform that action at this time.