changeset 47:08c0d5116e82

More work.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 06 Apr 2017 16:03:13 +0300
parents 372c1be58996
children 200ec310660a
files main.cpp main.h mainwindow.ui
diffstat 3 files changed, 26 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/main.cpp	Thu Apr 06 15:50:19 2017 +0300
+++ b/main.cpp	Thu Apr 06 16:03:13 2017 +0300
@@ -209,14 +209,20 @@
 {
     // Setup UI
     ui->setupUi(this);
+
+    // Read config
+    readSettings();
+
+    // Setup other UI things
     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();
+    QPixmap logoImage(":/img/logo.png");
+    ui->button_LogoImage->setIcon(QIcon(logoImage));
+    ui->button_LogoImage->setIconSize(logoImage.rect().size());
 
     ui->edit_Amount->setValidator(new QDoubleValidator(0, 1000, 2, this));
     setCommonStyleSheet(this);
@@ -411,6 +417,19 @@
 }
 
 
+void SyntilistaMainWindow::on_button_LogoImage_clicked()
+{
+    QMessageBox::about(
+        this,
+        tr("Tietoja %1 -ohjelmasta").arg(tr(APP_NAME)),
+        tr(
+        "Programmed and designed by Matti Hämäläinen &lt;ccr@tnsp.org&gt;<br>"
+        "(C) Copyright 2017 Tecnic Software productions (TNSP)<br>"
+        )
+        );
+}
+
+
 void SyntilistaMainWindow::on_button_DeletePerson_clicked()
 {
     if (currPerson.id <= 0)
--- a/main.h	Thu Apr 06 15:50:19 2017 +0300
+++ b/main.h	Thu Apr 06 16:03:13 2017 +0300
@@ -125,6 +125,8 @@
 
     void on_button_Quit_clicked();
 
+    void on_button_LogoImage_clicked();
+
     void on_button_AddDebt_clicked();
 
     void on_button_PayDebt_clicked();
--- a/mainwindow.ui	Thu Apr 06 15:50:19 2017 +0300
+++ b/mainwindow.ui	Thu Apr 06 16:03:13 2017 +0300
@@ -227,18 +227,12 @@
        </widget>
       </item>
       <item>
-       <widget class="QLabel" name="label_LogoImage">
+       <widget class="QPushButton" name="button_LogoImage">
         <property name="text">
          <string/>
         </property>
-        <property name="pixmap">
-         <pixmap resource="Syntilista.qrc">:/img/logo.png</pixmap>
-        </property>
-        <property name="scaledContents">
-         <bool>false</bool>
-        </property>
-        <property name="alignment">
-         <set>Qt::AlignCenter</set>
+        <property name="flat">
+         <bool>true</bool>
         </property>
        </widget>
       </item>