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

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

#include <musicdownloaddatarequest.h>

+ Inheritance diagram for MusicDownloadDataRequest:

Public Slots

virtual void downLoadFinished () override
 
virtual void downloadProgress (qint64 bytesReceived, qint64 bytesTotal) overridefinal
 
virtual void updateDownloadSpeed () overridefinal
 
void handleReadyRead ()
 
- Public Slots inherited from MusicAbstractDownLoadRequest
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)
 

Signals

void downloadUrlChanged (const QString &url)
 
void downloadSpeedLabelChanged (const QString &speed, qint64 timeLeft)
 
void downloadProgressChanged (float percent, const QString &total, qint64 time)
 
void createDownloadItem (const QString &name, qint64 time)
 
- Signals inherited from TTKAbstractNetwork
void downLoadDataChanged (const QString &bytes)
 
void downLoadRawDataChanged (const QByteArray &bytes)
 

Public Member Functions

 MusicDownloadDataRequest (const QString &url, const QString &path, TTK::Download type, QObject *parent=nullptr)
 
 MusicDownloadDataRequest (const QString &url, const QString &path, TTK::Download type, TTK::Record record, QObject *parent=nullptr)
 
virtual void startToRequest () override
 
- Public Member Functions inherited from MusicAbstractDownLoadRequest
 MusicAbstractDownLoadRequest (const QString &url, const QString &path, TTK::Download type, QObject *parent=nullptr)
 
 ~MusicAbstractDownLoadRequest ()
 
virtual void deleteAll () overridefinal
 
- 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

void startToRequest (const QString &url)
 
- Protected Member Functions inherited from MusicAbstractDownLoadRequest
QString mapCurrentQueryData () const
 

Protected Attributes

qint64 m_createTime
 
bool m_redirection
 
bool m_needUpdate
 
TTK::Record m_recordType
 
- Protected Attributes inherited from MusicAbstractDownLoadRequest
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
 

Detailed Description

The class of the download the type of data.

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

Definition at line 27 of file musicdownloaddatarequest.h.

Constructor & Destructor Documentation

MusicDownloadDataRequest::MusicDownloadDataRequest ( 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 4 of file musicdownloaddatarequest.cpp.

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

Definition at line 10 of file musicdownloaddatarequest.cpp.

Member Function Documentation

void MusicDownloadDataRequest::createDownloadItem ( const QString &  name,
qint64  time 
)
signal

Create download item from download name and total time.

Referenced by startToRequest().

void MusicDownloadDataRequest::downLoadFinished ( )
overridevirtualslot
void MusicDownloadDataRequest::downloadProgress ( qint64  bytesReceived,
qint64  bytesTotal 
)
finaloverridevirtualslot

Get download received and total data.

only download music data or other type can that show progress

Definition at line 103 of file musicdownloaddatarequest.cpp.

References MusicAbstractDownLoadRequest::downloadProgress(), downloadProgressChanged(), m_createTime, MusicAbstractDownLoadRequest::m_downloadType, TTK::Music, TTK::Other, and TTK::Number::sizeByteToLabel().

Referenced by startToRequest().

void MusicDownloadDataRequest::downloadProgressChanged ( float  percent,
const QString &  total,
qint64  time 
)
signal

Update download percent\ total time and current time progress.

Referenced by downloadProgress().

void MusicDownloadDataRequest::downloadSpeedLabelChanged ( const QString &  speed,
qint64  timeLeft 
)
signal

Update download speed label.

Referenced by updateDownloadSpeed().

void MusicDownloadDataRequest::downloadUrlChanged ( const QString &  url)
signal

Update download url finished.

void MusicDownloadDataRequest::handleReadyRead ( )
slot

Download received data ready.

Definition at line 95 of file musicdownloaddatarequest.cpp.

References MusicAbstractDownLoadRequest::m_file, and TTKAbstractNetwork::m_reply.

Referenced by startToRequest().

void MusicDownloadDataRequest::startToRequest ( )
overridevirtual
void MusicDownloadDataRequest::startToRequest ( const QString &  url)
protected
void MusicDownloadDataRequest::updateDownloadSpeed ( )
finaloverridevirtualslot

Member Data Documentation

qint64 MusicDownloadDataRequest::m_createTime
protected

Definition at line 85 of file musicdownloaddatarequest.h.

Referenced by downloadProgress(), and startToRequest().

bool MusicDownloadDataRequest::m_needUpdate
protected
TTK::Record MusicDownloadDataRequest::m_recordType
protected

Definition at line 87 of file musicdownloaddatarequest.h.

Referenced by startToRequest().

bool MusicDownloadDataRequest::m_redirection
protected

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