1 /* |
1 /* |
2 * Hedgewars, a free turn based strategy game |
2 * Hedgewars, a free turn based strategy game |
3 * Copyright (c) 2004-2013 Andrey Korotaev <unC0Rr@gmail.com> |
3 * Copyright (c) 2004-2015 Andrey Korotaev <unC0Rr@gmail.com> |
4 * |
4 * |
5 * This program is free software; you can redistribute it and/or modify |
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 |
6 * it under the terms of the GNU General Public License as published by |
7 * the Free Software Foundation; version 2 of the License |
7 * the Free Software Foundation; version 2 of the License |
8 * |
8 * |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. |
12 * GNU General Public License for more details. |
13 * |
13 * |
14 * You should have received a copy of the GNU General Public License |
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 |
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 |
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
17 */ |
17 */ |
18 |
18 |
19 #include <QGridLayout> |
19 #include <QGridLayout> |
20 #include <QPushButton> |
20 #include <QPushButton> |
21 #include <QNetworkAccessManager> |
21 #include <QNetworkAccessManager> |
46 progressBarsLayout = new QVBoxLayout(); |
47 progressBarsLayout = new QVBoxLayout(); |
47 pageLayout->addLayout(progressBarsLayout, 1, 0, 1, 3); |
48 pageLayout->addLayout(progressBarsLayout, 1, 0, 1, 3); |
48 return pageLayout; |
49 return pageLayout; |
49 } |
50 } |
50 |
51 |
|
52 QLayout * PageDataDownload::footerLayoutDefinition() |
|
53 { |
|
54 QHBoxLayout * bottomLayout = new QHBoxLayout(); |
|
55 bottomLayout->setStretch(0, 1); |
|
56 |
|
57 pbOpenDir = addButton(tr("Open packages directory"), bottomLayout, 1, false); |
|
58 |
|
59 bottomLayout->setStretch(2, 1); |
|
60 |
|
61 return bottomLayout; |
|
62 } |
|
63 |
51 void PageDataDownload::connectSignals() |
64 void PageDataDownload::connectSignals() |
52 { |
65 { |
53 connect(web, SIGNAL(anchorClicked(QUrl)), this, SLOT(request(const QUrl&))); |
66 connect(web, SIGNAL(anchorClicked(QUrl)), this, SLOT(request(const QUrl&))); |
54 connect(this, SIGNAL(goBack()), this, SLOT(onPageLeave())); |
67 connect(this, SIGNAL(goBack()), this, SLOT(onPageLeave())); |
|
68 connect(pbOpenDir, SIGNAL(clicked()), this, SLOT(openPackagesDir())); |
55 } |
69 } |
56 |
70 |
57 PageDataDownload::PageDataDownload(QWidget* parent) : AbstractPage(parent) |
71 PageDataDownload::PageDataDownload(QWidget* parent) : AbstractPage(parent) |
58 { |
72 { |
59 initPage(); |
73 initPage(); |