SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
AnimationController Class Reference

Central coordinator for result-layer time-stepping and playback. More...

#include <animationcontroller.h>

Inheritance diagram for AnimationController:
Collaboration diagram for AnimationController:

Public Slots

void play ()
 
void pause ()
 
void stop ()
 
void stepForward ()
 
void stepBackward ()
 
void seekToFirst ()
 
void seekToLast ()
 
void seekToPeriod (int period)
 
void seekToTime (const QDateTime &dt)
 

Signals

void currentTimeChanged (const QDateTime &dt)
 
void currentPeriodChanged (int period)
 
void playStateChanged (bool playing)
 
void totalPeriodsChanged (int total)
 
void primaryLayerChanged (SWMMResultsLayer *layer)
 
void windowChanged (qint64 windowMs)
 

Public Member Functions

 AnimationController (QObject *parent=nullptr)
 
 ~AnimationController () override
 
void setPrimaryLayer (SWMMResultsLayer *layer)
 Set the primary (authoritative) results layer.
 
SWMMResultsLayerprimaryLayer () const
 
void setFallback2DLayer (SWMM2DResultsLayer *layer)
 
SWMM2DResultsLayerfallback2DLayer () const
 
void addSecondaryLayer (SWMMResultsLayer *layer)
 
void removeSecondaryLayer (SWMMResultsLayer *layer)
 
void clearSecondaryLayers ()
 
QList< SWMMResultsLayer * > allLayers () const
 
bool isPlaying () const
 
double speed () const
 
qint64 windowMs () const
 
QDateTime driverStartTime () const
 
QDateTime driverEndTime () const
 
QDateTime currentDateTime () const
 
void setSpeed (double speed)
 Set playback speed multiplier (0.25 / 0.5 / 1 / 2 / 4 / 8).
 
void setWindowMs (qint64 ms)
 
void setWindowSec (double sec)
 
void setLooping (bool on)
 
bool looping () const
 

Detailed Description

Central coordinator for result-layer time-stepping and playback.

Constructor & Destructor Documentation

◆ AnimationController()

AnimationController::AnimationController ( QObject *  parent = nullptr)
explicit

◆ ~AnimationController()

AnimationController::~AnimationController ( )
override

Member Function Documentation

◆ addSecondaryLayer()

void AnimationController::addSecondaryLayer ( SWMMResultsLayer layer)

◆ allLayers()

QList< SWMMResultsLayer * > AnimationController::allLayers ( ) const

Returns primary first, then secondary layers in insertion order.

Here is the caller graph for this function:

◆ clearSecondaryLayers()

void AnimationController::clearSecondaryLayers ( )

◆ currentDateTime()

QDateTime AnimationController::currentDateTime ( ) const

Current cursor time of the active driver. Invalid when no driver.

◆ currentPeriodChanged

void AnimationController::currentPeriodChanged ( int  period)
signal
Here is the caller graph for this function:

◆ currentTimeChanged

void AnimationController::currentTimeChanged ( const QDateTime &  dt)
signal
Here is the caller graph for this function:

◆ driverEndTime()

QDateTime AnimationController::driverEndTime ( ) const

◆ driverStartTime()

QDateTime AnimationController::driverStartTime ( ) const

Run time span of the active driver (1D primary, else 2D fallback), used to normalise the range slider. Invalid when no driver.

◆ fallback2DLayer()

SWMM2DResultsLayer * AnimationController::fallback2DLayer ( ) const
inline

◆ isPlaying()

bool AnimationController::isPlaying ( ) const
inline

◆ looping()

bool AnimationController::looping ( ) const
inline

◆ pause

void AnimationController::pause ( )
slot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ play

void AnimationController::play ( )
slot
Here is the call graph for this function:

◆ playStateChanged

void AnimationController::playStateChanged ( bool  playing)
signal
Here is the caller graph for this function:

◆ primaryLayer()

SWMMResultsLayer * AnimationController::primaryLayer ( ) const

◆ primaryLayerChanged

void AnimationController::primaryLayerChanged ( SWMMResultsLayer layer)
signal
Here is the caller graph for this function:

◆ removeSecondaryLayer()

void AnimationController::removeSecondaryLayer ( SWMMResultsLayer layer)

◆ seekToFirst

void AnimationController::seekToFirst ( )
slot

◆ seekToLast

void AnimationController::seekToLast ( )
slot

◆ seekToPeriod

void AnimationController::seekToPeriod ( int  period)
slot
Here is the caller graph for this function:

◆ seekToTime

void AnimationController::seekToTime ( const QDateTime &  dt)
slot

Seek the driver to dt (1D primary: nearest report step; 2D fallback: nearest frame). Used by the range-slider cursor handle.

Here is the call graph for this function:

◆ setFallback2DLayer()

void AnimationController::setFallback2DLayer ( SWMM2DResultsLayer layer)
Here is the call graph for this function:

◆ setLooping()

void AnimationController::setLooping ( bool  on)
inline

When on (the default), playback wraps to the start of the range on reaching the end instead of pausing. Composes with the primary's TemporalSpec: spec loop/pingPong still apply when this is off.

◆ setPrimaryLayer()

void AnimationController::setPrimaryLayer ( SWMMResultsLayer layer)

Set the primary (authoritative) results layer.

Stops playback first. Passing nullptr detaches all layers. Does NOT automatically demote the old primary to secondary — call addSecondaryLayer() explicitly if synchronised playback of the old layer is still desired.

Here is the call graph for this function:

◆ setSpeed()

void AnimationController::setSpeed ( double  speed)

Set playback speed multiplier (0.25 / 0.5 / 1 / 2 / 4 / 8).

Restarts the timer at the new interval if currently playing.

Here is the call graph for this function:

◆ setWindowMs()

void AnimationController::setWindowMs ( qint64  ms)

Set the look-back window. ms < 0 is clamped to 0. Emits windowChanged when the value moves.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setWindowSec()

void AnimationController::setWindowSec ( double  sec)
inline
Here is the call graph for this function:

◆ speed()

double AnimationController::speed ( ) const
inline
Here is the caller graph for this function:

◆ stepBackward

void AnimationController::stepBackward ( )
slot

◆ stepForward

void AnimationController::stepForward ( )
slot

◆ stop

void AnimationController::stop ( )
slot
Here is the call graph for this function:

◆ totalPeriodsChanged

void AnimationController::totalPeriodsChanged ( int  total)
signal
Here is the caller graph for this function:

◆ windowChanged

void AnimationController::windowChanged ( qint64  windowMs)
signal
Here is the caller graph for this function:

◆ windowMs()

qint64 AnimationController::windowMs ( ) const
inline

The documentation for this class was generated from the following files: