Skip to content

Commit

Permalink
Merge pull request #1298 from willcode/feature/clear-waterfall
Browse files Browse the repository at this point in the history
plotter: clear waterfall using Delete key
  • Loading branch information
argilo authored Oct 3, 2023
2 parents 919a90a + 5397bcc commit db7fdc0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions resources/kbd-shortcuts.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions resources/news.txt
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 3 additions & 0 deletions src/applications/gqrx/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 7 additions & 0 deletions src/qtgui/plotter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/qtgui/plotter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit db7fdc0

Please sign in to comment.