# HG changeset patch # User Matti Hamalainen # Date 1491820593 -10800 # Node ID cc8fbf9a61b2197ae289cfc0e71e841fc31c6b61 # Parent 7306af5129e5504e6c7ad1055e0e576100c587cf Add a help dialog. diff -r 7306af5129e5 -r cc8fbf9a61b2 main.cpp --- a/main.cpp Mon Apr 10 13:03:12 2017 +0300 +++ b/main.cpp Mon Apr 10 13:36:33 2017 +0300 @@ -279,7 +279,8 @@ ui->button_DeletePerson->setShortcut(QKeySequence(Qt::Key_F8)); ui->button_EditPerson->setShortcut(QKeySequence(Qt::Key_F6)); ui->button_ClearFilter->setShortcut(QKeySequence(Qt::Key_Escape)); - ui->button_About->setShortcut(QKeySequence(Qt::Key_F1)); + ui->button_Help->setShortcut(QKeySequence(Qt::Key_F1)); + ui->button_About->setShortcut(QKeySequence(Qt::Key_F2)); new QShortcut(QKeySequence(QKeySequence::ZoomIn), this, SLOT(changeUIZoomIn())); new QShortcut(QKeySequence(QKeySequence::ZoomOut), this, SLOT(changeUIZoomOut())); @@ -461,6 +462,29 @@ } +void SyntilistaMainWindow::on_button_Help_clicked() +{ + QMessageBox::about( + this, + tr("Tietoja"), + tr( + "

Pikanäppäimet

" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "
CTRL + QOhjelman lopetus
EscTyhjennä 'Etsi / suodata' kenttä ja siirry siihen
CTRL + EnterSiirry summan syöttökenttään
Page UpSiirry ylös henkilölistassa
Page DownSiirry alas henkilölistassa
F1Tämä tietoikkuna
F2Tietoja ohjelmasta
F5Lisää uusi henkilö
F6Muokkaa henkilöä
F8Poista henkilö
" + )); +} + + void SyntilistaMainWindow::on_button_DeletePerson_clicked() { if (currPerson.id <= 0) diff -r 7306af5129e5 -r cc8fbf9a61b2 main.h --- a/main.h Mon Apr 10 13:03:12 2017 +0300 +++ b/main.h Mon Apr 10 13:36:33 2017 +0300 @@ -130,6 +130,7 @@ void on_button_Quit_clicked(); void on_button_About_clicked(); + void on_button_Help_clicked(); void on_button_AddDebt_clicked(); diff -r 7306af5129e5 -r cc8fbf9a61b2 mainwindow.ui --- a/mainwindow.ui Mon Apr 10 13:03:12 2017 +0300 +++ b/mainwindow.ui Mon Apr 10 13:36:33 2017 +0300 @@ -262,6 +262,13 @@ + + + ? + + + + Qt::Horizontal