#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("
"); m_aboutHtml.append(tr("

Application version %1
").arg(QupZilla::VERSION)); m_aboutHtml.append(tr("WebKit version %1

").arg(QupZilla::WEBKITVERSION)); m_aboutHtml.append(tr("

© %1 %2
All rights reserved.
").arg(QupZilla::COPYRIGHT, QupZilla::AUTHOR)); m_aboutHtml.append(tr("Build time: %1

").arg(QupZilla::BUILDTIME)); m_aboutHtml.append(QString("

%1

").arg(QupZilla::WWWADDRESS)); m_aboutHtml.append("

"+MainApplication::getInstance()->getWindow()->weView()->getPage()->userAgentForUrl(QUrl())+"

"); m_aboutHtml.append("
"); } ui->textBrowser->setHtml(m_aboutHtml); } void AboutDialog::showAuthors() { ui->authorsButton->setText(tr("< About QupZilla")); if (m_authorsHtml.isEmpty()) { m_authorsHtml.append("
"); m_authorsHtml.append(tr("

Main developers:
%1 <%2>

").arg(QupZilla::AUTHOR, "nowrep@gmail.com")); m_authorsHtml.append(tr("

Other contributors:
%1

").arg("Rajny :: Graphics
Mikino :: Slovakia Translation")); m_authorsHtml.append(tr("

Thanks to:
%1

").arg("Patrick :: First User")); m_authorsHtml.append("
"); } ui->textBrowser->setHtml(m_authorsHtml); } AboutDialog::~AboutDialog() { delete ui; }