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

The class of thread to check current network. More...

#include <musicnetworkthread.h>

+ Inheritance diagram for MusicNetworkThread:

Public Slots

void networkStateChanged ()
 

Signals

void networkConnectionStateChanged (bool state)
 

Public Member Functions

void start ()
 
void setBlockNetwork (bool block)
 
void setNetWorkState (bool state)
 
bool isOnline () const
 

Private Member Functions

 MusicNetworkThread ()
 
 ~MusicNetworkThread ()
 

Private Attributes

QTimer m_timer
 
bool m_networkState
 

Detailed Description

The class of thread to check current network.

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

Definition at line 28 of file musicnetworkthread.h.

Constructor & Destructor Documentation

MusicNetworkThread::MusicNetworkThread ( )
private

Object constructor.

Definition at line 11 of file musicnetworkthread.cpp.

References G_CONNECTION_PTR, m_timer, and networkStateChanged().

MusicNetworkThread::~MusicNetworkThread ( )
private

Object destructor.

Definition at line 20 of file musicnetworkthread.cpp.

References m_timer.

Member Function Documentation

bool MusicNetworkThread::isOnline ( ) const
inline

Check current network is on.

Definition at line 48 of file musicnetworkthread.h.

void MusicNetworkThread::networkConnectionStateChanged ( bool  state)
signal

Network connection state changed. default status is true, means connected network.

Referenced by networkStateChanged().

void MusicNetworkThread::networkStateChanged ( )
slot
void MusicNetworkThread::setBlockNetwork ( bool  block)

Set flag wheather to block current network.

Definition at line 32 of file musicnetworkthread.cpp.

References MusicSettingManager::CloseNetWorkMode, and G_SETTING_PTR.

void MusicNetworkThread::setNetWorkState ( bool  state)
inline

Set current network state.

Definition at line 44 of file musicnetworkthread.h.

void MusicNetworkThread::start ( )

Strat thread now.

Definition at line 25 of file musicnetworkthread.cpp.

References m_timer, NETWORK_DETECT_INTERVAL, networkStateChanged(), and TTK_INFO_STREAM.

Member Data Documentation

bool MusicNetworkThread::m_networkState
private

Definition at line 74 of file musicnetworkthread.h.

Referenced by networkStateChanged().

QTimer MusicNetworkThread::m_timer
private

Definition at line 73 of file musicnetworkthread.h.

Referenced by MusicNetworkThread(), start(), and ~MusicNetworkThread().


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