Add Alt+O hotkey to change the operator quickly without going to the Settings dialog

Thanks to Jim, W2JC, for suggesting this enhancement.
This commit is contained in:
Bill Somerville
2019-05-28 12:18:54 +01:00
parent 0a02ad75e0
commit 67ab7c7b8b
4 changed files with 13 additions and 0 deletions
+10
View File
@@ -37,6 +37,7 @@
#include <QSplashScreen>
#include <QUdpSocket>
#include <QAbstractItemView>
#include <QInputDialog>
#include "revision_utils.hpp"
#include "qt_helpers.hpp"
@@ -2062,6 +2063,15 @@ void MainWindow::keyPressEvent (QKeyEvent * e)
on_actionOpen_triggered();
return;
}
else if(e->modifiers() & Qt::AltModifier) {
bool ok;
auto call = QInputDialog::getText (this, tr ("Change Operator"), tr ("New operator:"),
QLineEdit::Normal, m_config.opCall (), &ok);
if (ok) {
m_config.opCall (call);
}
return;
}
break;
case Qt::Key_V:
if(e->modifiers() & Qt::AltModifier) {