author | unc0rr |
Tue, 22 Nov 2011 19:34:15 +0300 | |
changeset 6412 | 4b9a59116535 |
parent 6060 | fdfc01419815 |
child 6616 | f77bb02b669f |
permissions | -rw-r--r-- |
5271 | 1 |
/* |
2 |
* Hedgewars, a free turn based strategy game |
|
3 |
* Copyright (c) 2006-2011 Andrey Korotaev <unC0Rr@gmail.com> |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or modify |
|
6 |
* it under the terms of the GNU General Public License as published by |
|
7 |
* the Free Software Foundation; version 2 of the License |
|
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU General Public License |
|
15 |
* along with this program; if not, write to the Free Software |
|
16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
|
17 |
*/ |
|
18 |
||
19 |
#ifndef PAGE_DATA_H |
|
20 |
#define PAGE_DATA_H |
|
5746
fbc52bb92cad
Use QTextBrowser instead of WebKit for downloadable contents page (currently only shows the page itself)
unc0rr
parents:
5582
diff
changeset
|
21 |
|
5567
44c9a577b082
Tiny bit of progress on download page - hooked it up to "Info" button for now.
nemo
parents:
5271
diff
changeset
|
22 |
#include <QUrl> |
5271 | 23 |
#include "AbstractPage.h" |
24 |
||
5755
a079b4dea081
Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
5754
diff
changeset
|
25 |
class DataBrowser; |
5754 | 26 |
class QProgressBar; |
27 |
class QNetworkReply; |
|
28 |
class QVBoxLayout; |
|
5746
fbc52bb92cad
Use QTextBrowser instead of WebKit for downloadable contents page (currently only shows the page itself)
unc0rr
parents:
5582
diff
changeset
|
29 |
|
5271 | 30 |
class PageDataDownload : public AbstractPage |
31 |
{ |
|
32 |
Q_OBJECT |
|
33 |
||
34 |
public: |
|
35 |
PageDataDownload(QWidget* parent = 0); |
|
36 |
||
5754 | 37 |
public slots: |
38 |
void fetchList(); |
|
39 |
||
6042
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
40 |
protected: |
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
41 |
QLayout * bodyLayoutDefinition(); |
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
42 |
void connectSignals(); |
8b5345758f62
some more cleanups/refactoring/blahblah, some button positions may are a bit off atm. also I added a new picture for one of the buttons
sheepluva
parents:
6009
diff
changeset
|
43 |
|
5754 | 44 |
private: |
5755
a079b4dea081
Implement DataBrowser which downloads resources (images, css) on its own.
unc0rr
parents:
5754
diff
changeset
|
45 |
DataBrowser *web; |
5754 | 46 |
QHash<QNetworkReply*, QProgressBar *> progressBars; |
47 |
QVBoxLayout *progressBarsLayout; |
|
5567
44c9a577b082
Tiny bit of progress on download page - hooked it up to "Info" button for now.
nemo
parents:
5271
diff
changeset
|
48 |
|
5756 | 49 |
bool extractDataPack(QByteArray * buf); |
50 |
||
5582
48ced03a9949
Properly implement slot, connect signal from the object which actually sends it to the slot
unc0rr
parents:
5567
diff
changeset
|
51 |
private slots: |
5765
e87f6756773e
Allow surfing, download and extract only .zip files
unc0rr
parents:
5756
diff
changeset
|
52 |
void request(const QUrl &url); |
5746
fbc52bb92cad
Use QTextBrowser instead of WebKit for downloadable contents page (currently only shows the page itself)
unc0rr
parents:
5582
diff
changeset
|
53 |
|
5754 | 54 |
void pageDownloaded(); |
55 |
void fileDownloaded(); |
|
56 |
void downloadProgress(qint64, qint64); |
|
5271 | 57 |
}; |
58 |
||
59 |
#endif |