23 #include "aboutdialog.h" 25 #include "gui/copytextdlg.h" 26 #include "plugins/engineplugin.h" 27 #include "plugins/pluginloader.h" 28 #include "ui_aboutdialog.h" 30 #include "wadseeker/wadseekerversioninfo.h" 35 DClass<AboutDialog> :
public Ui::AboutDialog
45 connect(d->buttonBox, SIGNAL(clicked(QAbstractButton*)), SLOT(close()));
50 d->versionAbi->setText(QString(
"(ABI: %1)").arg(DOOMSEEKER_ABI_VERSION));
51 d->lblRevision->setText(QString::number(Version::revisionNumber()));
52 d->logo->setPixmap(QPixmap(
":/logo.png"));
53 d->pteCopyrightNotice->setPlainText(copyrightVerboseNotice());
56 d->wadseekerAuthor->setText(WadseekerVersionInfo::author());
57 d->wadseekerDescription->setText(WadseekerVersionInfo::description());
58 d->wadseekerVersion->setText(WadseekerVersionInfo::version());
59 d->wadseekerYearSpan->setText(WadseekerVersionInfo::yearSpan());
62 for (
unsigned i = 0; i < gPlugins->numPlugins(); ++i)
63 d->pluginBox->addItem( gPlugins->plugin(i)->info()->data()->name);
64 connect(d->pluginBox, SIGNAL(currentIndexChanged(
int)), SLOT(changePlugin(
int)));
67 d->jsonLayout->setAlignment(d->btnJsonLicense, Qt::AlignTop);
71 AboutDialog::~AboutDialog()
75 void AboutDialog::changePlugin(
int pluginIndex)
77 if (static_cast<unsigned>(pluginIndex) >= gPlugins->numPlugins())
80 const EnginePlugin *plug = gPlugins->plugin(pluginIndex)->info();
83 d->pluginDescription->setPlainText(
"");
85 d->pluginDescription->setPlainText(plug->data()->
aboutProvider->provide());
86 d->pluginAuthor->setText(plug->data()->author);
87 d->pluginVersion->setText(QString(
"Version: %1").arg(plug->data()->version));
88 d->pluginAbiVersion->setText(QString(
"(ABI: %1)").arg(plug->data()->abiVersion));
91 QString AboutDialog::copyrightVerboseNotice()
const 96 QStringList paragraphs;
99 QChar copyrightChar(0x00a9);
100 QChar smallAGraveChar(0x00e0);
103 paragraphs << tr(
"Copyright %1 %2 The Doomseeker Team")
104 .arg(copyrightChar).arg(Version::yearSpan());
105 paragraphs << tr(
"This program is distributed under the terms of the LGPL v2.1 or later.");
108 paragraphs << tr(
"Doomseeker translations contributed by:\n")
109 + tr(
"- Polish: Zalewa") +
"\n" 110 + tr(
"- Spanish: Pol Marcet Sard%1").arg(smallAGraveChar) +
"\n" 111 + tr(
"- Catalan: Pol Marcet Sard%1").arg(smallAGraveChar);
114 paragraphs << tr(
"This program uses GeoLite2 data for IP-to-Country (IP2C) purposes, " 115 "available from https://www.maxmind.com") +
"\n" +
116 tr(
"Database and Contents Copyright (c) 2018 MaxMind, Inc.");
117 paragraphs << tr(
"GeoLite2 License:\n" 118 "This work is licensed under the Creative Commons Attribution - ShareAlike 4.0 Unported License. " 119 "To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/.");
120 paragraphs << tr(
"GeoLite2 available at:\n" 121 "https://dev.maxmind.com/geoip/geoip2/geolite2/");
125 icons << tr(
"- Aha-Soft");
126 icons << tr(
"- Crystal Clear by Everaldo Coelho");
127 icons << tr(
"- Fugue Icons (C) 2013 Yusuke Kamiyamane. All rights reserved.");
128 icons << tr(
"- Nuvola 1.0 (KDE 3.x icon set)");
129 icons << tr(
"- Oxygen Icons 4.3.1 (KDE)");
130 icons << tr(
"- Silk Icon Set (C) Mark James (famfamfam.com)");
131 icons << tr(
"- Tango Icon Library / Tango Desktop Project");
132 paragraphs << tr(
"This program uses icons (or derivates of) from following sources:\n") + icons.join(
"\n");
134 return paragraphs.join(
"\n\n");
137 void AboutDialog::showJsonLicense()
139 QResource license(
"LICENSE.json");
140 QString licenseText = QString::fromUtf8(
141 reinterpret_cast<const char *>(license.data()),
143 CopyTextDlg dialog(licenseText, tr(
"JSON library license"),
this);
144 dialog.resize(550, dialog.height());
QScopedPointer< TextProvider > aboutProvider
Description of the plugin, intended to be displayed in the "About" dialog.
static QString versionRevision()
Combines version and revision strings.
static QString changeset()