![]() |
ImFusion SDK 4.3
|
#include <ImFusion/GUI/AnimationBackendQt.h>
Concrete implementation of AnimationBackendBase using the Qt event loop for dispatching the animation updates. More...
Concrete implementation of AnimationBackendBase using the Qt event loop for dispatching the animation updates.
All animations will be executed on the thread that instantiated the AnimationBackendQt. This thread must have a running event loop on construction.
Signals | |
void | animationToBeDispatched (Animation *) |
Public Member Functions | |
AnimationBackendQt () | |
Creates a new AnimationBackendQt. | |
![]() | |
void | run (std::shared_ptr< Animation > animation, const std::optional< UniqueId > &uniqueId=std::nullopt) |
Dispatches the given animation canceling any running animation with the same ID if applicable. | |
void | cancelAllAnimations () |
Cancels all animations currently in flight. | |
bool | isEnabled () const |
Returns the flag whether dispatching of new animations is enabled. | |
void | setEnabled (bool value) |
Sets the flag whether dispatching of new animations is enabled. | |
double | animationDurationFactor () const |
Returns the duration multiplier for run animations; enables you to change the speed of all animations consistently. | |
void | setAnimationDurationFactor (double value) |
Sets the duration multiplier for run animations, must be >= 0; enables you to change the speed of all animations consistently. | |
![]() | |
SignalReceiver ()=default | |
Default constructor. | |
SignalReceiver (const SignalReceiver &other) | |
Copy constructor, does not copy any existing signal connections from other. | |
SignalReceiver & | operator= (SignalReceiver rhs) |
Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs. | |
virtual | ~SignalReceiver () |
Virtual destructor disconnects from all connected signals. | |
Protected Member Functions | |
void | runImpl (std::shared_ptr< Animation > animation) override |
Called by the base interface once animation is fully configured and ready to dispatch. | |
![]() | |
void | setAnimationState (Animation &animation, Animation::State newState) const |
![]() | |
void | disconnectAll () |
Disconnects all existing connections. | |
Creates a new AnimationBackendQt.
std::runtime_error | If the current thread does not have a running Qt event loop. |
|
overrideprotectedvirtual |
Called by the base interface once animation is fully configured and ready to dispatch.
Derived classes must take care of actually dispatching the animation so that the interface invariants are met.
Implements AnimationBackendBase.