kopia lustrzana https://gitlab.com/eliggett/wfview
Dynamic show/hide spectrum for rigs without this feature.
rodzic
2392bdd932
commit
d3d59b2a94
43
wfmain.cpp
43
wfmain.cpp
|
@ -1494,6 +1494,40 @@ void wfmain::saveSettings()
|
|||
}
|
||||
|
||||
|
||||
void wfmain::showHideSpectrum(bool show)
|
||||
{
|
||||
|
||||
if(show)
|
||||
{
|
||||
wf->show();
|
||||
plot->show();
|
||||
} else {
|
||||
wf->hide();
|
||||
plot->hide();
|
||||
}
|
||||
|
||||
// Controls:
|
||||
ui->spectrumGroupBox->setVisible(show);
|
||||
ui->spectrumModeCombo->setVisible(show);
|
||||
ui->scopeBWCombo->setVisible(show);
|
||||
ui->scopeEdgeCombo->setVisible(show);
|
||||
ui->scopeEnableWFBtn->setVisible(show);
|
||||
ui->scopeRefLevelSlider->setEnabled(show);
|
||||
ui->wfLengthSlider->setEnabled(show);
|
||||
ui->wfthemeCombo->setVisible(show);
|
||||
ui->toFixedBtn->setVisible(show);
|
||||
ui->clearPeakBtn->setVisible(show);
|
||||
|
||||
// And the labels:
|
||||
ui->specEdgeLabel->setVisible(show);
|
||||
ui->specModeLabel->setVisible(show);
|
||||
ui->specSpanLabel->setVisible(show);
|
||||
ui->specThemeLabel->setVisible(show);
|
||||
|
||||
ui->specControlsHorizLayout->setEnabled(show);
|
||||
|
||||
}
|
||||
|
||||
void wfmain::prepareWf()
|
||||
{
|
||||
prepareWf(160);
|
||||
|
@ -1505,6 +1539,11 @@ void wfmain::prepareWf(unsigned int wfLength)
|
|||
|
||||
if(haveRigCaps)
|
||||
{
|
||||
showHideSpectrum(rigCaps.hasSpectrum);
|
||||
if(!rigCaps.hasSpectrum)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// TODO: Lock the function that draws on the spectrum while we are updating.
|
||||
spectrumDrawLock = true;
|
||||
|
||||
|
@ -4357,7 +4396,7 @@ void wfmain::calculateTimingParameters()
|
|||
msMinTiming = 35;
|
||||
|
||||
delayedCommand->setInterval( msMinTiming * 2); // 20 byte message
|
||||
periodicPollingTimer->setInterval( msMinTiming ); // slower for s-meter poll
|
||||
periodicPollingTimer->setInterval( msMinTiming *5); // slower for s-meter poll
|
||||
|
||||
qInfo(logSystem()) << "Delay command interval timing: " << msMinTiming * 2 << "ms";
|
||||
qInfo(logSystem()) << "Periodic polling timer: " << msMinTiming << "ms";
|
||||
|
@ -4612,6 +4651,6 @@ void wfmain::on_wfLengthSlider_valueChanged(int value)
|
|||
void wfmain::on_debugBtn_clicked()
|
||||
{
|
||||
qInfo(logSystem()) << "Debug button pressed.";
|
||||
emit getTxPower();
|
||||
emit getFrequency();
|
||||
|
||||
}
|
||||
|
|
1
wfmain.h
1
wfmain.h
|
@ -462,6 +462,7 @@ private:
|
|||
void setPlotTheme(QCustomPlot *plot, bool isDark);
|
||||
void prepareWf();
|
||||
void prepareWf(unsigned int wfLength);
|
||||
void showHideSpectrum(bool show);
|
||||
void getInitialRigState();
|
||||
void setBandButtons();
|
||||
void showButton(QPushButton *btn);
|
||||
|
|
14
wfmain.ui
14
wfmain.ui
|
@ -26,7 +26,7 @@
|
|||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<widget class="QGroupBox" name="spectrumGroupBox">
|
||||
<property name="title">
|
||||
<string>Spectrum</string>
|
||||
</property>
|
||||
|
@ -44,12 +44,12 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_13">
|
||||
<layout class="QHBoxLayout" name="specControlsHorizLayout">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_26">
|
||||
<widget class="QLabel" name="specModeLabel">
|
||||
<property name="text">
|
||||
<string>Spectrum Mode: </string>
|
||||
</property>
|
||||
|
@ -66,7 +66,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<widget class="QLabel" name="specSpanLabel">
|
||||
<property name="text">
|
||||
<string>Span:</string>
|
||||
</property>
|
||||
|
@ -86,7 +86,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<widget class="QLabel" name="specEdgeLabel">
|
||||
<property name="text">
|
||||
<string>Edge</string>
|
||||
</property>
|
||||
|
@ -133,7 +133,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_31">
|
||||
<widget class="QLabel" name="specThemeLabel">
|
||||
<property name="text">
|
||||
<string>Theme:</string>
|
||||
</property>
|
||||
|
@ -150,7 +150,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<spacer name="specHorizSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
|
|
Ładowanie…
Reference in New Issue