4 AboutView::AboutView(QWidget *parent) : QWidget(parent) {
6 QBoxLayout *aboutlayout = new QHBoxLayout(this);
7 aboutlayout->setAlignment(Qt::AlignCenter);
8 aboutlayout->setMargin(30);
9 aboutlayout->setSpacing(30);
11 QLabel *logo = new QLabel(this);
12 logo->setPixmap(QPixmap(":/images/app.png"));
13 aboutlayout->addWidget(logo, 0, Qt::AlignTop);
15 QBoxLayout *layout = new QVBoxLayout();
16 layout->setAlignment(Qt::AlignCenter);
17 layout->setSpacing(30);
18 aboutlayout->addLayout(layout);
20 QString info = "<html><style>a { color: palette(text); text-decoration: none; font-weight: bold }</style><body><h1>" + QString(Constants::NAME) + "</h1>"
21 "<p>" + tr("There's life outside the browser!") + "</p>"
22 "<p>" + tr("Version %1").arg(Constants::VERSION) + "</p>"
23 + QString("<p><a href=\"%1/\">%1</a></p>").arg(Constants::WEBSITE) +
25 #if !defined(APP_MAC) && !defined(APP_WIN)
26 "<p>" + tr("%1 is Free Software but its development takes precious time.").arg(Constants::NAME) + "<br/>"
27 + tr("Please <a href='%1'>donate</a> to support the continued development of %2.")
28 .arg(QString(Constants::WEBSITE).append("#donate"), Constants::NAME) + "</p>"
31 "<p>" + tr("You may want to try my other apps as well:") + "</p>"
34 + "<li>" + tr("%1, a YouTube music player")
35 .arg("<a href='http://flavio.tordini.org/musictube'>Musictube</a>")
38 + "<li>" + tr("%1, a music player")
39 .arg("<a href='http://flavio.tordini.org/musique'>Musique</a>")
44 "<p>" + tr("Translate %1 to your native language using %2").arg(Constants::NAME)
45 .arg("<a href='http://www.transifex.net/projects/p/" + QString(Constants::UNIX_NAME) + "/resource/main/'>Transifex</a>")
49 + tr("Icon designed by %1.").arg("<a href='http://www.kolorguild.com/'>David Nel</a>")
52 #if !defined(APP_MAC) && !defined(APP_WIN)
53 "<p>" + tr("Released under the <a href='%1'>GNU General Public License</a>")
54 .arg("http://www.gnu.org/licenses/gpl.html") + "</p>"
56 "<p>© 2009-2011 " + Constants::ORG_NAME + "</p>"
58 QLabel *infoLabel = new QLabel(info, this);
59 infoLabel->setOpenExternalLinks(true);
60 infoLabel->setWordWrap(true);
61 layout->addWidget(infoLabel);
63 QLayout *buttonLayout = new QHBoxLayout();
64 buttonLayout->setAlignment(Qt::AlignLeft);
65 QPushButton *closeButton = new QPushButton(tr("&Close"), this);
66 closeButton->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
68 closeButton->setDefault(true);
69 closeButton->setFocus(Qt::OtherFocusReason);
70 connect(closeButton, SIGNAL(clicked()), parent, SLOT(goBack()));
71 buttonLayout->addWidget(closeButton);
73 layout->addLayout(buttonLayout);
77 void AboutView::paintEvent(QPaintEvent * /*event*/) {
78 #if defined(APP_MAC) | defined(APP_WIN)
80 if (window()->isActiveWindow()) {
81 brush = QBrush(QColor(0xdd, 0xe4, 0xeb));
83 brush = palette().window();
85 QPainter painter(this);
86 painter.fillRect(0, 0, width(), height(), brush);