diff --git a/wfmain.cpp b/wfmain.cpp index 8dc6a34..5b94d38 100644 --- a/wfmain.cpp +++ b/wfmain.cpp @@ -104,8 +104,6 @@ wfmain::wfmain(QWidget *parent) : keyPlus->setKey(Qt::Key_Plus); connect(keyPlus, SIGNAL(activated()), this, SLOT(shortcutPlus())); - // TODO: Refactor shift-->control in function and element names. - // Shift is a poor choice since shift is required to get to + on many keyboards. keyShiftMinus = new QShortcut(this); keyShiftMinus->setKey(Qt::SHIFT + Qt::Key_Minus); connect(keyShiftMinus, SIGNAL(activated()), this, SLOT(shortcutShiftMinus())); @@ -216,6 +214,7 @@ wfmain::wfmain(QWidget *parent) : connect(this, SIGNAL(setDataMode(bool)), rig, SLOT(setDataMode(bool))); connect(this, SIGNAL(getBandStackReg(char,char)), rig, SLOT(getBandStackReg(char,char))); connect(rig, SIGNAL(havePTTStatus(bool)), this, SLOT(receivePTTstatus(bool))); + connect(this, SIGNAL(setPTT(bool)), rig, SLOT(setPTT(bool))); connect(rig, SIGNAL(haveBandStackReg(float,char,bool)), this, SLOT(receiveBandStackReg(float,char,bool))); connect(this, SIGNAL(getDebug()), rig, SLOT(getDebug())); @@ -373,6 +372,7 @@ void wfmain::loadSettings() // Misc. user settings (enable PTT, draw peaks, etc) settings.beginGroup("Controls"); prefs.enablePTT = settings.value("EnablePTT", defPrefs.enablePTT).toBool(); + ui->pttEnableChk->setChecked(prefs.enablePTT); prefs.niceTS = settings.value("NiceTS", defPrefs.niceTS).toBool(); settings.endGroup(); @@ -1722,6 +1722,11 @@ void wfmain::receiveATUStatus(unsigned char atustatus) } } +void wfmain::on_pttEnableChk_clicked(bool checked) +{ + prefs.enablePTT = checked; +} + // --- DEBUG FUNCTION --- void wfmain::on_debugBtn_clicked() { diff --git a/wfmain.h b/wfmain.h index 8c52de4..965aa96 100644 --- a/wfmain.h +++ b/wfmain.h @@ -222,6 +222,8 @@ private slots: void on_debugBtn_clicked(); + void on_pttEnableChk_clicked(bool checked); + private: Ui::wfmain *ui; QSettings settings; diff --git a/wfmain.ui b/wfmain.ui index e2ee3b3..470bd6f 100644 --- a/wfmain.ui +++ b/wfmain.ui @@ -18,7 +18,7 @@ - 0 + 3