#include "aboutdialog.h" #include "ui_aboutdialog.h" #include "qupzilla.h" #include "webview.h" #include "webpage.h" AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDialog) { ui->setupUi(this); connect(ui->buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(close())); connect(ui->authorsButton, SIGNAL(clicked()), this, SLOT(buttonClicked())); showAbout(); } void AboutDialog::buttonClicked() { if (ui->authorsButton->text() == tr("Authors and Contributors")) showAuthors(); else if (ui->authorsButton->text() == tr("< About QupZilla")) showAbout(); } void AboutDialog::showAbout() { ui->authorsButton->setText(tr("Authors and Contributors")); if (m_aboutHtml.isEmpty()) { m_aboutHtml.append("
Application version %1
").arg(QupZilla::VERSION));
m_aboutHtml.append(tr("WebKit version %1
© %1 %2
All rights reserved.
").arg(QupZilla::COPYRIGHT, QupZilla::AUTHOR));
m_aboutHtml.append(tr("Build time: %1
"+MainApplication::getInstance()->getWindow()->weView()->getPage()->userAgentForUrl(QUrl())+"
"); m_aboutHtml.append("Main developers:
%1 <%2>
Other contributors:
%1
Thanks to:
%1