From 714c0a5be297345812299b371d18176551019c9f Mon Sep 17 00:00:00 2001 From: Dmytro Maslenko Date: Wed, 18 Jan 2023 22:59:21 -0800 Subject: [PATCH] Set shortcuts for settings and database settings * Open app settings with Ctrl+, * Open database settings with Ctrl+Shift+, * Open database reports with Ctrl+Shift+R --- docs/topics/KeyboardShortcuts.adoc | 3 +++ src/gui/MainWindow.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docs/topics/KeyboardShortcuts.adoc b/docs/topics/KeyboardShortcuts.adoc index 77144ef6a..8d8ab6ca0 100644 --- a/docs/topics/KeyboardShortcuts.adoc +++ b/docs/topics/KeyboardShortcuts.adoc @@ -9,12 +9,15 @@ NOTE: On macOS please substitute `Ctrl` with `Cmd` (aka `⌘`). |=== |Action | Keyboard Shortcut +|Settings | Ctrl + , |Open Database | Ctrl + O |Save Database | Ctrl + S |Save Database As | Ctrl + Shift + S |New Database | Ctrl + Shift + N |Close Database | Ctrl + W ; Ctrl + F4 |Lock All Databases | Ctrl + L +|Database Settings | Ctrl + Shift + , +|Database Reports | Ctrl + Shift + R |Quit | Ctrl + Q |New Entry | Ctrl + N |Edit Entry | Enter ; Ctrl + E diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 92e894e0e..cba20a9a6 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -269,6 +269,9 @@ MainWindow::MainWindow() setShortcut(m_ui->actionDatabaseSave, QKeySequence::Save, Qt::CTRL + Qt::Key_S); setShortcut(m_ui->actionDatabaseSaveAs, QKeySequence::SaveAs, Qt::CTRL + Qt::SHIFT + Qt::Key_S); setShortcut(m_ui->actionDatabaseClose, QKeySequence::Close, Qt::CTRL + Qt::Key_W); + m_ui->actionDatabaseSettings->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_Comma); + m_ui->actionReports->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_R); + setShortcut(m_ui->actionSettings, QKeySequence::Preferences, Qt::CTRL + Qt::Key_Comma); m_ui->actionLockDatabase->setShortcut(Qt::CTRL + Qt::Key_L); m_ui->actionLockAllDatabases->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_L); setShortcut(m_ui->actionQuit, QKeySequence::Quit, Qt::CTRL + Qt::Key_Q);