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/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. 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)