TTKMusicPlayer  3.7.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 Member Functions | Private Attributes | List of all members
MusicSmoothMovingScrollArea Class Reference

The class of the slider smooth moving scroll area widget. More...

#include <musicsmoothmovingwidget.h>

+ Inheritance diagram for MusicSmoothMovingScrollArea:

Public Slots

void timeToAnimation ()
 
void valueChanged (int value)
 

Public Member Functions

 MusicSmoothMovingScrollArea (QWidget *parent=nullptr)
 
 ~MusicSmoothMovingScrollArea ()
 
void setMovedScrollBar (QScrollBar *bar=nullptr)
 

Private Member Functions

virtual void wheelEvent (QWheelEvent *event) overridefinal
 

Private Attributes

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

Detailed Description

The class of the slider smooth moving scroll area widget.

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

Definition at line 77 of file musicsmoothmovingwidget.h.

Constructor & Destructor Documentation

MusicSmoothMovingScrollArea::MusicSmoothMovingScrollArea ( QWidget *  parent = nullptr)
explicit

Object constructor.

Definition at line 87 of file musicsmoothmovingwidget.cpp.

References m_animationTimer, TTK::UI::ScrollBarStyle03, timeToAnimation(), and TTK_DN_MS.

MusicSmoothMovingScrollArea::~MusicSmoothMovingScrollArea ( )

Object destructor.

Definition at line 107 of file musicsmoothmovingwidget.cpp.

References m_animationTimer, and m_slowAnimation.

Member Function Documentation

void MusicSmoothMovingScrollArea::setMovedScrollBar ( QScrollBar *  bar = nullptr)

Set current moved scroll bar.

Definition at line 114 of file musicsmoothmovingwidget.cpp.

References m_scrollBar, m_slowAnimation, TTK_DN_S2MS, and valueChanged().

void MusicSmoothMovingScrollArea::timeToAnimation ( )
slot

Time out to start animation.

Definition at line 123 of file musicsmoothmovingwidget.cpp.

References m_animationTimer, m_deltaValue, m_initialized, m_previousValue, m_scrollBar, m_slowAnimation, and TTK_ITEM_SIZE_M.

Referenced by MusicSmoothMovingScrollArea().

void MusicSmoothMovingScrollArea::valueChanged ( int  value)
slot

Current scroll bar value changed.

Definition at line 140 of file musicsmoothmovingwidget.cpp.

References m_previousValue.

Referenced by setMovedScrollBar().

void MusicSmoothMovingScrollArea::wheelEvent ( QWheelEvent *  event)
finaloverrideprivatevirtual

Override the widget event.

Definition at line 145 of file musicsmoothmovingwidget.cpp.

References m_animationTimer, m_deltaValue, m_initialized, m_previousValue, m_scrollBar, m_slowAnimation, and QtWheelDelta.

Member Data Documentation

QTimer* MusicSmoothMovingScrollArea::m_animationTimer
private
int MusicSmoothMovingScrollArea::m_deltaValue
private

Definition at line 113 of file musicsmoothmovingwidget.h.

Referenced by timeToAnimation(), and wheelEvent().

bool MusicSmoothMovingScrollArea::m_initialized
private

Definition at line 112 of file musicsmoothmovingwidget.h.

Referenced by timeToAnimation(), and wheelEvent().

int MusicSmoothMovingScrollArea::m_previousValue
private

Definition at line 113 of file musicsmoothmovingwidget.h.

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

QScrollBar* MusicSmoothMovingScrollArea::m_scrollBar
private

Definition at line 114 of file musicsmoothmovingwidget.h.

Referenced by setMovedScrollBar(), timeToAnimation(), and wheelEvent().

QPropertyAnimation* MusicSmoothMovingScrollArea::m_slowAnimation
private

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