summaryrefslogtreecommitdiffstats
path: root/scribus/downloadmanager/scdlmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scribus/downloadmanager/scdlmgr.cpp')
-rw-r--r--scribus/downloadmanager/scdlmgr.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/scribus/downloadmanager/scdlmgr.cpp b/scribus/downloadmanager/scdlmgr.cpp
new file mode 100644
index 0000000..455011f
--- /dev/null
+++ b/scribus/downloadmanager/scdlmgr.cpp
@@ -0,0 +1,45 @@
+#include "scdlmgr.h"
+#include "scdlthread.h"
+
+#include <QDebug>
+
+#include <QString>
+#include <QStringList>
+#include <QTimer>
+
+#include <stdio.h>
+
+ScDLManager::ScDLManager(QObject *parent)
+ : QObject(parent)
+{
+ thread=new ScDLThread();
+ connect(thread, SIGNAL(received(const QString &)), this, SLOT(updateText(const QString&)));
+ connect(thread, SIGNAL(finished()), this, SIGNAL(finished()));
+}
+
+void ScDLManager::addURL(const QUrl &url, bool overwrite, const QString& location)
+{
+ thread->addURL(url, overwrite, location);
+}
+
+void ScDLManager::addURL(const QString &url, bool overwrite, const QString &location)
+{
+ thread->addURL(QUrl(url), overwrite, location);
+}
+
+void ScDLManager::addURLs(const QStringList &urlList, bool overwrite, const QString &location)
+{
+ thread->addURLs(urlList, overwrite, location);
+}
+
+void ScDLManager::startDownloads()
+{
+ qDebug()<<"Manager starting downloads...";
+ thread->startDownloads();
+}
+
+void ScDLManager::updateText(const QString& t)
+{
+ emit fileReceived(t);
+ qDebug()<<t;
+}