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)"
42 "<p>" + tr("Released under the <a href='%1'>GNU General Public License</a>")
43 .arg("http://www.gnu.org/licenses/gpl.html") + "</p>"
45 "<p>© 2009 " + Constants::ORG_NAME + "</p>";
46 QLabel *infoLabel = new QLabel(info, this);
47 infoLabel->setOpenExternalLinks(true);
48 infoLabel->setWordWrap(true);
49 layout->addWidget(infoLabel);
51 QLayout *buttonLayout = new QHBoxLayout();
52 buttonLayout->setAlignment(Qt::AlignLeft);
53 QPushButton *closeButton = new QPushButton(tr("&Close"), this);
54 closeButton->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
56 closeButton->setDefault(true);
57 closeButton->setFocus(Qt::OtherFocusReason);
58 connect(closeButton, SIGNAL(clicked()), parent, SLOT(goBack()));
59 buttonLayout->addWidget(closeButton);
61 layout->addLayout(buttonLayout);
65 void AboutView::paintEvent(QPaintEvent * /*event*/) {
67 QPainter painter(this);
70 QLinearGradient linearGrad(0, 0, 0, height());
72 linearGrad.setColorAt(0, palette.color(QPalette::Light));
73 linearGrad.setColorAt(1, palette.color(QPalette::Midlight));
74 painter.fillRect(0, 0, width(), height(), QBrush(linearGrad));