Scribus
Open source desktop publishing at your fingertips
scdlmgr.h
1 #ifndef SCDLMANAGER_H
2 #define SCDLMANAGER_H
3 
4 #include <QDialog>
5 #include <QFile>
6 #include <QList>
7 #include <QNetworkAccessManager>
8 #include <QObject>
9 #include <QQueue>
10 #include <QStringList>
11 #include <QThread>
12 #include <QTime>
13 #include <QUrl>
14 
15 #include "scdlthread.h"
16 #include "scribusstructs.h"
17 
18 class ScDLManager: public QObject
19 {
20  Q_OBJECT
21  public:
22  ScDLManager(QObject *parent = 0);
23  ~ScDLManager();
24 //TODO: Add download groups so different parts of Scribus can be downloading at the same time
25 
26  void addURL(const QUrl &url, bool overwrite, const QString &downloadLocation, const QString& destinationLocation, const QString& destinationName="");
27  void addURL(const QString &url, bool overwrite, const QString &downloadLocation, const QString& destinationLocation, const QString& destinationName="");
28  void addURLs(const QStringList &urlList, bool overwrite, const QString &downloadLocation, const QString& destinationLocation);
29  void startDownloads();
30 
31  public slots:
32  void dlStarted(const QString& filename);
33  void dlReceived(const QString& filename);
34  void dlFailed(const QString& filename);
35 
36  protected slots:
37  void moveFinishedDownloads();
38 
39  signals:
40  void finished();
41  void fileReceived(const QString& t);
42  void fileFailed(const QString& t);
43 
44  private:
45  ScDLThread *thread;
46  int dlID;
47  QList <DownloadData> fileList;
48 };
49 
50 #endif
Definition: scdlmgr.h:18
Definition: scdlthread.h:13