/* ============================================================ * Falkon - Qt web browser * Copyright (C) 2010-2017 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * ============================================================ */ #include "aboutdialog.h" #include "ui_aboutdialog.h" #include "browserwindow.h" #include "mainapplication.h" #include "tabbedwebview.h" #include "webpage.h" #include "useragentmanager.h" #include #include #ifdef Q_OS_WIN #include #endif AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent) , ui(new Ui::AboutDialog) , m_showingAuthors(false) { setAttribute(Qt::WA_DeleteOnClose); ui->setupUi(this); ui->label->setPixmap(QIcon(QSL(":icons/other/about.png")).pixmap(300, 130)); #ifdef Q_OS_WIN if (QtWin::isCompositionEnabled()) { QtWin::extendFrameIntoClientArea(this, -1, -1, -1, -1); ui->verticalLayout->setContentsMargins(0, 0, 0, 0); } #endif connect(ui->buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(close())); connect(ui->authorsButton, SIGNAL(clicked()), this, SLOT(buttonClicked())); showAbout(); #ifdef Q_OS_WIN resize(300, height()); #endif } void AboutDialog::buttonClicked() { if (m_showingAuthors) showAbout(); else showAuthors(); } void AboutDialog::showAbout() { m_showingAuthors = false; ui->authorsButton->setText(tr("Authors and Contributors")); if (m_aboutHtml.isEmpty()) { m_aboutHtml += "
"; m_aboutHtml += tr("

Application version %1
").arg( #ifdef GIT_REVISION QString("%1 (%2)").arg(Qz::VERSION, GIT_REVISION) #else Qz::VERSION #endif ); m_aboutHtml += tr("QtWebEngine version %1

").arg(qVersion()); m_aboutHtml += QString("

© %1 %2
").arg(Qz::COPYRIGHT, Qz::AUTHOR); m_aboutHtml += QString("%1

").arg(Qz::WWWADDRESS); m_aboutHtml += "

" + mApp->userAgentManager()->defaultUserAgent() + "

"; m_aboutHtml += "
"; } ui->textBrowser->setHtml(m_aboutHtml); } void AboutDialog::showAuthors() { m_showingAuthors = true; ui->authorsButton->setText(tr("< About Falkon")); if (m_authorsHtml.isEmpty()) { m_authorsHtml += "
"; m_authorsHtml += tr("

Main developer:
%1 <%2>

").arg(Qz::AUTHOR, "nowrep@gmail.com"); m_authorsHtml += tr("

Contributors:
%1

").arg( QString::fromUtf8("Mladen Pejaković
" "Seyyed Razi Alavizadeh
" "Adrien Vigneron
" "Elio Qoshi
" "Alexander Samilov
" "Franz Fellner
" "Bryan M Dunsmore
" "Mariusz Fik
" "Daniele Cocca") ); m_authorsHtml += tr("

Translators:
%1

").arg( QString::fromUtf8("Heimen Stoffels
" "Peter Vacula
" "Jonathan Hooverman
" "Federico Fabiani
" "Francesco Marinucci
" "Jorge Sevilla
" "Ștefan Comănescu
" "Michał Szymanowski
" "Mariusz Fik
" "Jérôme Giry
" "Nicolas Ourceau
" "Vasilis Tsivikis
" "Rustam Salakhutdinov
" "Oleg Brezhnev
" "Sérgio Marques
" "Alexandre Carvalho
" "Mladen Pejaković
" "Unink-Lio
" "Wu Cheng-Hong
" "Widya Walesa
" "Beqa Arabuli
" "Daiki Noda
" "Gábor Oberle
" "Piccoro McKay Lenz
" "Stanislav Kuznietsov
" "Seyyed Razi Alavizadeh
" "Guillem Prats
" "Clara Villalba
" "Yu Hai
" "Muhammad Fawwaz Orabi
" "Lasso Kante
" "Kizito Birabwa
" "Juan Carlos Sánchez
" "Xabier Aramendi
" "Ferhat AYDIN") ); m_authorsHtml += "
"; } ui->textBrowser->setHtml(m_authorsHtml); } AboutDialog::~AboutDialog() { delete ui; }