TTKMusicPlayer  4.1.3.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
Public Types | Public Slots | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
MusicTransitionAnimationLabel Class Reference

The class of the label transition animation. More...

#include <musictransitionanimationlabel.h>

+ Inheritance diagram for MusicTransitionAnimationLabel:

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::ImageRenderm_imageRender
 

Detailed Description

The class of the label transition animation.

Author
Greedysky greed.nosp@m.ysky.nosp@m.@163..nosp@m.com

Definition at line 34 of file musictransitionanimationlabel.h.

Member Enumeration Documentation

Enumerator
FadeEffect 
BlindsEffect 
CubeEffect 
WaterEffect 
LeftToRightEffect 
TopToBottomEffect 
MAX 

Definition at line 39 of file musictransitionanimationlabel.h.

Constructor & Destructor Documentation

MusicTransitionAnimationLabel::MusicTransitionAnimationLabel ( QWidget *  parent = nullptr)
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.

Member Function Documentation

bool MusicTransitionAnimationLabel::animation ( ) const
inline

Get animation state.

Definition at line 66 of file musictransitionanimationlabel.h.

void MusicTransitionAnimationLabel::animationFinished ( )
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().

void MusicTransitionAnimationLabel::paintEvent ( QPaintEvent *  event)
finaloverrideprivatevirtual
const QPixmap & MusicTransitionAnimationLabel::renderPixmap ( ) const

Get render pixmap image.

Definition at line 35 of file musictransitionanimationlabel.cpp.

References m_renderPixmap.

void MusicTransitionAnimationLabel::setAnimation ( bool  enable)
inline

Set animation to start.

Definition at line 62 of file musictransitionanimationlabel.h.

void MusicTransitionAnimationLabel::setPixmap ( const QPixmap &  pix)
slot
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().

void MusicTransitionAnimationLabel::valueChanged ( const QVariant &  value)
privateslot

Animation value changed.

Definition at line 127 of file musictransitionanimationlabel.cpp.

References m_currentValue.

Referenced by MusicTransitionAnimationLabel().

Member Data Documentation

QPropertyAnimation* MusicTransitionAnimationLabel::m_animation
private
bool MusicTransitionAnimationLabel::m_animationEnabled
private

Definition at line 112 of file musictransitionanimationlabel.h.

Referenced by setPixmap().

QPixmap MusicTransitionAnimationLabel::m_currentPixmap
private

Definition at line 114 of file musictransitionanimationlabel.h.

Referenced by animationFinished(), paintEvent(), and setPixmap().

int MusicTransitionAnimationLabel::m_currentValue
private

Definition at line 111 of file musictransitionanimationlabel.h.

Referenced by animationFinished(), paintEvent(), and valueChanged().

QAlgorithm::ImageRender* MusicTransitionAnimationLabel::m_imageRender
private
bool MusicTransitionAnimationLabel::m_isAnimating
private

Definition at line 110 of file musictransitionanimationlabel.h.

Referenced by animationFinished(), paintEvent(), setPixmap(), and start().

QPixmap MusicTransitionAnimationLabel::m_previousPixmap
private

Definition at line 114 of file musictransitionanimationlabel.h.

Referenced by paintEvent(), and setPixmap().

QPixmap MusicTransitionAnimationLabel::m_renderPixmap
private
Module MusicTransitionAnimationLabel::m_type
private

Definition at line 109 of file musictransitionanimationlabel.h.

Referenced by paintEvent(), and setPixmap().


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