TTKMusicPlayer
4.1.3.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
|
The class of the label transition animation. More...
#include <musictransitionanimationlabel.h>
Public Types | |
enum | Module { Module::FadeEffect, Module::BlindsEffect, Module::CubeEffect, Module::WaterEffect, Module::LeftToRightEffect, Module::TopToBottomEffect, Module::MAX = 6 } |
Public Slots | |
void | setPixmap (const QPixmap &pix) |
Public Member Functions | |
MusicTransitionAnimationLabel (QWidget *parent=nullptr) | |
~MusicTransitionAnimationLabel () | |
void | setAnimation (bool enable) |
bool | animation () const |
const QPixmap & | renderPixmap () const |
void | start () |
void | stop () |
bool | isRunning () const |
Private Slots | |
void | valueChanged (const QVariant &value) |
void | animationFinished () |
Private Member Functions | |
virtual void | paintEvent (QPaintEvent *event) overridefinal |
Private Attributes | |
Module | m_type |
bool | m_isAnimating |
int | m_currentValue |
bool | m_animationEnabled |
QPixmap | m_renderPixmap |
QPixmap | m_currentPixmap |
QPixmap | m_previousPixmap |
QPropertyAnimation * | m_animation |
QAlgorithm::ImageRender * | m_imageRender |
The class of the label transition animation.
Definition at line 34 of file musictransitionanimationlabel.h.
|
strong |
Enumerator | |
---|---|
FadeEffect | |
BlindsEffect | |
CubeEffect | |
WaterEffect | |
LeftToRightEffect | |
TopToBottomEffect | |
MAX |
Definition at line 39 of file musictransitionanimationlabel.h.
|
explicit |
Object constructor.
Definition at line 9 of file musictransitionanimationlabel.cpp.
References animationFinished(), TTK::initRandom(), m_animation, and valueChanged().
MusicTransitionAnimationLabel::~MusicTransitionAnimationLabel | ( | ) |
Object destructor.
Definition at line 29 of file musictransitionanimationlabel.cpp.
References m_animation, and m_imageRender.
|
inline |
Get animation state.
Definition at line 66 of file musictransitionanimationlabel.h.
|
privateslot |
Animation finished.
Definition at line 133 of file musictransitionanimationlabel.cpp.
References m_currentPixmap, m_currentValue, m_isAnimating, and m_renderPixmap.
Referenced by MusicTransitionAnimationLabel(), and stop().
bool MusicTransitionAnimationLabel::isRunning | ( | ) | const |
Get animation is in run state.
Definition at line 56 of file musictransitionanimationlabel.cpp.
References m_animation.
Referenced by stop().
|
finaloverrideprivatevirtual |
Override the widget event.
Definition at line 142 of file musictransitionanimationlabel.cpp.
References BlindsEffect, CubeEffect, FadeEffect, LeftToRightEffect, m_currentPixmap, m_currentValue, m_imageRender, m_isAnimating, m_previousPixmap, m_renderPixmap, m_type, QAlgorithm::ImageRender::render(), TopToBottomEffect, and WaterEffect.
const QPixmap & MusicTransitionAnimationLabel::renderPixmap | ( | ) | const |
Get render pixmap image.
Definition at line 35 of file musictransitionanimationlabel.cpp.
References m_renderPixmap.
|
inline |
Set animation to start.
Definition at line 62 of file musictransitionanimationlabel.h.
|
slot |
Override the setPixmap function.
Definition at line 61 of file musictransitionanimationlabel.cpp.
References BlindsEffect, CubeEffect, FadeEffect, QAlgorithm::ImageRender::input(), LeftToRightEffect, m_animation, m_animationEnabled, m_currentPixmap, m_imageRender, m_isAnimating, m_previousPixmap, m_renderPixmap, m_type, MAX, QtLablePixmap, TTK::random(), stop(), TopToBottomEffect, TTKStaticCast, and WaterEffect.
Referenced by MusicScreenSaverBackgroundWidget::backgroundTimeout(), and MusicLrcContainerForWallpaper::updateBackground().
void MusicTransitionAnimationLabel::start | ( | ) |
Start renderer pixmap animation.
Definition at line 40 of file musictransitionanimationlabel.cpp.
References m_animation, m_isAnimating, and stop().
void MusicTransitionAnimationLabel::stop | ( | ) |
Stop renderer pixmap animation.
Definition at line 47 of file musictransitionanimationlabel.cpp.
References animationFinished(), isRunning(), and m_animation.
Referenced by setPixmap(), and start().
|
privateslot |
Animation value changed.
Definition at line 127 of file musictransitionanimationlabel.cpp.
References m_currentValue.
Referenced by MusicTransitionAnimationLabel().
|
private |
Definition at line 115 of file musictransitionanimationlabel.h.
Referenced by isRunning(), MusicTransitionAnimationLabel(), setPixmap(), start(), stop(), and ~MusicTransitionAnimationLabel().
|
private |
Definition at line 112 of file musictransitionanimationlabel.h.
Referenced by setPixmap().
|
private |
Definition at line 114 of file musictransitionanimationlabel.h.
Referenced by animationFinished(), paintEvent(), and setPixmap().
|
private |
Definition at line 111 of file musictransitionanimationlabel.h.
Referenced by animationFinished(), paintEvent(), and valueChanged().
|
private |
Definition at line 116 of file musictransitionanimationlabel.h.
Referenced by paintEvent(), setPixmap(), and ~MusicTransitionAnimationLabel().
|
private |
Definition at line 110 of file musictransitionanimationlabel.h.
Referenced by animationFinished(), paintEvent(), setPixmap(), and start().
|
private |
Definition at line 114 of file musictransitionanimationlabel.h.
Referenced by paintEvent(), and setPixmap().
|
private |
Definition at line 113 of file musictransitionanimationlabel.h.
Referenced by animationFinished(), paintEvent(), renderPixmap(), and setPixmap().
|
private |
Definition at line 109 of file musictransitionanimationlabel.h.
Referenced by paintEvent(), and setPixmap().