aboutsummaryrefslogtreecommitdiff
path: root/src/webengine
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-02-23 17:19:32 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2017-02-23 17:19:32 +0100
commitabd011f7cf8d298b8bbbe30eedb329094d43c0b9 (patch)
tree300909ce22e5c356a4735dbedaf795a594055c9e /src/webengine
parentMinor features (diff)
downloadsmolbote-abd011f7cf8d298b8bbbe30eedb329094d43c0b9.tar.xz
Download manager improvements
Added shortcut for download dialog Dialog has proper title Settings replaces ~ with home location Showing download item details
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/downloaditemform.cpp7
-rw-r--r--src/webengine/downloaditemform.h3
-rw-r--r--src/webengine/downloaditemform.ui2
3 files changed, 11 insertions, 1 deletions
diff --git a/src/webengine/downloaditemform.cpp b/src/webengine/downloaditemform.cpp
index f2928f7..599ea08 100644
--- a/src/webengine/downloaditemform.cpp
+++ b/src/webengine/downloaditemform.cpp
@@ -28,6 +28,8 @@ DownloadItemForm::DownloadItemForm(QWebEngineDownloadItem *item, QWidget *parent
QWidget(parent),
ui(new Ui::DownloadItemForm)
{
+ m_item = item;
+
ui->setupUi(this);
ui->url_lineEdit->setText(item->url().toString());
@@ -41,6 +43,11 @@ DownloadItemForm::~DownloadItemForm()
delete ui;
}
+QWebEngineDownloadItem *DownloadItemForm::item() const
+{
+ return m_item;
+}
+
void DownloadItemForm::updateState(QWebEngineDownloadItem::DownloadState state)
{
switch (state) {
diff --git a/src/webengine/downloaditemform.h b/src/webengine/downloaditemform.h
index 841e8bf..0b987b9 100644
--- a/src/webengine/downloaditemform.h
+++ b/src/webengine/downloaditemform.h
@@ -36,6 +36,8 @@ public:
explicit DownloadItemForm(QWebEngineDownloadItem *item, QWidget *parent = 0);
~DownloadItemForm();
+ QWebEngineDownloadItem *item() const;
+
private slots:
void updateState(QWebEngineDownloadItem::DownloadState state);
void updateProgress(qint64 value, qint64 total);
@@ -43,6 +45,7 @@ private slots:
private:
Ui::DownloadItemForm *ui;
+ QWebEngineDownloadItem *m_item;
};
#endif // DOWNLOADITEMFORM_H
diff --git a/src/webengine/downloaditemform.ui b/src/webengine/downloaditemform.ui
index 5aa46bd..d06dcf4 100644
--- a/src/webengine/downloaditemform.ui
+++ b/src/webengine/downloaditemform.ui
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>600</width>
+ <width>500</width>
<height>80</height>
</rect>
</property>