changeset 39:2cc7c89ab649

Version information, etc.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 06 Apr 2017 13:04:08 +0300
parents bbdb61de5cda
children d565867f2b0b
files main.cpp main.h mainwindow.ui
diffstat 3 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/main.cpp	Thu Apr 06 12:32:34 2017 +0300
+++ b/main.cpp	Thu Apr 06 13:04:08 2017 +0300
@@ -195,8 +195,11 @@
 {
     // Setup UI
     ui->setupUi(this);
-    this->setWindowIcon(QIcon(QPixmap(":/img/icon-64.png")));
-    
+    setWindowIcon(QIcon(QPixmap(":/img/icon-64.png")));
+    setWindowTitle(tr("%1%2%3").
+        arg(tr(APP_NAME)).
+        arg(tr(" versio ")).
+        arg(tr(APP_VERSION)));
 
     // Read config
     readSettings();
@@ -268,7 +271,7 @@
 
 void SyntilistaMainWindow::readSettings()
 {
-    QSettings settings(APP_VENDOR, APP_NAME);
+    QSettings settings(APP_VENDOR, APP_ID);
     move(settings.value("pos", QPoint(100, 100)).toPoint());
     resize(settings.value("size", QSize(1000, 600)).toSize());
     setScale = settings.value("scale", 1.0f).toDouble();
@@ -277,7 +280,7 @@
 
 void SyntilistaMainWindow::saveSettings()
 {
-    QSettings settings(APP_VENDOR, APP_NAME);
+    QSettings settings(APP_VENDOR, APP_ID);
     settings.setValue("pos", pos());
     settings.setValue("size", size());
     settings.setValue("scale", setScale);
--- a/main.h	Thu Apr 06 12:32:34 2017 +0300
+++ b/main.h	Thu Apr 06 13:04:08 2017 +0300
@@ -17,8 +17,9 @@
 //
 //
 #define APP_VENDOR    "TNSP"
-#define APP_NAME      "Syntilista"
-#define APP_VERSION   "0.1"
+#define APP_ID        "Kampus Syntilista"
+#define APP_NAME      "Café Kampus Syntilista"
+#define APP_VERSION   "0.2"
 
 
 //
--- a/mainwindow.ui	Thu Apr 06 12:32:34 2017 +0300
+++ b/mainwindow.ui	Thu Apr 06 13:04:08 2017 +0300
@@ -10,9 +10,6 @@
     <height>646</height>
    </rect>
   </property>
-  <property name="windowTitle">
-   <string>Café Kampus Syntilista</string>
-  </property>
   <widget class="QWidget" name="centralwidget">
    <layout class="QHBoxLayout" name="horizontalLayout_2">
     <item>