]> gitweb.hamatoma.de Git - reqt/commitdiff
Version (shown in about dialog)
authorhama <hama@siduction.net>
Wed, 27 May 2015 21:34:04 +0000 (23:34 +0200)
committerhama <hama@siduction.net>
Wed, 27 May 2015 21:34:04 +0000 (23:34 +0200)
appl/refind/aboutdialog.cpp
appl/refind/aboutdialog.hpp
appl/refind/aboutdialog.ui
appl/refind/mainwindow.cpp

index 43a6eb5383513e05897dff37625bf1b5e2bd3af0..f6820d432936ca0b97b375a2fd06823d1fb9ec05 100644 (file)
@@ -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(){
index b15b4996f4ba101122da27da649670e7e9b4ebfa..2c8baec5be903771d2a9d689257d6134be493ba6 100644 (file)
@@ -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:
index b5d0c1d928173374ea00a8d006d1f9ca4796603b..50d1dd86115a0c81a18c181c3cfcbc713d1617c6 100644 (file)
@@ -48,18 +48,51 @@ p, li { white-space: pre-wrap; }
     <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>&amp;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>&amp;OK</string>
+      </property>
+     </widget>
+    </item>
+   </layout>
   </widget>
  </widget>
  <resources/>
index 3b8d911732e870a368115df3e95126a9e2b5d1ee..636017101785b17430d0257bff8858b361e1da7e 100644 (file)
@@ -31,6 +31,7 @@
 #include <QProcess>
 #include <QMessageBox>
 
+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();
 }