TTKMusicPlayer
4.2.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
|
The class of the slider smooth moving interface. More...
#include <musicsmoothmovingwidget.h>
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 |
The class of the slider smooth moving interface.
Definition at line 30 of file musicsmoothmovingwidget.h.
|
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.
|
inlinenoexcept |
Get current moved scroll bar.
Definition at line 51 of file musicsmoothmovingwidget.h.
void MusicSmoothMovingInterface::setScrollBar | ( | QScrollBar * | bar | ) |
Set current moved scroll bar.
Definition at line 28 of file musicsmoothmovingwidget.cpp.
References m_moveAnimation, m_scrollBar, TTK_DN_S2MS, and valueChanged().
Referenced by MusicSmoothMovingTableWidget::setMovedScrollBar(), and MusicSmoothMovingScrollArea::setMovedScrollBar().
|
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 | ) |
Update current scroll bar value.
Definition at line 38 of file musicsmoothmovingwidget.cpp.
References m_animationTimer, m_deltaValue, m_initialized, m_moveAnimation, m_previousValue, and m_scrollBar.
Referenced by MusicSmoothMovingTableWidget::wheelEvent(), and MusicSmoothMovingScrollArea::wheelEvent().
|
slot |
Current scroll bar value changed.
Definition at line 76 of file musicsmoothmovingwidget.cpp.
References m_previousValue.
Referenced by setScrollBar().
|
private |
Definition at line 72 of file musicsmoothmovingwidget.h.
Referenced by MusicSmoothMovingInterface(), timeToAnimation(), updateValue(), and ~MusicSmoothMovingInterface().
|
private |
Definition at line 70 of file musicsmoothmovingwidget.h.
Referenced by timeToAnimation(), and updateValue().
|
private |
Definition at line 69 of file musicsmoothmovingwidget.h.
Referenced by timeToAnimation(), and updateValue().
|
private |
Definition at line 73 of file musicsmoothmovingwidget.h.
Referenced by setScrollBar(), timeToAnimation(), updateValue(), and ~MusicSmoothMovingInterface().
|
private |
Definition at line 70 of file musicsmoothmovingwidget.h.
Referenced by timeToAnimation(), updateValue(), and valueChanged().
|
private |
Definition at line 71 of file musicsmoothmovingwidget.h.
Referenced by setScrollBar(), timeToAnimation(), and updateValue().