added version identifier to about dialog

This commit is contained in:
itsmattkc
2019-03-06 11:10:45 -08:00
parent a71e8b41da
commit 5eae8b4806
2 changed files with 30 additions and 24 deletions
+28 -22
View File
@@ -24,32 +24,38 @@
#include <QLabel>
#include <QDialogButtonBox>
#include "oliveglobal.h"
AboutDialog::AboutDialog(QWidget *parent) :
QDialog(parent)
QDialog(parent)
{
setWindowTitle("About Olive");
setWindowTitle("About Olive");
QVBoxLayout* layout = new QVBoxLayout(this);
layout->setSpacing(20);
QVBoxLayout* layout = new QVBoxLayout(this);
layout->setSpacing(20);
QLabel* label =
new QLabel("<html><head/><body>"
"<p><img src=\":/icons/olive-splash.png\"/></p>"
"<p><a href=\"https://www.olivevideoeditor.org/\">"
"<span style=\" text-decoration: underline; color:#007af4;\">"
"https://www.olivevideoeditor.org/"
"</span></a></p><p>"
+ tr("Olive is a non-linear video editor. This software is free and protected by the GNU GPL.")
+ "</p><p>"
+ tr("Olive Team is obliged to inform users that Olive source code is available for download from its website.")
+ "</p></body></html>", this);
label->setAlignment(Qt::AlignCenter);
label->setWordWrap(true);
layout->addWidget(label);
QLabel* label =
new QLabel(QString("<html><head/><body>"
"<p><img src=\":/icons/olive-splash.png\"/></p>"
"<p><a href=\"https://www.olivevideoeditor.org/\">"
"<span style=\" text-decoration: underline; color:#007af4;\">"
"https://www.olivevideoeditor.org/"
"</span></a></p>"
"<p><b>%1</b></p>" // AppName (version identifier)
"<p>%2</p>" // First statement
"<p>%3</p>" // Second statement
"</body></html>").arg(olive::AppName,
tr("Olive is a non-linear video editor. This software is free and "
"protected by the GNU GPL."),
tr("Olive Team is obliged to inform users that Olive source code is "
"available for download from its website.")), this);
label->setAlignment(Qt::AlignCenter);
label->setWordWrap(true);
layout->addWidget(label);
QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok, this);
buttons->setCenterButtons(true);
layout->addWidget(buttons);
QDialogButtonBox* buttons = new QDialogButtonBox(QDialogButtonBox::Ok, this);
buttons->setCenterButtons(true);
layout->addWidget(buttons);
connect(buttons, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttons, SIGNAL(accepted()), this, SLOT(accept()));
}
+2 -2
View File
@@ -25,10 +25,10 @@
class AboutDialog : public QDialog
{
Q_OBJECT
Q_OBJECT
public:
explicit AboutDialog(QWidget *parent = 0);
explicit AboutDialog(QWidget *parent = nullptr);
};
#endif // ABOUTDIALOG_H