]> git.sur5r.net Git - minitube/blob - src/AboutView.cpp
e9357ea577e8a1f5f09443d2c8ee5a6f447301de
[minitube] / src / AboutView.cpp
1 #include "AboutView.h"
2 #include "Constants.h"
3
4 AboutView::AboutView(QWidget *parent) : QWidget(parent) {
5
6     QBoxLayout *aboutlayout = new QHBoxLayout(this);
7     aboutlayout->setAlignment(Qt::AlignCenter);
8     aboutlayout->setSpacing(30);
9
10     QLabel *logo = new QLabel(this);
11     logo->setPixmap(QPixmap(":/images/app.png"));
12     aboutlayout->addWidget(logo, 0, Qt::AlignTop);
13
14     QBoxLayout *layout = new QVBoxLayout();
15     layout->setAlignment(Qt::AlignCenter);
16     layout->setSpacing(30);
17     aboutlayout->addLayout(layout);
18
19     QString info = "<h1>" + QString(Constants::APP_NAME) + "</h1>"
20                    "<p>" + tr("There's life outside the browser!") + "</p>"
21                    "<p>" + tr("Version %1").arg(Constants::VERSION) + "</p>"
22                    + QString("<p><a href=\"%1/\">%1</a></p>").arg(Constants::WEBSITE) +
23
24                    "<p>" +  tr("%1 is Free Software but its development takes precious time.").arg(Constants::APP_NAME) + "<br/>"
25                    + tr("Please <a href='%1'>donate</a> to support the continued development of %2.")
26                    .arg(QString(Constants::WEBSITE).append("#donate"), Constants::APP_NAME) + "</p>"
27
28                    "<p>" + tr("Report bugs and send in your ideas to %1")
29                    .arg(QString("<a href=\"mailto:%1\">%1</a>").arg(Constants::EMAIL)) + "</p>"
30
31                    "<p>"
32                    + tr("Icon designed by %1.").arg("Sebastian Kraft")
33                    + "<br>" + tr("Compact mode contributed by %1.").arg("Stefan Brück")
34                    + "<br>" + tr("HTTP proxy support contributed by %1.").arg("Kiwamu Okabe")
35                    + "</p>"
36
37                    "<p>" + tr("Translated by %1").arg("Nikita Lyalin (ru_RU), "
38                                                       "Márcio Moraes (pt_BR), "
39                                                       // "Sergio Tocalini Joerg (es_AR), "
40                                                       "Stefan Brück (de_DE), "
41                                                       "Grzegorz Gibas (pl_PL), "
42                                                       "Kiwamu Okabe (ja_JP), "
43                                                       "Dan Vrátil (cs_CZ), "
44                                                       // "Rafa (es_ES), "
45                                                       "Yaron Shahrabani (he_IL), "
46                                                       "Oleksandr Korneta (uk), "
47                                                       "Inga Muste (lat), "
48                                                       "Srecko Belaic (hr_HR), "
49                                                       "Miguel Anxo Bouzada (es, gl), "
50                                                       "Guillaume Betous & Mathieu Dimanche (fr_FR), "
51                                                       "Krisztián Horváth (hu_HU), "
52                                                       "Ali E. İmrek (tr_TR), "
53                                                       "Jan W. Skjoldal & Halvor Lyche Strandvoll (nb_NO), "
54                                                       "Ovidiu Niţan (ro_RO), "
55                                                       "Giorgos Skettos (el_GR), "
56                                                       "Brian Keetman (nl_NL), "
57                                                       "Sderawi (ar), "
58                                                       "Daniel Rodrigues (pt_PT), "
59                                                       "Jesse Jaara (fi_FI), "
60                                                       "Tsvyatko Makazchiev (bg_BG)"
61                                                       ) + "</p>"
62
63                    "<p>" + tr("Released under the <a href='%1'>GNU General Public License</a>")
64                    .arg("http://www.gnu.org/licenses/gpl.html") + "</p>"
65
66                    "<p>&copy; 2009-2010 " + Constants::ORG_NAME + "</p>";
67     QLabel *infoLabel = new QLabel(info, this);
68     infoLabel->setOpenExternalLinks(true);
69     infoLabel->setWordWrap(true);
70     layout->addWidget(infoLabel);
71
72     QLayout *buttonLayout = new QHBoxLayout();
73     buttonLayout->setAlignment(Qt::AlignLeft);
74     QPushButton *closeButton = new QPushButton(tr("&Close"), this);
75     closeButton->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
76
77     closeButton->setDefault(true);
78     closeButton->setFocus(Qt::OtherFocusReason);
79     connect(closeButton, SIGNAL(clicked()), parent, SLOT(goBack()));
80     buttonLayout->addWidget(closeButton);
81
82     layout->addLayout(buttonLayout);
83
84 }