diff options
author | Robert Bieber <robby@bieberphoto.com> | 2010-07-21 07:45:29 +0000 |
---|---|---|
committer | Robert Bieber <robby@bieberphoto.com> | 2010-07-21 07:45:29 +0000 |
commit | 7c52284b294cb33bc2e5d747e2e3c14d8ab937ae (patch) | |
tree | ba7bbf82a8ca0852deee158068330365f0f97e97 /utils/themeeditor/gui/fontdownloader.h | |
parent | b72f475d44cf83c10c99eaf765b1c55cfdc00bb0 (diff) | |
download | rockbox-7c52284b294cb33bc2e5d747e2e3c14d8ab937ae.tar.gz rockbox-7c52284b294cb33bc2e5d747e2e3c14d8ab937ae.zip |
Theme Editor: Implemented download and decompression of font pack in the preferences dialog. Dialog will also allow the user to set a directory for a custom target database, but the update button doesn't work yet. Also fixed the file filters for open file/open project actions and resized the preferences dialog
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27509 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/gui/fontdownloader.h')
-rw-r--r-- | utils/themeeditor/gui/fontdownloader.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/utils/themeeditor/gui/fontdownloader.h b/utils/themeeditor/gui/fontdownloader.h new file mode 100644 index 0000000000..acd8ea54b3 --- /dev/null +++ b/utils/themeeditor/gui/fontdownloader.h | |||
@@ -0,0 +1,59 @@ | |||
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 FONTDOWNLOADER_H | ||
23 | #define FONTDOWNLOADER_H | ||
24 | |||
25 | #include <QDialog> | ||
26 | #include <QDir> | ||
27 | #include <QNetworkAccessManager> | ||
28 | #include <QNetworkReply> | ||
29 | |||
30 | namespace Ui { | ||
31 | class FontDownloader; | ||
32 | } | ||
33 | |||
34 | class FontDownloader : public QDialog { | ||
35 | Q_OBJECT | ||
36 | public: | ||
37 | FontDownloader(QWidget *parent, QString dir); | ||
38 | virtual ~FontDownloader(); | ||
39 | |||
40 | private 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 | |||
48 | private: | ||
49 | void closeEvent(QCloseEvent *event); | ||
50 | |||
51 | Ui::FontDownloader *ui; | ||
52 | |||
53 | QNetworkAccessManager* manager; | ||
54 | QDir dir; | ||
55 | QFile fout; | ||
56 | QNetworkReply* reply; | ||
57 | }; | ||
58 | |||
59 | #endif // FONTDOWNLOADER_H | ||