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

The class of the slider smooth moving interface. More...

#include <musicsmoothmovingwidget.h>

+ Inheritance diagram for MusicSmoothMovingInterface:

Public Slots

void timeToAnimation ()
 
void valueChanged (int value)
 

Public Member Functions

 MusicSmoothMovingInterface (QObject *parent=nullptr)
 
 ~MusicSmoothMovingInterface ()
 
void setScrollBar (QScrollBar *bar)
 
QScrollBar * scrollBar () const noexcept
 
void updateValue (int value)
 

Private Attributes

bool m_initialized
 
int m_previousValue
 
int m_deltaValue
 
QScrollBar * m_scrollBar
 
QTimer * m_animationTimer
 
QPropertyAnimation * m_moveAnimation
 

Detailed Description

The class of the slider smooth moving interface.

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

Definition at line 30 of file musicsmoothmovingwidget.h.

Constructor & Destructor Documentation

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

Object constructor.

Definition at line 8 of file musicsmoothmovingwidget.cpp.

References m_animationTimer, timeToAnimation(), and TTK_DN_MS.

MusicSmoothMovingInterface::~MusicSmoothMovingInterface ( )

Object destructor.

Definition at line 21 of file musicsmoothmovingwidget.cpp.

References m_animationTimer, and m_moveAnimation.

Member Function Documentation

QScrollBar* MusicSmoothMovingInterface::scrollBar ( ) const
inlinenoexcept

Get current moved scroll bar.

Definition at line 51 of file musicsmoothmovingwidget.h.

void MusicSmoothMovingInterface::setScrollBar ( QScrollBar *  bar)
void MusicSmoothMovingInterface::timeToAnimation ( )
slot

Time out to start animation.

Definition at line 59 of file musicsmoothmovingwidget.cpp.

References m_animationTimer, m_deltaValue, m_initialized, m_moveAnimation, m_previousValue, and m_scrollBar.

Referenced by MusicSmoothMovingInterface().

void MusicSmoothMovingInterface::updateValue ( int  value)
void MusicSmoothMovingInterface::valueChanged ( int  value)
slot

Current scroll bar value changed.

Definition at line 76 of file musicsmoothmovingwidget.cpp.

References m_previousValue.

Referenced by setScrollBar().

Member Data Documentation

QTimer* MusicSmoothMovingInterface::m_animationTimer
private
int MusicSmoothMovingInterface::m_deltaValue
private

Definition at line 70 of file musicsmoothmovingwidget.h.

Referenced by timeToAnimation(), and updateValue().

bool MusicSmoothMovingInterface::m_initialized
private

Definition at line 69 of file musicsmoothmovingwidget.h.

Referenced by timeToAnimation(), and updateValue().

QPropertyAnimation* MusicSmoothMovingInterface::m_moveAnimation
private
int MusicSmoothMovingInterface::m_previousValue
private

Definition at line 70 of file musicsmoothmovingwidget.h.

Referenced by timeToAnimation(), updateValue(), and valueChanged().

QScrollBar* MusicSmoothMovingInterface::m_scrollBar
private

Definition at line 71 of file musicsmoothmovingwidget.h.

Referenced by setScrollBar(), timeToAnimation(), and updateValue().


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