1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-05 15:34:57 -04:00

communicate from spectrum GUI to markers dialog and fixed some warning issues

This commit is contained in:
f4exb
2022-10-01 20:58:21 +02:00
parent 7e35eeb69c
commit 3011e066a1
5 changed files with 93 additions and 6 deletions
+19 -2
View File
@@ -24,6 +24,7 @@
#include <QFileDialog>
#include <QMessageBox>
#include <QDesktopWidget>
#include <QScreen>
#include "gui/glspectrumgui.h"
#include "dsp/fftwindow.h"
@@ -477,8 +478,8 @@ void GLSpectrumGUI::on_markers_clicked(bool checked)
connect(m_markersDialog, SIGNAL(finished(int)), this, SLOT(closeMarkersDialog()));
QPoint globalCursorPos = QCursor::pos();
int mouseScreen = qApp->desktop()->screenNumber(globalCursorPos);
QRect mouseScreenGeometry = qApp->desktop()->screen(mouseScreen)->geometry();
QScreen *screen = QGuiApplication::screenAt(globalCursorPos);
QRect mouseScreenGeometry = screen->geometry();
QPoint localCursorPos = globalCursorPos - mouseScreenGeometry.topLeft();
m_markersDialog->move(localCursorPos);
@@ -929,6 +930,20 @@ bool GLSpectrumGUI::handleMessage(const Message& message)
ui->refLevel->blockSignals(false);
return true;
}
else if (GLSpectrumView::MsgReportHistogramMarkersChange::match(message))
{
if (m_markersDialog) {
m_markersDialog->updateHistogramMarkersDisplay();
}
return true;
}
else if (GLSpectrumView::MsgReportWaterfallMarkersChange::match(message))
{
if (m_markersDialog) {
m_markersDialog->updateWaterfallMarkersDisplay();
}
return true;
}
else if (SpectrumVis::MsgStartStop::match(message))
{
const SpectrumVis::MsgStartStop& msg = (SpectrumVis::MsgStartStop&) message;
@@ -1035,6 +1050,8 @@ void GLSpectrumGUI::updateCalibrationPoints()
void GLSpectrumGUI::on_measure_clicked(bool checked)
{
(void) checked;
SpectrumMeasurementsDialog measurementsDialog(
m_glSpectrum,
&m_settings,