|
MythTV master
|
A single animation controlling alpha, zoom, rotation and position. More...
#include <mythfrontend/galleryslide.h>
Public Types | |
| enum | Type : std::uint8_t { None , Alpha , Position , Zoom , HorizontalZoom , VerticalZoom , Angle } |
| Supported effects. More... | |
Public Member Functions | |
| Animation (Slide *image, Type type=Alpha) | |
| Create simple animation. More... | |
| void | Start (bool forwards=true, float speed=1.0) override |
| Start a single animation. More... | |
| void | Pulse () override |
| Progress single animation. More... | |
| void | Set (const QVariant &from, const QVariant &to, std::chrono::milliseconds duration=500ms, const QEasingCurve &curve=QEasingCurve::InOutCubic, UIEffects::Centre centre=UIEffects::Middle) |
| Initialises an animation. More... | |
| void | updateCurrentValue (const QVariant &value) override |
| Update animated value. More... | |
Public Member Functions inherited from AbstractAnimation | |
| AbstractAnimation ()=default | |
| virtual void | Start (bool forwards, float speed=1.0) |
| Initialise & start base animation. More... | |
| virtual void | Stop () |
| virtual void | SetSpeed (float speed) |
| virtual void | Pulse ()=0 |
| virtual void | Clear () |
Protected Attributes | |
| Slide * | m_parent {nullptr} |
| Image to be animated. More... | |
| Type | m_type |
| UIEffects::Centre | m_centre {UIEffects::Middle} |
| std::chrono::milliseconds | m_elapsed {0ms} |
| Current millisec position within animation, 0..duration. More... | |
| std::chrono::milliseconds | m_lastUpdate { MythDate::currentMSecsSinceEpochAsDuration() } |
Protected Attributes inherited from AbstractAnimation | |
| bool | m_forwards {true} |
| Play direction. More... | |
| bool | m_running {false} |
| True whilst animation is active. More... | |
| float | m_speed {0.0F} |
| Real-time = 1.0, Double-speed = 2.0. More... | |
Additional Inherited Members | |
Signals inherited from AbstractAnimation | |
| void | finished () |
| Signals animation has finished. More... | |
Protected Slots inherited from AbstractAnimation | |
| virtual void | Finished () |
| To be called when animation completes. More... | |
A single animation controlling alpha, zoom, rotation and position.
Definition at line 54 of file galleryslide.h.
| enum Animation::Type : std::uint8_t |
Supported effects.
| Enumerator | |
|---|---|
| None | |
| Alpha | |
| Position | |
| Zoom | |
| HorizontalZoom | |
| VerticalZoom | |
| Angle | |
Definition at line 58 of file galleryslide.h.
Create simple animation.
| image | Image to be animated |
| type | Effect to be animated |
Definition at line 65 of file galleryslide.h.
|
overridevirtual |
Progress single animation.
Implements AbstractAnimation.
Definition at line 81 of file galleryslide.cpp.
Referenced by Slide::Pulse().
| void Animation::Set | ( | const QVariant & | from, |
| const QVariant & | to, | ||
| std::chrono::milliseconds | duration = 500ms, |
||
| const QEasingCurve & | curve = QEasingCurve::InOutCubic, |
||
| UIEffects::Centre | centre = UIEffects::Middle |
||
| ) |
Initialises an animation.
| from | Start value |
| to | End value |
| duration | Animation duration |
| curve | Easing curve governing animation |
| centre | Zoom centre |
Definition at line 49 of file galleryslide.cpp.
Referenced by Slide::Pan(), and Slide::Zoom().
Start a single animation.
| forwards | Direction |
| speed | Speed factor, 1x, 2x etc |
Reimplemented from AbstractAnimation.
Definition at line 66 of file galleryslide.cpp.
Referenced by Slide::Pan(), and Slide::Zoom().
|
override |
Update animated value.
| value | Latest value, derived from animation time & easing curve |
Definition at line 102 of file galleryslide.cpp.
|
protected |
Definition at line 81 of file galleryslide.h.
Referenced by Set(), and updateCurrentValue().
|
protected |
Current millisec position within animation, 0..duration.
Decreases duration..0 when playing backwards
Definition at line 84 of file galleryslide.h.
|
protected |
Definition at line 85 of file galleryslide.h.
Referenced by Pulse().
|
protected |
Image to be animated.
Definition at line 79 of file galleryslide.h.
Referenced by updateCurrentValue(), and PanAnimation::updateCurrentValue().
|
protected |
Definition at line 80 of file galleryslide.h.
Referenced by updateCurrentValue().