21 #include <QNetworkAccessManager> |
21 #include <QNetworkAccessManager> |
22 #include <QNetworkRequest> |
22 #include <QNetworkRequest> |
23 #include <QNetworkReply> |
23 #include <QNetworkReply> |
24 #include <QFileInfo> |
24 #include <QFileInfo> |
25 #include <QFileDialog> |
25 #include <QFileDialog> |
26 #include <QTextBrowser> |
|
27 #include <QDebug> |
26 #include <QDebug> |
28 #include <QProgressBar> |
27 #include <QProgressBar> |
29 |
28 |
30 #include "pagedata.h" |
29 #include "pagedata.h" |
|
30 #include "databrowser.h" |
31 |
31 |
32 #include "quazip.h" |
32 #include "quazip.h" |
33 |
33 |
34 PageDataDownload::PageDataDownload(QWidget* parent) : AbstractPage(parent) |
34 PageDataDownload::PageDataDownload(QWidget* parent) : AbstractPage(parent) |
35 { |
35 { |
38 pageLayout->setColumnStretch(1, 1); |
38 pageLayout->setColumnStretch(1, 1); |
39 pageLayout->setColumnStretch(2, 1); |
39 pageLayout->setColumnStretch(2, 1); |
40 |
40 |
41 BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true); |
41 BtnBack = addButton(":/res/Exit.png", pageLayout, 2, 0, true); |
42 |
42 |
43 web = new QTextBrowser(this); |
43 web = new DataBrowser(this); |
44 connect(web, SIGNAL(anchorClicked(QUrl)), this, SLOT(install(const QUrl&))); |
44 connect(web, SIGNAL(anchorClicked(QUrl)), this, SLOT(install(const QUrl&))); |
45 web->setOpenLinks(false); |
45 web->setOpenLinks(false); |
46 pageLayout->addWidget(web, 0, 0, 1, 3); |
46 pageLayout->addWidget(web, 0, 0, 1, 3); |
47 |
47 |
48 progressBarsLayout = new QVBoxLayout(this); |
48 progressBarsLayout = new QVBoxLayout(this); |
113 } |
113 } |
114 } |
114 } |
115 |
115 |
116 void PageDataDownload::fetchList() |
116 void PageDataDownload::fetchList() |
117 { |
117 { |
118 QNetworkRequest newRequest(QUrl("http://hedgewars.org/download.html")); |
118 QNetworkRequest newRequest(QUrl("http://hedgewars.org/node/2833")); |
119 |
119 |
120 QNetworkAccessManager *manager = new QNetworkAccessManager(this); |
120 QNetworkAccessManager *manager = new QNetworkAccessManager(this); |
121 QNetworkReply *reply = manager->get(newRequest); |
121 QNetworkReply *reply = manager->get(newRequest); |
122 connect(reply, SIGNAL(finished()), this, SLOT(pageDownloaded())); |
122 connect(reply, SIGNAL(finished()), this, SLOT(pageDownloaded())); |
123 } |
123 } |