Commit 8576c055 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Add a tab with links to 3rd party libraries

parent 33126c48
......@@ -5,5 +5,6 @@
<file>credits.txt</file>
<file>developers.txt</file>
<file>LICENSE</file>
<file>libraries.txt</file>
</qresource>
</RCC>
Boost,https://www.boost.org,Boost Software License - Version 1.0
DrMingw,https://github.com/jrfonseca/drmingw,LGPLv2.1
Eigen3,http://eigen.tuxfamily.org,MPL2
Exiv2,http://www.exiv2.org,GPLv2
Expat,https://github.com/libexpat/libexpat,MIT
ffmpeg,https://www.ffmpeg.org,LGPL2.1+
fftw3,http://www.fftw.org/,GPLv2+
fontconfig,https://www.freedesktop.org/wiki/Software/fontconfig/,BSD
freetype,https://www.freetype.org/,FTL or GPLv2
gettext,https://www.gnu.org/software/gettext/,GPLv3
giflib,http://giflib.sourceforge.net/,BSD
gmic,http://gmic.eu/,CeCILLv2.1
gmic-qt,http://gmic.eu/,GPLv3
GNU Scientific Library,http://www.gnu.org/software/gsl,GPLv3
libheif,https://github.com/strukturag/libheif,LGPLv3
iconv,https://www.gnu.org/software/libiconv/,LGPLv2 or GPLv3
ilmbase,http://www.openexr.com,Modified BSD
libjpeg-turbo,http://www.libjpeg-turbo.org,BSD
littlecms2,http://www.littlecms.com,MIT
libraw,http://www.libraw.org,LGPLv2.1 or CDDL 1.0
OpenColorIO,http://www.opencolorio.org,BSD
OpenEXR,http://www.openexr.com,Modified BSD
libpng,http://www.libpng.org,libpng license
poppler,http://poppler.freedesktop.org,GPLv2 and GPLv3
PyQt,https://www.riverbankcomputing.com/software/pyqt/download5,GPLv3
Python,http://www.python.org,Python Software Foundation License v2
Qt,https://www.qt.io,GPLv2 + GPLv3 + LGPLv2.1 + LGPLv3
SIP,https://www.riverbankcomputing.com/software/sip/download,GPLv3
libiff,http://www.remotesensing.org/libtiff,BSD
Vc,https://github.com/VcDevel/Vc,BSD
zlib,http://www.zlib.net/,BSD
KDE Frameworks 5,https://www.kde.org,LGPLv+
......@@ -23,12 +23,14 @@
#include <QTabWidget>
#include <QLabel>
#include <QTextEdit>
#include <QScrollArea>
#include <QString>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QPushButton>
#include <QApplication>
#include <QFile>
#include <QDesktopServices>
#include <klocalizedstring.h>
......@@ -43,16 +45,16 @@ KisAboutApplication::KisAboutApplication(QWidget *parent)
QVBoxLayout *vlayout = new QVBoxLayout(this);
vlayout->setMargin(0);
QTabWidget *wdg = new QTabWidget;
vlayout->addWidget(wdg);
QTabWidget *wdgTab = new QTabWidget;
vlayout->addWidget(wdgTab);
KisSplashScreen *splash = new KisSplashScreen(qApp->applicationVersion(), QPixmap(splash_screen_xpm), QPixmap(splash_screen_x2_xpm), true);
splash->setWindowFlags(Qt::Widget);
splash->displayLinks(true);
splash->setFixedSize(splash->sizeHint());
wdg->addTab(splash, i18n("About"));
setMinimumSize(wdg->sizeHint());
wdgTab->addTab(splash, i18n("About"));
setMinimumSize(wdgTab->sizeHint());
QTextEdit *lblAuthors = new QTextEdit();
......@@ -75,7 +77,7 @@ KisAboutApplication::KisAboutApplication(QWidget *parent)
authors.chop(2);
authors.append(".</p></body></html>");
lblAuthors->setText(authors);
wdg->addTab(lblAuthors, i18n("Authors"));
wdgTab->addTab(lblAuthors, i18n("Authors"));
QTextEdit *lblKickstarter = new QTextEdit();
lblKickstarter->setReadOnly(true);
......@@ -96,7 +98,7 @@ KisAboutApplication::KisAboutApplication(QWidget *parent)
backers.chop(2);
backers.append(i18n(".</p><p><i>Thanks! You were all <b>awesome</b>!</i></p></body></html>"));
lblKickstarter->setText(backers);
wdg->addTab(lblKickstarter, i18n("Backers"));
wdgTab->addTab(lblKickstarter, i18n("Backers"));
......@@ -124,7 +126,7 @@ KisAboutApplication::KisAboutApplication(QWidget *parent)
credits.append(i18n(".</p><p><i>For supporting Krita development with advice, icons, brush sets and more.</i></p></body></html>"));
lblCredits->setText(credits);
wdg->addTab(lblCredits, i18n("Also Thanks To"));
wdgTab->addTab(lblCredits, i18n("Also Thanks To"));
QTextEdit *lblLicense = new QTextEdit();
lblLicense->setReadOnly(true);
......@@ -132,7 +134,7 @@ KisAboutApplication::KisAboutApplication(QWidget *parent)
"<head/>"
"<body>"
"<h1 align=\"center\"><b>Your Rights</b></h1>"
"<p>Krita is released under the GNU General Public License (version 2 or any later version).</p>"
"<p>Krita is released under the GNU General Public License (version 3 or any later version).</p>"
"<p>This license grants people a number of freedoms:</p>"
"<ul>"
"<li>You are free to use Krita, for any purpose</li>"
......@@ -156,7 +158,37 @@ KisAboutApplication::KisAboutApplication(QWidget *parent)
license.append("</pre></body></html>");
lblLicense->setText(license);
wdg->addTab(lblLicense, i18n("License"));
wdgTab->addTab(lblLicense, i18n("License"));
QScrollArea *scrollArea = new QScrollArea();
QLabel *lblThirdParty = new QLabel(scrollArea);
lblThirdParty->setTextFormat(Qt::RichText);
connect(lblThirdParty, SIGNAL(linkActivated(QString)), SLOT(linkClicked(QString)));
QFile thirdPartyFile(":/libraries.txt");
qDebug() << thirdPartyFile.exists();
if (thirdPartyFile.open(QIODevice::ReadOnly)) {
ba = thirdPartyFile.readAll();
QString thirdPartyHtml = i18n("<html>"
"<head/>"
"<body>"
"<h1 align=\"center\"><b>Third-party Libraries used by Krita</b></h1>"
"<p>Krita is built on the following free software libraries:</p><p><ul>");
Q_FOREACH(const QString &lib, QString::fromUtf8(ba).split('\n')) {
if (!lib.startsWith("#")) {
QStringList parts = lib.split(',');
if (parts.size() >= 3) {
thirdPartyHtml.append(QString("<li><a href=\"%2\">%1</a>: %3</li>").arg(parts[0], parts[1], parts[2]));
}
}
}
thirdPartyHtml.append("<ul></p></body></html>");
lblThirdParty->setText(thirdPartyHtml);
}
wdgTab->addTab(scrollArea, i18n("Third-party libraries"));
QPushButton *bnClose = new QPushButton(i18n("Close"));
connect(bnClose, SIGNAL(clicked()), SLOT(close()));
......@@ -171,3 +203,12 @@ KisAboutApplication::KisAboutApplication(QWidget *parent)
vlayout->addLayout(hlayout);
}
void KisAboutApplication::linkClicked(const QString &url)
{
QUrl _url = QUrl::fromUserInput(url);
if (!_url.isLocalFile()) {
QDesktopServices::openUrl(_url);
}
}
......@@ -26,9 +26,9 @@ class KisAboutApplication : public QDialog
public:
explicit KisAboutApplication(QWidget *parent = 0);
Q_SIGNALS:
private Q_SLOTS:
public Q_SLOTS:
void linkClicked(const QString &url);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment