From c55b77068727b5a3345506c9f431561be731cc54 Mon Sep 17 00:00:00 2001 From: Stefan Biereigel Date: Sun, 24 Feb 2019 18:04:43 +0100 Subject: [PATCH 1/2] remove focus change event --- sdrgui/mainwindow.cpp | 14 -------------- sdrgui/mainwindow.h | 1 - 2 files changed, 15 deletions(-) diff --git a/sdrgui/mainwindow.cpp b/sdrgui/mainwindow.cpp index 15af32e46..8b63f8677 100644 --- a/sdrgui/mainwindow.cpp +++ b/sdrgui/mainwindow.cpp @@ -209,7 +209,6 @@ MainWindow::MainWindow(qtwebapp::LoggerWithFile *logger, const MainParser& parse m_apiServer = new WebAPIServer(m_apiHost, m_apiPort, m_requestMapper); m_apiServer->start(); - connect(qApp, SIGNAL(focusChanged(QWidget *, QWidget *)), this, SLOT(focusHasChanged(QWidget *, QWidget *))); m_commandKeyReceiver = new CommandKeyReceiver(); m_commandKeyReceiver->setRelease(true); this->installEventFilter(m_commandKeyReceiver); @@ -1792,19 +1791,6 @@ void MainWindow::setLoggingOptions() } } -void MainWindow::focusHasChanged(QWidget *oldWidget, QWidget *newWidget) -{ - (void) oldWidget; - // this is the hard way: -// if (ui->commandKeyboardConnect->isChecked() && (newWidget != this)) { -// setFocus(); -// } - // this is the soft way: - if (newWidget != this) { - ui->commandKeyboardConnect->setChecked(false); - } -} - void MainWindow::commandKeyPressed(Qt::Key key, Qt::KeyboardModifiers keyModifiers, bool release) { //qDebug("MainWindow::commandKeyPressed: key: %x mod: %x %s", (int) key, (int) keyModifiers, release ? "release" : "press"); diff --git a/sdrgui/mainwindow.h b/sdrgui/mainwindow.h index 97f6b7cff..a6638a5c0 100644 --- a/sdrgui/mainwindow.h +++ b/sdrgui/mainwindow.h @@ -391,7 +391,6 @@ private slots: void on_action_removeLastDevice_triggered(); void on_action_Exit_triggered(); void tabInputViewIndexChanged(); - void focusHasChanged(QWidget *oldWidget, QWidget *newWidget); void commandKeyPressed(Qt::Key key, Qt::KeyboardModifiers keyModifiers, bool release); }; From 3644f23f182b69e15e94ea28f951508956a2a977 Mon Sep 17 00:00:00 2001 From: Stefan Biereigel Date: Tue, 26 Feb 2019 07:39:30 +0100 Subject: [PATCH 2/2] reflect keyboard command changes in readme --- sdrgui/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdrgui/readme.md b/sdrgui/readme.md index 49c1475a6..300f3efce 100644 --- a/sdrgui/readme.md +++ b/sdrgui/readme.md @@ -663,9 +663,9 @@ This will save the commands immediately. The commands will be automatically save This will delete the currently selected command or if selection is a group this will delete all commands in the group. -
5B.6.8. Activate keyboard binding
+
5B.6.8. Activate keyboard bindings
-Use this button to activate the keyboard binding. This requires that the focus is set to the main window. On a few occasions the main window looses focus and the button gets unselected. Just click again on this button to reactivate the keyboard binding. Note that you need to have this button selected (its background should be lit in beige/orange) for the key binding to be effective. +Use this button to activate the keyboard bindings. Note that you need to have this button selected (its background should be lit in beige/orange) for the key bindings to be effective.

6. Channels