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 | Protected Member Functions | Protected Attributes | List of all members
MusicAbstractDownLoadRequest Class Referenceabstract

The class of the abstract download data. More...

#include <musicabstractdownloadrequest.h>

+ Inheritance diagram for MusicAbstractDownLoadRequest:

Public Slots

virtual void downLoadFinished () override
 
virtual void downloadProgress (qint64 bytesReceived, qint64 bytesTotal)
 
virtual void updateDownloadSpeed ()
 
- Public Slots inherited from MusicAbstractNetwork
virtual void replyError (QNetworkReply::NetworkError error) override
 
virtual void sslErrors (QNetworkReply *reply, const QList< QSslError > &errors) override
 
- Public Slots inherited from TTKAbstractNetwork
virtual void downLoadFinished ()
 
virtual void replyError (QNetworkReply::NetworkError error)
 
virtual void sslErrors (QNetworkReply *reply, const QList< QSslError > &errors)
 
void sslErrorsString (QNetworkReply *reply, const QList< QSslError > &errors)
 

Public Member Functions

 MusicAbstractDownLoadRequest (const QString &url, const QString &path, TTK::Download type, QObject *parent=nullptr)
 
 ~MusicAbstractDownLoadRequest ()
 
virtual void deleteAll () overridefinal
 
virtual void startToRequest ()=0
 
- Public Member Functions inherited from MusicAbstractNetwork
 MusicAbstractNetwork (QObject *parent=nullptr)
 
- Public Member Functions inherited from TTKAbstractNetwork
 TTKAbstractNetwork (QObject *parent=nullptr)
 
 ~TTKAbstractNetwork ()
 
void setHeader (const QString &key, const QVariant &value)
 
const QVariant header (const QString &key) const
 

Protected Member Functions

QString mapCurrentQueryData () const
 

Protected Attributes

QFile * m_file
 
QString m_url
 
QString m_savePath
 
TTK::Download m_downloadType
 
qint64 m_hasReceived
 
qint64 m_currentReceived
 
qint64 m_totalSize
 
QTimer m_speedTimer
 
- Protected Attributes inherited from TTKAbstractNetwork
QVariantMap m_rawData
 
volatile bool m_interrupt
 
volatile TTK::NetworkCode m_stateCode
 
QNetworkReply * m_reply
 
QNetworkAccessManager m_manager
 

Additional Inherited Members

- Signals inherited from TTKAbstractNetwork
void downLoadDataChanged (const QString &bytes)
 
void downLoadRawDataChanged (const QByteArray &bytes)
 

Detailed Description

The class of the abstract download data.

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

Definition at line 29 of file musicabstractdownloadrequest.h.

Constructor & Destructor Documentation

MusicAbstractDownLoadRequest::MusicAbstractDownLoadRequest ( const QString &  url,
const QString &  path,
TTK::Download  type,
QObject *  parent = nullptr 
)

Object constructor provide download url save local path and download type.

Definition at line 5 of file musicabstractdownloadrequest.cpp.

References G_DOWNLOAD_MANAGER_PTR, m_file, m_savePath, m_speedTimer, TTK_DN_S2MS, and updateDownloadSpeed().

MusicAbstractDownLoadRequest::~MusicAbstractDownLoadRequest ( )

Object destructor.

Definition at line 25 of file musicabstractdownloadrequest.cpp.

References G_DOWNLOAD_MANAGER_PTR, and m_speedTimer.

Member Function Documentation

void MusicAbstractDownLoadRequest::deleteAll ( )
finaloverridevirtual
void MusicAbstractDownLoadRequest::downLoadFinished ( )
overridevirtualslot
void MusicAbstractDownLoadRequest::downloadProgress ( qint64  bytesReceived,
qint64  bytesTotal 
)
virtualslot
QString MusicAbstractDownLoadRequest::mapCurrentQueryData ( ) const
protected
virtual void MusicAbstractDownLoadRequest::startToRequest ( )
pure virtual
void MusicAbstractDownLoadRequest::updateDownloadSpeed ( )
virtualslot

Member Data Documentation

qint64 MusicAbstractDownLoadRequest::m_currentReceived
protected
TTK::Download MusicAbstractDownLoadRequest::m_downloadType
protected
QFile* MusicAbstractDownLoadRequest::m_file
protected
qint64 MusicAbstractDownLoadRequest::m_hasReceived
protected
QString MusicAbstractDownLoadRequest::m_savePath
protected
QTimer MusicAbstractDownLoadRequest::m_speedTimer
protected
qint64 MusicAbstractDownLoadRequest::m_totalSize
protected
QString MusicAbstractDownLoadRequest::m_url
protected

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