#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(){
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
</property>
</widget>
- <widget class="QPushButton" name="pushButtonOK">
+ <widget class="QWidget" name="">
<property name="geometry">
<rect>
- <x>310</x>
+ <x>20</x>
<y>250</y>
- <width>93</width>
- <height>27</height>
+ <width>381</width>
+ <height>29</height>
</rect>
</property>
- <property name="text">
- <string>&OK</string>
- </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Version:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="labelVersion">
+ <property name="text">
+ <string>2015.05.00</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pushButtonOK">
+ <property name="text">
+ <string>&OK</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</widget>
</widget>
<resources/>
#include <QProcess>
#include <QMessageBox>
+const QString VERSION("2015.05.27");
/**
* @brief Constructor.
*
* Starts the about dialog.
*/
void MainWindow::about(){
- AboutDialog dialog;
+ AboutDialog dialog(VERSION);
dialog.exec();
}