21 #include <QtCore/QObject>
22 #include <QtNetwork/QNetworkAccessManager>
23 #include <QtCore/QUrl>
24 #include <QtCore/QMap>
25 #include <tulip/tulipconf.h>
30 class TLP_QT_SCOPE DownloadManager:
public QNetworkAccessManager {
32 QList<QNetworkReply *> currentDownloads;
33 QMap<QUrl, QString> downloadDestinations;
35 static DownloadManager* _instance;
38 static DownloadManager* getInstance();
39 QNetworkReply* downloadPlugin(
const QUrl &url,
const QString& destination);
40 bool saveToDisk(
const QString &filename, QIODevice *data);
43 void downloadFinished(QNetworkReply *reply);