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 | Signals | Public Member Functions | Private Attributes | List of all members
MusicDesktopWallpaperThread Class Reference

The class of the desktop wallpaper thread. More...

#include <musicdesktopwallpaperthread.h>

+ Inheritance diagram for MusicDesktopWallpaperThread:

Public Slots

void start ()
 
void stop ()
 
void timeout ()
 

Signals

void updateBackground (const QPixmap &pix)
 

Public Member Functions

 MusicDesktopWallpaperThread (QObject *parent=nullptr)
 
 ~MusicDesktopWallpaperThread ()
 
void setInterval (int msec)
 
bool isRunning () const
 
void setRandom (bool random)
 
void setImagePath (const QStringList &list)
 

Private Attributes

bool m_run
 
bool m_random
 
int m_currentImageIndex
 
QTimer * m_timer
 
QStringList m_path
 

Detailed Description

The class of the desktop wallpaper thread.

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

Definition at line 37 of file musicdesktopwallpaperthread.h.

Constructor & Destructor Documentation

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

Object constructor.

Definition at line 9 of file musicdesktopwallpaperthread.cpp.

References TTK::initRandom(), m_timer, setInterval(), timeout(), and TTK_DN_S2MS.

MusicDesktopWallpaperThread::~MusicDesktopWallpaperThread ( )

Object destructor.

Definition at line 22 of file musicdesktopwallpaperthread.cpp.

References m_timer, and stop().

Member Function Documentation

bool MusicDesktopWallpaperThread::isRunning ( ) const

State is running.

Definition at line 33 of file musicdesktopwallpaperthread.cpp.

References m_run.

Referenced by MusicLrcContainerForWallpaper::start().

void MusicDesktopWallpaperThread::setImagePath ( const QStringList &  list)

Set image path.

Definition at line 42 of file musicdesktopwallpaperthread.cpp.

References m_path.

Referenced by MusicLrcContainerForWallpaper::start().

void MusicDesktopWallpaperThread::setInterval ( int  msec)

Set time interval.

Definition at line 28 of file musicdesktopwallpaperthread.cpp.

References m_timer.

Referenced by MusicDesktopWallpaperThread().

void MusicDesktopWallpaperThread::setRandom ( bool  random)

Set random mode check.

Definition at line 38 of file musicdesktopwallpaperthread.cpp.

References m_random, and TTK::random().

void MusicDesktopWallpaperThread::start ( )
slot

Strat thread now.

Definition at line 70 of file musicdesktopwallpaperthread.cpp.

References m_run, m_timer, and timeout().

Referenced by MusicLrcContainerForWallpaper::start().

void MusicDesktopWallpaperThread::stop ( )
slot

Stop and quit current thread.

Definition at line 77 of file musicdesktopwallpaperthread.cpp.

References m_run, and m_timer.

Referenced by ~MusicDesktopWallpaperThread().

void MusicDesktopWallpaperThread::timeout ( )
slot
void MusicDesktopWallpaperThread::updateBackground ( const QPixmap &  pix)
signal

Update background pixmap.

Referenced by timeout().

Member Data Documentation

int MusicDesktopWallpaperThread::m_currentImageIndex
private

Definition at line 102 of file musicdesktopwallpaperthread.h.

Referenced by timeout().

QStringList MusicDesktopWallpaperThread::m_path
private

Definition at line 104 of file musicdesktopwallpaperthread.h.

Referenced by setImagePath(), and timeout().

bool MusicDesktopWallpaperThread::m_random
private

Definition at line 101 of file musicdesktopwallpaperthread.h.

Referenced by setRandom(), and timeout().

bool MusicDesktopWallpaperThread::m_run
private

Definition at line 101 of file musicdesktopwallpaperthread.h.

Referenced by isRunning(), start(), stop(), and timeout().

QTimer* MusicDesktopWallpaperThread::m_timer
private

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