Navigator2Go  2.0
Manage your local Ocean Navigator installation.
QEasyDownloader Class Reference
Inheritance diagram for QEasyDownloader:
Collaboration diagram for QEasyDownloader:

Public Slots

void Download (const QString &, const QString &)
 
void Download (const QString &)
 
void Pause ()
 
void Resume ()
 
bool HasNext ()
 
void Next ()
 

Signals

void Finished ()
 
void Debugger (const QString &)
 
void Paused (const QUrl &, const QString &)
 
void Resumed (const QUrl &, const QString &)
 
void DownloadFinished (const QUrl &, const QString &)
 
void DownloadProgress (qint64, qint64, int, double, const QString &, const QUrl &, const QString &)
 
void Error (QNetworkReply::NetworkError errorCode, const QUrl &url, const QString &fileName)
 
void Timeout (const QUrl &url, const QString &fileName)
 

Public Member Functions

 QEasyDownloader (QObject *parent=nullptr, QNetworkAccessManager *toUseManager=nullptr)
 
void setDebug (bool)
 
void setIterated (bool)
 
void setResumeDownloads (bool)
 
void setTimeoutTime (int)
 
void setRetryTime (int)
 
void setDownloadPath (const QString &qsFolderPath)
 

Private Slots

void download ()
 
void checkHead (qint64, qint64)
 
void finished ()
 
void downloadProgress (qint64, qint64)
 
void startNextDownload ()
 
void retry (QNetworkAccessManager::NetworkAccessibility)
 
void error (QNetworkReply::NetworkError)
 
void printDebug (const QString &)
 
void timeout ()
 
QString saveFileName (const QString &)
 

Private Attributes

QMutex mutex
 
QNetworkAccessManager * _pManager = nullptr
 
QNetworkRequest _CurrentRequest
 
QNetworkReply * _pCurrentReply = nullptr
 
QNetworkReply * _pCurrentGetReply = nullptr
 
QFile * _pFile = nullptr
 
QTimer _Timer
 
QTime _downloadSpeed
 
QUrl _URL
 
QString _qsFileName
 
QString _qsFolderPath
 
QQueue< QStringList > _downloadQueue
 
int _nDownloadTotal = 0
 
int _nDownloadSize = 0
 
int _nDownloadSizeAtPause = 0
 
int _nTimeoutTime = 5000
 
int _nRetryTime = 6000
 
bool _bAcceptRanges = false
 
bool _bStopDownload = false
 
bool _bIsError = false
 
bool _bDoResumeDownloads = true
 
bool _bAutoStartDownload = true
 
bool _bDoIterate = false
 
bool _bCanIterate = false
 
bool _bDoDebug = false
 

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