summaryrefslogtreecommitdiff
path: root/utils/themeeditor/gui/targetdownloader.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/themeeditor/gui/targetdownloader.h')
-rw-r--r--utils/themeeditor/gui/targetdownloader.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/utils/themeeditor/gui/targetdownloader.h b/utils/themeeditor/gui/targetdownloader.h
new file mode 100644
index 0000000000..0d2c4578b6
--- /dev/null
+++ b/utils/themeeditor/gui/targetdownloader.h
@@ -0,0 +1,60 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2010 Robert Bieber
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#ifndef TARGETDOWNLOADER_H
23#define TARGETDOWNLOADER_H
24
25#include <QDialog>
26#include <QDir>
27#include <QNetworkAccessManager>
28#include <QNetworkReply>
29
30namespace Ui {
31 class TargetDownloader;
32}
33
34class TargetDownloader : public QDialog {
35 Q_OBJECT
36public:
37 TargetDownloader(QWidget *parent, QString dir);
38 virtual ~TargetDownloader();
39
40private slots:
41 void cancel();
42
43 void dataReceived();
44 void progress(qint64 bytes, qint64 available);
45 void finished();
46 void netError(QNetworkReply::NetworkError code);
47
48private:
49 void closeEvent(QCloseEvent *event);
50
51 Ui::TargetDownloader *ui;
52
53 QNetworkAccessManager* manager;
54 QFile fout;
55 QNetworkReply* reply;
56
57 bool cancelled;
58};
59
60#endif // TARGETDOWNLOADER_H