aboutsummaryrefslogtreecommitdiff
path: root/src/downloadwidget.h
diff options
context:
space:
mode:
authorLibravatar Mubashshir <ahm@jadupc.com>2023-09-19 02:01:41 +0600
committerLibravatar Mubashshir <ahm@jadupc.com>2023-09-19 02:01:41 +0600
commit36d10b4b6359b5cf3ff0e37f2330dfaf91cbf530 (patch)
treecad68505e3dcff4e8d37c5a6a052240d8a935efb /src/downloadwidget.h
parent35d85d38d02d97e1c63729bb3301f46bb6f96728 (diff)
parent906ca7eb436dc9944d43f5b7f6ae7b44afc2a3e7 (diff)
downloadwhatsie-36d10b4b6359b5cf3ff0e37f2330dfaf91cbf530.tar.gz
whatsie-36d10b4b6359b5cf3ff0e37f2330dfaf91cbf530.zip
Update upstream source from tag 'upstream/4.14.1'
Update to upstream version '4.14.1' with Debian dir 267b96a979689ac47077c72b576cf79da29f8ff2
Diffstat (limited to 'src/downloadwidget.h')
-rw-r--r--src/downloadwidget.h32
1 files changed, 18 insertions, 14 deletions
diff --git a/src/downloadwidget.h b/src/downloadwidget.h
index 074a979..4417cb4 100644
--- a/src/downloadwidget.h
+++ b/src/downloadwidget.h
@@ -54,36 +54,40 @@
#include "ui_downloadwidget.h"
#include "widgets/elidedlabel/elidedlabel.h"
-
+#include <QElapsedTimer>
#include <QFrame>
#include <QTime>
-#include <QElapsedTimer>
QT_BEGIN_NAMESPACE
class QWebEngineDownloadItem;
QT_END_NAMESPACE
// Displays one ongoing or finished download (QWebEngineDownloadItem).
-class DownloadWidget final : public QFrame, public Ui::DownloadWidget
-{
- Q_OBJECT
+class DownloadWidget final : public QFrame, public Ui::DownloadWidget {
+ Q_OBJECT
public:
- // Precondition: The QWebEngineDownloadItem has been accepted.
- explicit DownloadWidget(QWebEngineDownloadItem *download, QWidget *parent = nullptr);
+ // Precondition: The QWebEngineDownloadItem has been accepted.
+ explicit DownloadWidget(QWebEngineDownloadItem *download,
+ QWidget *parent = nullptr);
+public slots:
+ // Return true if downloadItem state is InProgress
+ bool isDownloading();
+ // Remove downloadItem, updating the download manager
+ void remove();
signals:
- // This signal is emitted when the user indicates that they want to remove
- // this download from the downloads list.
- void removeClicked(DownloadWidget *self);
+ // This signal is emitted when the user indicates that they want to remove
+ // this download from the downloads list.
+ void removeClicked(DownloadWidget *self);
private slots:
- void updateWidget();
+ void updateWidget();
private:
- QString withUnit(qreal bytes);
+ QString withUnit(qreal bytes);
- QWebEngineDownloadItem *m_download;
- QElapsedTimer m_timeAdded;
+ QWebEngineDownloadItem *m_download;
+ QElapsedTimer m_timeAdded;
};
#endif // DOWNLOADWIDGET_H