kopia lustrzana https://gitlab.com/eliggett/wfview
commit
54d6850aa1
|
@ -406,6 +406,7 @@ void udpServer::controlReceived()
|
||||||
rxAudioThread = new QThread(this);
|
rxAudioThread = new QThread(this);
|
||||||
|
|
||||||
rxaudio->moveToThread(rxAudioThread);
|
rxaudio->moveToThread(rxAudioThread);
|
||||||
|
|
||||||
rxAudioThread->start(QThread::TimeCriticalPriority);
|
rxAudioThread->start(QThread::TimeCriticalPriority);
|
||||||
|
|
||||||
connect(this, SIGNAL(setupRxAudio(audioSetup)), rxaudio, SLOT(init(audioSetup)));
|
connect(this, SIGNAL(setupRxAudio(audioSetup)), rxaudio, SLOT(init(audioSetup)));
|
||||||
|
|
25
wfmain.cpp
25
wfmain.cpp
|
@ -685,6 +685,8 @@ void wfmain::setupMainUI()
|
||||||
ui->meter2Widget->hide();
|
ui->meter2Widget->hide();
|
||||||
|
|
||||||
ui->meter2selectionCombo->show();
|
ui->meter2selectionCombo->show();
|
||||||
|
ui->meter2selectionCombo->setCurrentIndex((int)prefs.meter2Type);
|
||||||
|
|
||||||
ui->secondaryMeterSelectionLabel->show();
|
ui->secondaryMeterSelectionLabel->show();
|
||||||
|
|
||||||
|
|
||||||
|
@ -1236,6 +1238,7 @@ void wfmain::setDefPrefs()
|
||||||
defPrefs.wftheme = static_cast<int>(QCPColorGradient::gpJet);
|
defPrefs.wftheme = static_cast<int>(QCPColorGradient::gpJet);
|
||||||
defPrefs.confirmExit = true;
|
defPrefs.confirmExit = true;
|
||||||
defPrefs.confirmPowerOff = true;
|
defPrefs.confirmPowerOff = true;
|
||||||
|
defPrefs.meter2Type = meterNone;
|
||||||
|
|
||||||
udpDefPrefs.ipAddress = QString("");
|
udpDefPrefs.ipAddress = QString("");
|
||||||
udpDefPrefs.controlLANPort = 50001;
|
udpDefPrefs.controlLANPort = 50001;
|
||||||
|
@ -1269,7 +1272,7 @@ void wfmain::loadSettings()
|
||||||
setWindowState(Qt::WindowActive); // Works around QT bug to returns window+keyboard focus.
|
setWindowState(Qt::WindowActive); // Works around QT bug to returns window+keyboard focus.
|
||||||
prefs.confirmExit = settings->value("ConfirmExit", defPrefs.confirmExit).toBool();
|
prefs.confirmExit = settings->value("ConfirmExit", defPrefs.confirmExit).toBool();
|
||||||
prefs.confirmPowerOff = settings->value("ConfirmPowerOff", defPrefs.confirmPowerOff).toBool();
|
prefs.confirmPowerOff = settings->value("ConfirmPowerOff", defPrefs.confirmPowerOff).toBool();
|
||||||
|
prefs.meter2Type = static_cast<meterKind>(settings->value("Meter2Type", defPrefs.meter2Type).toInt());
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
|
|
||||||
// Load color schemes:
|
// Load color schemes:
|
||||||
|
@ -1570,6 +1573,7 @@ void wfmain::saveSettings()
|
||||||
settings->setValue("WFLength", prefs.wflength);
|
settings->setValue("WFLength", prefs.wflength);
|
||||||
settings->setValue("ConfirmExit", prefs.confirmExit);
|
settings->setValue("ConfirmExit", prefs.confirmExit);
|
||||||
settings->setValue("ConfirmPowerOff", prefs.confirmPowerOff);
|
settings->setValue("ConfirmPowerOff", prefs.confirmPowerOff);
|
||||||
|
settings->setValue("Meter2Type", (int)prefs.meter2Type);
|
||||||
settings->endGroup();
|
settings->endGroup();
|
||||||
|
|
||||||
// Radio and Comms: C-IV addr, port to use
|
// Radio and Comms: C-IV addr, port to use
|
||||||
|
@ -3003,6 +3007,18 @@ void wfmain::receiveRigID(rigCapabilities rigCaps)
|
||||||
// recalculate command timing now that we know the rig better:
|
// recalculate command timing now that we know the rig better:
|
||||||
calculateTimingParameters();
|
calculateTimingParameters();
|
||||||
initPeriodicCommands();
|
initPeriodicCommands();
|
||||||
|
|
||||||
|
// Set the second meter here as I suspect we need to be connected for it to work?
|
||||||
|
for (int i = 0; i < ui->meter2selectionCombo->count(); i++)
|
||||||
|
{
|
||||||
|
if (static_cast<meterKind>(ui->meter2selectionCombo->itemData(i).toInt()) == prefs.meter2Type)
|
||||||
|
{
|
||||||
|
// I thought that setCurrentIndex() would call the activated() function for the combobox
|
||||||
|
// but it doesn't, so call it manually.
|
||||||
|
ui->meter2selectionCombo->setCurrentIndex(i);
|
||||||
|
on_meter2selectionCombo_activated(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3218,9 +3234,9 @@ void wfmain::receiveSpectrumData(QByteArray spectrum, double startFreq, double e
|
||||||
|
|
||||||
void wfmain::receiveSpectrumMode(spectrumMode spectMode)
|
void wfmain::receiveSpectrumMode(spectrumMode spectMode)
|
||||||
{
|
{
|
||||||
for(int i=0; i < ui->spectrumModeCombo->count(); i++)
|
for (int i = 0; i < ui->spectrumModeCombo->count(); i++)
|
||||||
{
|
{
|
||||||
if(static_cast<spectrumMode>(ui->spectrumModeCombo->itemData(i).toInt()) == spectMode)
|
if (static_cast<spectrumMode>(ui->spectrumModeCombo->itemData(i).toInt()) == spectMode)
|
||||||
{
|
{
|
||||||
ui->spectrumModeCombo->blockSignals(true);
|
ui->spectrumModeCombo->blockSignals(true);
|
||||||
ui->spectrumModeCombo->setCurrentIndex(i);
|
ui->spectrumModeCombo->setCurrentIndex(i);
|
||||||
|
@ -5241,7 +5257,6 @@ void wfmain::on_meter2selectionCombo_activated(int index)
|
||||||
meterKind oldMeterType;
|
meterKind oldMeterType;
|
||||||
newMeterType = static_cast<meterKind>(ui->meter2selectionCombo->currentData().toInt());
|
newMeterType = static_cast<meterKind>(ui->meter2selectionCombo->currentData().toInt());
|
||||||
oldMeterType = ui->meter2Widget->getMeterType();
|
oldMeterType = ui->meter2Widget->getMeterType();
|
||||||
|
|
||||||
if(newMeterType == oldMeterType)
|
if(newMeterType == oldMeterType)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -5259,6 +5274,8 @@ void wfmain::on_meter2selectionCombo_activated(int index)
|
||||||
ui->meter2Widget->setMeterType(newMeterType);
|
ui->meter2Widget->setMeterType(newMeterType);
|
||||||
insertPeriodicCommandUnique(newCmd);
|
insertPeriodicCommandUnique(newCmd);
|
||||||
}
|
}
|
||||||
|
prefs.meter2Type = newMeterType;
|
||||||
|
|
||||||
(void)index;
|
(void)index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
wfmain.h
2
wfmain.h
|
@ -477,6 +477,7 @@ private slots:
|
||||||
|
|
||||||
void on_rigctldPortTxt_editingFinished();
|
void on_rigctldPortTxt_editingFinished();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::wfmain *ui;
|
Ui::wfmain *ui;
|
||||||
void closeEvent(QCloseEvent *event);
|
void closeEvent(QCloseEvent *event);
|
||||||
|
@ -703,6 +704,7 @@ private:
|
||||||
int wftheme;
|
int wftheme;
|
||||||
bool confirmExit;
|
bool confirmExit;
|
||||||
bool confirmPowerOff;
|
bool confirmPowerOff;
|
||||||
|
meterKind meter2Type;
|
||||||
// plot scheme
|
// plot scheme
|
||||||
} prefs;
|
} prefs;
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue