# HG changeset patch # User Matti Hamalainen # Date 1491483793 -10800 # Node ID 08c0d5116e82ad1560424c1dcb54e0274f24a5b3 # Parent 372c1be58996c4905623947a690ef59075074b1f More work. diff -r 372c1be58996 -r 08c0d5116e82 main.cpp --- 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 <ccr@tnsp.org>
" + "(C) Copyright 2017 Tecnic Software productions (TNSP)
" + ) + ); +} + + void SyntilistaMainWindow::on_button_DeletePerson_clicked() { if (currPerson.id <= 0) diff -r 372c1be58996 -r 08c0d5116e82 main.h --- 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(); diff -r 372c1be58996 -r 08c0d5116e82 mainwindow.ui --- 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 @@ - + - - :/img/logo.png - - - false - - - Qt::AlignCenter + + true