From 8d131208e258200c4a582d1c67f1f24d05d7bdae Mon Sep 17 00:00:00 2001 From: Elliott Liggett Date: Thu, 7 Feb 2019 10:15:10 -0800 Subject: [PATCH] Added "F" and "M" shortcuts to speak frequency and mode. --- wfmain.cpp | 18 ++++++++++++++++++ wfmain.h | 6 ++++++ 2 files changed, 24 insertions(+) diff --git a/wfmain.cpp b/wfmain.cpp index 00acf70..685873e 100644 --- a/wfmain.cpp +++ b/wfmain.cpp @@ -117,7 +117,13 @@ wfmain::wfmain(QWidget *parent) : keyControlPlus->setKey(Qt::CTRL + Qt::Key_Plus); connect(keyControlPlus, SIGNAL(activated()), this, SLOT(shortcutControlPlus())); + keyF = new QShortcut(this); + keyF->setKey(Qt::Key_F); + connect(keyF, SIGNAL(activated()), this, SLOT(shortcutF())); + keyM = new QShortcut(this); + keyM->setKey(Qt::Key_M); + connect(keyM, SIGNAL(activated()), this, SLOT(shortcutM())); setDefaultColors(); // set of UI colors with defaults populated @@ -652,6 +658,18 @@ void wfmain::shortcutControlPlus() ui->freqDial->setValue( ui->freqDial->value() + ui->freqDial->pageStep() ); } +void wfmain::shortcutF() +{ + showStatusBarText("Sending speech command (frequency) to radio."); + emit sayFrequency(); +} + +void wfmain::shortcutM() +{ + showStatusBarText("Sending speech command (mode) to radio."); + emit sayMode(); +} + void wfmain::getInitialRigState() { diff --git a/wfmain.h b/wfmain.h index 49668cb..0eec6cd 100644 --- a/wfmain.h +++ b/wfmain.h @@ -92,6 +92,9 @@ private slots: void shortcutControlMinus(); void shortcutControlPlus(); + void shortcutF(); + void shortcutM(); + void handlePttLimit(); // hit at 3 min transmit length void on_startBtn_clicked(); @@ -264,6 +267,9 @@ private: QShortcut *keyControlMinus; QShortcut *keyControlPlus; + QShortcut *keyF; + QShortcut *keyM; + rigCommander * rig; QThread * rigThread;