Fixed PTT and pttEnable preference.

merge-requests/1/merge
Elliott Liggett 2019-02-09 23:13:18 -08:00
rodzic 056d6444de
commit d6e5fdb362
3 zmienionych plików z 10 dodań i 3 usunięć

Wyświetl plik

@ -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()
{

Wyświetl plik

@ -222,6 +222,8 @@ private slots:
void on_debugBtn_clicked();
void on_pttEnableChk_clicked(bool checked);
private:
Ui::wfmain *ui;
QSettings settings;

Wyświetl plik

@ -18,7 +18,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
<number>3</number>
</property>
<widget class="QWidget" name="mainTab">
<attribute name="title">