Add about dialog to File menu of the connection manager.

Make the contents of the dialog more accurate and include a link to the releasenotes file.
This commit is contained in:
eelke 2022-09-03 12:44:32 +02:00
parent 4e1d128ee9
commit c874b297c1
8 changed files with 66 additions and 14 deletions

23
pglab/About.cpp Normal file
View file

@ -0,0 +1,23 @@
#include "About.h"
#include <QCoreApplication>
#include <QMessageBox>
#include <QString>
void ShowAboutDialog(QWidget *parent)
{
QString pgLabVersionString = "0.2";
QString releaseNotesUrl = "file:///" + QCoreApplication::applicationDirPath() + "\\releasenotes.html";
QString year = QString::fromLatin1(__DATE__, 11).right(4);
QMessageBox::about(parent, "pgLab " + pgLabVersionString, QMessageBox::tr(
"<h1>Version %3</h1>"
"<p><a href=\"%2\">Releasenotes</a></p>"
"<p>Copyrights 2016-%1, Eelke Klein, All Rights Reserved.</p>"
"<p>The program is provided AS IS with NO WARRANTY OF ANY KIND, "
"INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS "
"FOR A PARTICULAR PURPOSE.</p>"
"<p>This program is dynamically linked with Qt " QT_VERSION_STR " Copyrights "
"the Qt Company Ltd. https://www.qt.io/licensing/.</p>"
"<p>Some icons by <a href=\"https://icons8.com\">Icons8</a> and others by <a href=\"http://www.fatcow.com/free-icons\">fatcow</a> provided under Creative Commons "
"attribution 3.0 license.</p>"
).arg(year).arg(releaseNotesUrl).arg(pgLabVersionString));
}