kopia lustrzana https://gitlab.com/eliggett/wfview
Fixed PTT and pttEnable preference.
rodzic
056d6444de
commit
d6e5fdb362
|
@ -104,8 +104,6 @@ wfmain::wfmain(QWidget *parent) :
|
||||||
keyPlus->setKey(Qt::Key_Plus);
|
keyPlus->setKey(Qt::Key_Plus);
|
||||||
connect(keyPlus, SIGNAL(activated()), this, SLOT(shortcutPlus()));
|
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 = new QShortcut(this);
|
||||||
keyShiftMinus->setKey(Qt::SHIFT + Qt::Key_Minus);
|
keyShiftMinus->setKey(Qt::SHIFT + Qt::Key_Minus);
|
||||||
connect(keyShiftMinus, SIGNAL(activated()), this, SLOT(shortcutShiftMinus()));
|
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(setDataMode(bool)), rig, SLOT(setDataMode(bool)));
|
||||||
connect(this, SIGNAL(getBandStackReg(char,char)), rig, SLOT(getBandStackReg(char,char)));
|
connect(this, SIGNAL(getBandStackReg(char,char)), rig, SLOT(getBandStackReg(char,char)));
|
||||||
connect(rig, SIGNAL(havePTTStatus(bool)), this, SLOT(receivePTTstatus(bool)));
|
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(rig, SIGNAL(haveBandStackReg(float,char,bool)), this, SLOT(receiveBandStackReg(float,char,bool)));
|
||||||
connect(this, SIGNAL(getDebug()), rig, SLOT(getDebug()));
|
connect(this, SIGNAL(getDebug()), rig, SLOT(getDebug()));
|
||||||
|
|
||||||
|
@ -373,6 +372,7 @@ void wfmain::loadSettings()
|
||||||
// Misc. user settings (enable PTT, draw peaks, etc)
|
// Misc. user settings (enable PTT, draw peaks, etc)
|
||||||
settings.beginGroup("Controls");
|
settings.beginGroup("Controls");
|
||||||
prefs.enablePTT = settings.value("EnablePTT", defPrefs.enablePTT).toBool();
|
prefs.enablePTT = settings.value("EnablePTT", defPrefs.enablePTT).toBool();
|
||||||
|
ui->pttEnableChk->setChecked(prefs.enablePTT);
|
||||||
prefs.niceTS = settings.value("NiceTS", defPrefs.niceTS).toBool();
|
prefs.niceTS = settings.value("NiceTS", defPrefs.niceTS).toBool();
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
|
@ -1722,6 +1722,11 @@ void wfmain::receiveATUStatus(unsigned char atustatus)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wfmain::on_pttEnableChk_clicked(bool checked)
|
||||||
|
{
|
||||||
|
prefs.enablePTT = checked;
|
||||||
|
}
|
||||||
|
|
||||||
// --- DEBUG FUNCTION ---
|
// --- DEBUG FUNCTION ---
|
||||||
void wfmain::on_debugBtn_clicked()
|
void wfmain::on_debugBtn_clicked()
|
||||||
{
|
{
|
||||||
|
|
2
wfmain.h
2
wfmain.h
|
@ -222,6 +222,8 @@ private slots:
|
||||||
|
|
||||||
void on_debugBtn_clicked();
|
void on_debugBtn_clicked();
|
||||||
|
|
||||||
|
void on_pttEnableChk_clicked(bool checked);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::wfmain *ui;
|
Ui::wfmain *ui;
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="mainTab">
|
<widget class="QWidget" name="mainTab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
|
Ładowanie…
Reference in New Issue