From c92c611b06fc0bfd71b07db40a890e67ab948fa3 Mon Sep 17 00:00:00 2001 From: hama Date: Wed, 27 May 2015 23:34:04 +0200 Subject: [PATCH] Version (shown in about dialog) --- appl/refind/aboutdialog.cpp | 3 ++- appl/refind/aboutdialog.hpp | 2 +- appl/refind/aboutdialog.ui | 47 +++++++++++++++++++++++++++++++------ appl/refind/mainwindow.cpp | 3 ++- 4 files changed, 45 insertions(+), 10 deletions(-) diff --git a/appl/refind/aboutdialog.cpp b/appl/refind/aboutdialog.cpp index 43a6eb5..f6820d4 100644 --- a/appl/refind/aboutdialog.cpp +++ b/appl/refind/aboutdialog.cpp @@ -9,9 +9,10 @@ #include "aboutdialog.hpp" #include "ui_aboutdialog.h" -AboutDialog::AboutDialog(QWidget *parent) : +AboutDialog::AboutDialog(const QString& version, QWidget *parent) : QDialog(parent), ui(new Ui::AboutDialog){ ui->setupUi(this); + ui->labelVersion->setText(version); } AboutDialog::~AboutDialog(){ diff --git a/appl/refind/aboutdialog.hpp b/appl/refind/aboutdialog.hpp index b15b499..2c8baec 100644 --- a/appl/refind/aboutdialog.hpp +++ b/appl/refind/aboutdialog.hpp @@ -19,7 +19,7 @@ class AboutDialog: public QDialog { Q_OBJECT public: - explicit AboutDialog(QWidget *parent = 0); + explicit AboutDialog(const QString& version, QWidget *parent = 0); ~AboutDialog(); private: diff --git a/appl/refind/aboutdialog.ui b/appl/refind/aboutdialog.ui index b5d0c1d..50d1dd8 100644 --- a/appl/refind/aboutdialog.ui +++ b/appl/refind/aboutdialog.ui @@ -48,18 +48,51 @@ p, li { white-space: pre-wrap; } Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - + - 310 + 20 250 - 93 - 27 + 381 + 29 - - &OK - + + + + + Version: + + + + + + + 2015.05.00 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + &OK + + + + diff --git a/appl/refind/mainwindow.cpp b/appl/refind/mainwindow.cpp index 3b8d911..6360171 100644 --- a/appl/refind/mainwindow.cpp +++ b/appl/refind/mainwindow.cpp @@ -31,6 +31,7 @@ #include #include +const QString VERSION("2015.05.27"); /** * @brief Constructor. * @@ -135,7 +136,7 @@ void MainWindow::initializeHome(){ * Starts the about dialog. */ void MainWindow::about(){ - AboutDialog dialog; + AboutDialog dialog(VERSION); dialog.exec(); } -- 2.39.5