From dce977db76c0b91218703e1d0c58c05de7ded61c Mon Sep 17 00:00:00 2001 From: Elliott Liggett Date: Sun, 3 Feb 2019 21:51:30 -0800 Subject: [PATCH] Added +/- key support for tuning. Added additional compiler flags to lower executable size. --- wfmain.cpp | 21 +++++++++++++++++++++ wfmain.h | 5 ++++- wfview.pro | 10 ++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/wfmain.cpp b/wfmain.cpp index 19423ec..ab95229 100644 --- a/wfmain.cpp +++ b/wfmain.cpp @@ -91,6 +91,14 @@ wfmain::wfmain(QWidget *parent) : keySlash->setKey(Qt::Key_Slash); connect(keySlash, SIGNAL(activated()), this, SLOT(shortcutSlash())); + keyMinus = new QShortcut(this); + keyMinus->setKey(Qt::Key_Minus); + connect(keyMinus, SIGNAL(activated()), this, SLOT(shortcutMinus())); + + keyPlus = new QShortcut(this); + keyPlus->setKey(Qt::Key_Plus); + connect(keyPlus, SIGNAL(activated()), this, SLOT(shortcutPlus())); + setDefaultColors(); // set of UI colors with defaults populated setDefPrefs(); // other default options @@ -594,6 +602,19 @@ void wfmain::shortcutSlash() on_modeSelectCombo_activated( ui->modeSelectCombo->currentIndex() ); } +void wfmain::shortcutMinus() +{ + ui->freqDial->setValue( ui->freqDial->value() - ui->freqDial->singleStep() ); + // pageStep is the larger step size +} + +void wfmain::shortcutPlus() +{ + ui->freqDial->setValue( ui->freqDial->value() + ui->freqDial->singleStep() ); + // pageStep is the larger step size +} + + void wfmain::getInitialRigState() { // Initial list of queries to the radio. diff --git a/wfmain.h b/wfmain.h index c21ca16..71e22f9 100644 --- a/wfmain.h +++ b/wfmain.h @@ -85,6 +85,8 @@ private slots: void shortcutStar(); void shortcutSlash(); + void shortcutMinus(); + void shortcutPlus(); void handlePttLimit(); // hit at 3 min transmit length @@ -248,9 +250,10 @@ private: QShortcut *keyControlI; QShortcut *keyControlU; - QShortcut *keyStar; QShortcut *keySlash; + QShortcut *keyMinus; + QShortcut *keyPlus; rigCommander * rig; diff --git a/wfview.pro b/wfview.pro index 59fb1a1..81479a1 100644 --- a/wfview.pro +++ b/wfview.pro @@ -13,6 +13,16 @@ TEMPLATE = app QMAKE_CXXFLAGS += -march=native +CONFIG(debug, release|debug) { +# For Debug builds only: + +} else { +# For Release builds only: +QMAKE_CXXFLAGS += -s +QMAKE_CXXFLAGS += -fvisibility=hidden +QMAKE_CXXFLAGS += -fvisibility-inlines-hidden +} + # The following define makes your compiler emit warnings if you use # any feature of Qt which as been marked as deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the