From c481bbeff22339095de76fc2bd91b5d6edcae94e Mon Sep 17 00:00:00 2001 From: Jeff Long Date: Tue, 3 Oct 2023 09:04:50 -0400 Subject: [PATCH 1/2] plotter: clear waterfall using Delete key The waterfall is not automatically cleared after changes to the many settings that could cause it to be distorted or invalid. An explicit clear allows users who do not want to see outdated data to get rid of it. Signed-off-by: Jeff Long --- resources/kbd-shortcuts.txt | 1 + src/applications/gqrx/mainwindow.cpp | 3 +++ src/qtgui/plotter.cpp | 7 +++++++ src/qtgui/plotter.h | 1 + 4 files changed, 12 insertions(+) diff --git a/resources/kbd-shortcuts.txt b/resources/kbd-shortcuts.txt index 1a76518b9..ff8849960 100644 --- a/resources/kbd-shortcuts.txt +++ b/resources/kbd-shortcuts.txt @@ -12,6 +12,7 @@ Main window actions: F11 Toggle full screen mode F Set focus to the frequency controller Z Zero frequency offset + Delete Clear waterfall Ctrl+Q Quit the program Receiver modes: diff --git a/src/applications/gqrx/mainwindow.cpp b/src/applications/gqrx/mainwindow.cpp index 765347b7b..09403fe78 100644 --- a/src/applications/gqrx/mainwindow.cpp +++ b/src/applications/gqrx/mainwindow.cpp @@ -172,6 +172,9 @@ MainWindow::MainWindow(const QString& cfgfile, bool edit_conf, QWidget *parent) // toggle markers on/off auto *toggle_markers_shortcut = new QShortcut(QKeySequence(Qt::CTRL | Qt::Key_K), this); QObject::connect(toggle_markers_shortcut, &QShortcut::activated, this, &MainWindow::toggleMarkers); + // clear waterfall + auto *clear_waterfall_shortcut = new QShortcut(Qt::Key_Delete, this); + QObject::connect(clear_waterfall_shortcut, SIGNAL(activated()), ui->plotter, SLOT(clearWaterfall())); setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea); setCorner(Qt::TopRightCorner, Qt::RightDockWidgetArea); diff --git a/src/qtgui/plotter.cpp b/src/qtgui/plotter.cpp index b5d17ae7a..990bba4f0 100644 --- a/src/qtgui/plotter.cpp +++ b/src/qtgui/plotter.cpp @@ -2455,6 +2455,13 @@ void CPlotter::setMarkers(qint64 a, qint64 b) updateOverlay(); } +void CPlotter::clearWaterfall() +{ + if (!m_WaterfallPixmap.isNull()) { + m_WaterfallPixmap.fill(Qt::black); + } +} + void CPlotter::calcDivSize (qint64 low, qint64 high, int divswanted, qint64 &adjlow, qint64 &step, int& divs) { qCDebug(plotter) << "low:" << low; diff --git a/src/qtgui/plotter.h b/src/qtgui/plotter.h index 7d1b04146..7e322440c 100644 --- a/src/qtgui/plotter.h +++ b/src/qtgui/plotter.h @@ -181,6 +181,7 @@ public slots: void enableBandPlan(bool enable); void enableMarkers(bool enabled); void setMarkers(qint64 a, qint64 b); + void clearWaterfall(); void updateOverlay(); void setPercent2DScreen(int percent) From 5397bcc1121c7481d6f0877e184d81965bdb1f07 Mon Sep 17 00:00:00 2001 From: Clayton Smith Date: Tue, 3 Oct 2023 09:16:11 -0400 Subject: [PATCH 2/2] Update news --- resources/news.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/news.txt b/resources/news.txt index 42b76c36e..f9c3e4b3d 100644 --- a/resources/news.txt +++ b/resources/news.txt @@ -1,4 +1,9 @@ + 2.17.1: In progress... + + NEW: Delete key clears the waterfall. + + 2.17: Released October 1, 2023 NEW: "Avg" plot mode, which displays average of FFT bins.