kopia lustrzana https://github.com/f4exb/sdrangel
remove focus change event
rodzic
282be4e7c9
commit
c55b770687
|
@ -209,7 +209,6 @@ MainWindow::MainWindow(qtwebapp::LoggerWithFile *logger, const MainParser& parse
|
||||||
m_apiServer = new WebAPIServer(m_apiHost, m_apiPort, m_requestMapper);
|
m_apiServer = new WebAPIServer(m_apiHost, m_apiPort, m_requestMapper);
|
||||||
m_apiServer->start();
|
m_apiServer->start();
|
||||||
|
|
||||||
connect(qApp, SIGNAL(focusChanged(QWidget *, QWidget *)), this, SLOT(focusHasChanged(QWidget *, QWidget *)));
|
|
||||||
m_commandKeyReceiver = new CommandKeyReceiver();
|
m_commandKeyReceiver = new CommandKeyReceiver();
|
||||||
m_commandKeyReceiver->setRelease(true);
|
m_commandKeyReceiver->setRelease(true);
|
||||||
this->installEventFilter(m_commandKeyReceiver);
|
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)
|
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");
|
//qDebug("MainWindow::commandKeyPressed: key: %x mod: %x %s", (int) key, (int) keyModifiers, release ? "release" : "press");
|
||||||
|
|
|
@ -391,7 +391,6 @@ private slots:
|
||||||
void on_action_removeLastDevice_triggered();
|
void on_action_removeLastDevice_triggered();
|
||||||
void on_action_Exit_triggered();
|
void on_action_Exit_triggered();
|
||||||
void tabInputViewIndexChanged();
|
void tabInputViewIndexChanged();
|
||||||
void focusHasChanged(QWidget *oldWidget, QWidget *newWidget);
|
|
||||||
void commandKeyPressed(Qt::Key key, Qt::KeyboardModifiers keyModifiers, bool release);
|
void commandKeyPressed(Qt::Key key, Qt::KeyboardModifiers keyModifiers, bool release);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue