4 AboutView::AboutView(QWidget *parent) : QWidget(parent) {
6 QBoxLayout *aboutlayout = new QHBoxLayout(this);
7 aboutlayout->setAlignment(Qt::AlignCenter);
8 aboutlayout->setSpacing(30);
10 QLabel *logo = new QLabel(this);
11 logo->setPixmap(QPixmap(":/images/app.png"));
12 aboutlayout->addWidget(logo, 0, Qt::AlignTop);
14 QBoxLayout *layout = new QVBoxLayout();
15 layout->setAlignment(Qt::AlignCenter);
16 layout->setSpacing(30);
17 aboutlayout->addLayout(layout);
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) +
24 "<p>" + tr("This is a \"Technology Preview\" release, do not expect it to be perfect.") + "<br/>"
25 + tr("Report bugs and send in your ideas to %1")
26 .arg(QString("<a href=\"mailto:%1\">%1</a>").arg(Constants::EMAIL)) + "</p>"
28 "<p>" + tr("%1 is Free Software but its development takes precious time.").arg(Constants::APP_NAME) + "<br/>"
29 + tr("Please <a href='%1'>donate via PayPal</a> to support the continued development of %2.")
30 .arg(QString(Constants::WEBSITE).append("#donate"), Constants::APP_NAME) + "</p>"
32 "<p>" + tr("Icon designed by %1.").arg("Sebastian Kraft") + "</p>"
34 "<p>" + tr("Compact mode contributed by %1.").arg("Stefan Brück") + "</p>"
36 "<p>" + tr("Translated by %1").arg("Nikita Lyalin (ru_RU), "
37 "Márcio Moraes (pt_BR), "
38 "Sergio Tocalini Joerg (es_AR), "
39 "Stefan Brück (de_DE), "
40 "Grzegorz Gibas (pl_PL), "
41 "Kiwamu Okabe (ja_JP), "
42 "Dan Vrátil (cs_CZ), "
44 "Yaron Shahrabani (he_IL), "
45 "Oleksandr Korneta (uk)"
48 "<p>" + tr("Released under the <a href='%1'>GNU General Public License</a>")
49 .arg("http://www.gnu.org/licenses/gpl.html") + "</p>"
51 "<p>© 2009 " + Constants::ORG_NAME + "</p>";
52 QLabel *infoLabel = new QLabel(info, this);
53 infoLabel->setOpenExternalLinks(true);
54 infoLabel->setWordWrap(true);
55 layout->addWidget(infoLabel);
57 QLayout *buttonLayout = new QHBoxLayout();
58 buttonLayout->setAlignment(Qt::AlignLeft);
59 QPushButton *closeButton = new QPushButton(tr("&Close"), this);
60 closeButton->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
62 closeButton->setDefault(true);
63 closeButton->setFocus(Qt::OtherFocusReason);
64 connect(closeButton, SIGNAL(clicked()), parent, SLOT(goBack()));
65 buttonLayout->addWidget(closeButton);
67 layout->addLayout(buttonLayout);
71 void AboutView::paintEvent(QPaintEvent * /*event*/) {
73 QPainter painter(this);
76 QLinearGradient linearGrad(0, 0, 0, height());
78 linearGrad.setColorAt(0, palette.color(QPalette::Light));
79 linearGrad.setColorAt(1, palette.color(QPalette::Midlight));
80 painter.fillRect(0, 0, width(), height(), QBrush(linearGrad));