Spectrum GUI: updates to the go to markers feature and documentation

This commit is contained in:
f4exb 2022-06-25 02:53:11 +02:00
parent a3dfc3850e
commit 58328ace0d
8 changed files with 17 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -43,6 +43,7 @@
DeviceUISet::DeviceUISet(int deviceSetIndex, DeviceSet *deviceSet)
{
m_spectrum = new GLSpectrum;
m_spectrum->setIsDeviceSpectrum(true);
m_spectrumVis = deviceSet->m_spectrumVis;
m_spectrumVis->setGLSpectrum(m_spectrum);
m_spectrumGUI = new GLSpectrumGUI;

View File

@ -107,7 +107,8 @@ GLSpectrum::GLSpectrum(QWidget* parent) :
m_calibrationShiftdB(0.0),
m_calibrationInterpMode(SpectrumSettings::CalibInterpLinear),
m_messageQueueToGUI(nullptr),
m_openGLLogger(nullptr)
m_openGLLogger(nullptr),
m_isDeviceSpectrum(false)
{
// Enable multisampling anti-aliasing (MSAA)
int multisamples = MainCore::instance()->getSettings().getMultisampling();

View File

@ -201,6 +201,8 @@ public:
void setCalibrationPoints(const QList<SpectrumCalibrationPoint>& calibrationPoints);
SpectrumSettings::CalibrationInterpolationMode& getCalibrationInterpMode() { return m_calibrationInterpMode; }
void setCalibrationInterpMode(SpectrumSettings::CalibrationInterpolationMode mode);
void setIsDeviceSpectrum(bool isDeviceSpectrum) { m_isDeviceSpectrum = isDeviceSpectrum; }
bool isDeviceSpectrum() const { return m_isDeviceSpectrum; }
private:
struct ChannelMarkerState {
@ -364,6 +366,7 @@ private:
MessageQueue *m_messageQueueToGUI;
QOpenGLDebugLogger *m_openGLLogger;
bool m_isDeviceSpectrum;
void updateWaterfall(const Real *spectrum);
void update3DSpectrogram(const Real *spectrum);

View File

@ -235,6 +235,7 @@ void GLSpectrumGUI::displayGotoMarkers()
{
ui->gotoMarker->clear();
ui->gotoMarker->addItem("Go to...");
for (auto marker : m_settings.m_annoationMarkers)
{
if (marker.m_show != SpectrumAnnotationMarker::Hidden)
@ -244,7 +245,8 @@ void GLSpectrumGUI::displayGotoMarkers()
ui->gotoMarker->addItem(QString("%1 - %2").arg(marker.m_text).arg(freqString));
}
}
ui->gotoMarker->setVisible(ui->gotoMarker->count() > 1);
ui->gotoMarker->setVisible(m_glSpectrum && m_glSpectrum->isDeviceSpectrum() && (ui->gotoMarker->count() > 1));
}
QString GLSpectrumGUI::displayScaled(int64_t value, char type, int precision, bool showMult)
@ -263,6 +265,7 @@ QString GLSpectrumGUI::displayScaled(int64_t value, char type, int precision, bo
return tr("%1").arg(QString::number(value, 'e', precision));
}
}
void GLSpectrumGUI::blockApplySettings(bool block)
{
m_doApplySettings = !block;
@ -465,6 +468,7 @@ void GLSpectrumGUI::on_markers_clicked(bool checked)
m_settings.m_annoationMarkers = m_glSpectrum->getAnnotationMarkers();
m_settings.m_markersDisplay = m_glSpectrum->getMarkersDisplay();
displayGotoMarkers();
applySettings();
}

View File

@ -352,6 +352,9 @@ Use the toggle button to switch between relative and calibrated power readings.
Right click to open the [calibration management dialog](spectrumcalibration.md)
<h4>B.6.5: Go to annotation marker</h4>
This combo only appears if the spectrum display is the spectrum of a device (i.e. main spectrum) and if there are visible annotation markers. It allows to set the device center frequency to the frequency of the selected annotation marker.
<h2>3D Spectrogram Controls</h2>

View File

@ -1025,7 +1025,7 @@ void MainWindow::removeLastDeviceSet()
m_deviceUIs.back()->m_deviceGUI->destroy();
m_deviceUIs.back()->m_deviceAPI->resetSamplingDeviceId();
m_deviceUIs.back()->m_deviceAPI->getPluginInterface()->deleteSampleSourcePluginInstanceInput(
m_deviceUIs.back()->m_deviceAPI->getSampleSource());
m_deviceUIs.back()->m_deviceAPI->getSampleSource());
m_deviceUIs.back()->m_deviceAPI->clearBuddiesLists(); // clear old API buddies lists
DeviceAPI *sourceAPI = m_deviceUIs.back()->m_deviceAPI;
@ -1048,7 +1048,7 @@ void MainWindow::removeLastDeviceSet()
m_deviceUIs.back()->m_deviceGUI->destroy();
m_deviceUIs.back()->m_deviceAPI->resetSamplingDeviceId();
m_deviceUIs.back()->m_deviceAPI->getPluginInterface()->deleteSampleSinkPluginInstanceOutput(
m_deviceUIs.back()->m_deviceAPI->getSampleSink());
m_deviceUIs.back()->m_deviceAPI->getSampleSink());
m_deviceUIs.back()->m_deviceAPI->clearBuddiesLists(); // clear old API buddies lists
DeviceAPI *sinkAPI = m_deviceUIs.back()->m_deviceAPI;
@ -1072,7 +1072,7 @@ void MainWindow::removeLastDeviceSet()
m_deviceUIs.back()->m_deviceGUI->destroy();
m_deviceUIs.back()->m_deviceAPI->resetSamplingDeviceId();
m_deviceUIs.back()->m_deviceAPI->getPluginInterface()->deleteSampleMIMOPluginInstanceMIMO(
m_deviceUIs.back()->m_deviceAPI->getSampleMIMO());
m_deviceUIs.back()->m_deviceAPI->getSampleMIMO());
DeviceAPI *mimoAPI = m_deviceUIs.back()->m_deviceAPI;
delete m_deviceUIs.back();