25#include <QNetworkReply>
26#include <QElapsedTimer>
28#include <QElapsedTimer>
38class QWebEngineDownloadRequest;
47 explicit DownloadItem(QListWidgetItem* item, QWebEngineDownloadRequest* downloadItem,
const QString &path,
const QString &fileName,
bool openFile,
DownloadManager* manager);
55 QString fileName()
const;
57 void setDownTimer(
const QElapsedTimer &timer) { m_downTimer = timer; }
59 void startDownloading();
61 static QString remaingTimeToString(QTime time);
62 static QString currentSpeedToString(
double speed);
70 void parentResized(
const QSize &size);
72 void receivedOrTotalBytesChanged();
77 void customContextMenuRequested(
const QPoint &pos);
80 void copyDownloadLink();
83 void updateDownloadInfo(
double currSpeed, qint64 received, qint64 total);
84 void mouseDoubleClickEvent(QMouseEvent* e)
override;
88 QListWidgetItem* m_item;
89 QWebEngineDownloadRequest* m_download;
92 QElapsedTimer m_downTimer;
98 bool m_downloadStopped;
QTime remainingTime() const
void setDownTimer(const QElapsedTimer &timer)
void downloadFinished(bool success)
bool isDownloading() const
void deleteItem(DownloadItem *)
void progressChanged(double currSpeed, qint64 received, qint64 total)
double currentSpeed() const