aboutsummaryrefslogtreecommitdiff
path: root/src/downloadmanagerwidget.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/downloadmanagerwidget.h')
-rw-r--r--src/downloadmanagerwidget.h36
1 files changed, 20 insertions, 16 deletions
diff --git a/src/downloadmanagerwidget.h b/src/downloadmanagerwidget.h
index 4a8d059..76464e8 100644
--- a/src/downloadmanagerwidget.h
+++ b/src/downloadmanagerwidget.h
@@ -53,9 +53,9 @@
#include "ui_downloadmanagerwidget.h"
-#include <QWidget>
-#include <QSettings>
#include "utils.h"
+#include <QSettings>
+#include <QWidget>
QT_BEGIN_NAMESPACE
class QWebEngineDownloadItem;
@@ -64,28 +64,32 @@ QT_END_NAMESPACE
class DownloadWidget;
// Displays a list of downloads.
-class DownloadManagerWidget final : public QWidget, public Ui::DownloadManagerWidget
-{
- Q_OBJECT
+class DownloadManagerWidget final : public QWidget,
+ public Ui::DownloadManagerWidget {
+ Q_OBJECT
public:
- explicit DownloadManagerWidget(QWidget *parent = nullptr);
+ explicit DownloadManagerWidget(QWidget *parent = nullptr);
- // Prompts user with a "Save As" dialog. If the user doesn't cancel it, then
- // the QWebEngineDownloadItem will be accepted and the DownloadManagerWidget
- // will be shown on the screen.
- void downloadRequested(QWebEngineDownloadItem *webItem);
+ // Prompts user with a "Save As" dialog. If the user doesn't cancel it, then
+ // the QWebEngineDownloadItem will be accepted and the DownloadManagerWidget
+ // will be shown on the screen.
+ void downloadRequested(QWebEngineDownloadItem *webItem);
protected slots:
- void keyPressEvent(QKeyEvent *e);
+ void keyPressEvent(QKeyEvent *e);
private slots:
- void on_open_download_dir_clicked();
+ void on_open_download_dir_clicked();
+
+ void acceptDownload(QWebEngineDownloadItem *download);
+
+ void on_clear_all_downlads_clicked();
private:
- void add(DownloadWidget *downloadWidget);
- void remove(DownloadWidget *downloadWidget);
+ void add(DownloadWidget *downloadWidget);
+ void remove(DownloadWidget *downloadWidget);
- int m_numDownloads;
- QSettings settings;
+ int m_numDownloads;
+ QSettings settings;
};
#endif // DOWNLOADMANAGERWIDGET_H