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

The class of the music network proxy. More...

#include <musicnetworkproxy.h>

+ Inheritance diagram for MusicNetworkProxy:

Signals

void testProxyStateChanged (bool state)
 

Public Member Functions

 MusicNetworkProxy (QObject *parent=nullptr)
 
 ~MusicNetworkProxy ()
 
void setHostName (const QString &name)
 
QString hostName () const
 
void setPort (int port)
 
int port () const
 
void setType (int type)
 
int type () const
 
void setUser (const QString &user)
 
QString user () const
 
void setPassword (const QString &pwd)
 
QString password () const
 
void testProxy ()
 
void applyProxy ()
 

Private Slots

void testProxyChanged (QAbstractSocket::SocketState state)
 

Private Attributes

int m_port
 
int m_type
 
QString m_hostName
 
QString m_user
 
QString m_pwd
 
QTcpSocket * m_socket
 

Detailed Description

The class of the music network proxy.

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

Definition at line 28 of file musicnetworkproxy.h.

Constructor & Destructor Documentation

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

Object constructor.

Definition at line 5 of file musicnetworkproxy.cpp.

MusicNetworkProxy::~MusicNetworkProxy ( )

Object destructor.

Definition at line 14 of file musicnetworkproxy.cpp.

References m_socket.

Member Function Documentation

void MusicNetworkProxy::applyProxy ( )

Apply current proxy.

Definition at line 81 of file musicnetworkproxy.cpp.

References m_hostName, m_port, m_pwd, m_type, m_user, and TTKStaticCast.

Referenced by MusicSettingWidget::setNetworkProxyByType().

QString MusicNetworkProxy::hostName ( ) const

Get proxy hostName.

Definition at line 24 of file musicnetworkproxy.cpp.

References m_hostName.

QString MusicNetworkProxy::password ( ) const

Get proxy password.

Definition at line 64 of file musicnetworkproxy.cpp.

References m_pwd.

int MusicNetworkProxy::port ( ) const

Get proxy port.

Definition at line 44 of file musicnetworkproxy.cpp.

References m_port.

Referenced by setPort().

void MusicNetworkProxy::setHostName ( const QString &  name)

Set proxy hostName.

Definition at line 19 of file musicnetworkproxy.cpp.

References m_hostName, and name.

Referenced by MusicSettingWidget::setNetworkProxyByType().

void MusicNetworkProxy::setPassword ( const QString &  pwd)

Set proxy password.

Definition at line 59 of file musicnetworkproxy.cpp.

References m_pwd.

Referenced by MusicSettingWidget::setNetworkProxyByType().

void MusicNetworkProxy::setPort ( int  port)

Set proxy port.

Definition at line 29 of file musicnetworkproxy.cpp.

References m_port, and port().

Referenced by MusicSettingWidget::setNetworkProxyByType().

void MusicNetworkProxy::setType ( int  type)

Set proxy type.

Definition at line 34 of file musicnetworkproxy.cpp.

References m_type, and type().

Referenced by MusicSettingWidget::setNetworkProxyByType().

void MusicNetworkProxy::setUser ( const QString &  user)

Set proxy username.

Definition at line 49 of file musicnetworkproxy.cpp.

References m_user, and user().

Referenced by MusicSettingWidget::setNetworkProxyByType().

void MusicNetworkProxy::testProxy ( )

Test current proxy available.

Definition at line 69 of file musicnetworkproxy.cpp.

References m_hostName, m_port, m_socket, and testProxyChanged().

Referenced by MusicSettingWidget::setNetworkProxyByType().

void MusicNetworkProxy::testProxyChanged ( QAbstractSocket::SocketState  state)
privateslot

Test current proxy available changed.

Definition at line 107 of file musicnetworkproxy.cpp.

References testProxyStateChanged().

Referenced by testProxy().

void MusicNetworkProxy::testProxyStateChanged ( bool  state)
signal

Test current proxy available changed.

Referenced by testProxyChanged().

int MusicNetworkProxy::type ( ) const

Get proxy type.

Definition at line 39 of file musicnetworkproxy.cpp.

References m_type.

Referenced by setType().

QString MusicNetworkProxy::user ( ) const

Get proxy username.

Definition at line 54 of file musicnetworkproxy.cpp.

References m_user.

Referenced by setUser().

Member Data Documentation

QString MusicNetworkProxy::m_hostName
private

Definition at line 110 of file musicnetworkproxy.h.

Referenced by applyProxy(), hostName(), setHostName(), and testProxy().

int MusicNetworkProxy::m_port
private

Definition at line 109 of file musicnetworkproxy.h.

Referenced by applyProxy(), port(), setPort(), and testProxy().

QString MusicNetworkProxy::m_pwd
private

Definition at line 110 of file musicnetworkproxy.h.

Referenced by applyProxy(), password(), and setPassword().

QTcpSocket* MusicNetworkProxy::m_socket
private

Definition at line 111 of file musicnetworkproxy.h.

Referenced by testProxy(), and ~MusicNetworkProxy().

int MusicNetworkProxy::m_type
private

Definition at line 109 of file musicnetworkproxy.h.

Referenced by applyProxy(), setType(), and type().

QString MusicNetworkProxy::m_user
private

Definition at line 110 of file musicnetworkproxy.h.

Referenced by applyProxy(), setUser(), and user().


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