mirror of
https://github.com/gqrx-sdr/gqrx.git
synced 2024-09-21 10:47:10 +00:00
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 <willcode4@gmail.com>
This commit is contained in:
parent
919a90aaec
commit
c481bbeff2
@ -12,6 +12,7 @@ Main window actions:
|
|||||||
F11 Toggle full screen mode
|
F11 Toggle full screen mode
|
||||||
F Set focus to the frequency controller
|
F Set focus to the frequency controller
|
||||||
Z Zero frequency offset
|
Z Zero frequency offset
|
||||||
|
Delete Clear waterfall
|
||||||
Ctrl+Q Quit the program
|
Ctrl+Q Quit the program
|
||||||
|
|
||||||
Receiver modes:
|
Receiver modes:
|
||||||
|
@ -172,6 +172,9 @@ MainWindow::MainWindow(const QString& cfgfile, bool edit_conf, QWidget *parent)
|
|||||||
// toggle markers on/off
|
// toggle markers on/off
|
||||||
auto *toggle_markers_shortcut = new QShortcut(QKeySequence(Qt::CTRL | Qt::Key_K), this);
|
auto *toggle_markers_shortcut = new QShortcut(QKeySequence(Qt::CTRL | Qt::Key_K), this);
|
||||||
QObject::connect(toggle_markers_shortcut, &QShortcut::activated, this, &MainWindow::toggleMarkers);
|
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::TopLeftCorner, Qt::LeftDockWidgetArea);
|
||||||
setCorner(Qt::TopRightCorner, Qt::RightDockWidgetArea);
|
setCorner(Qt::TopRightCorner, Qt::RightDockWidgetArea);
|
||||||
|
@ -2455,6 +2455,13 @@ void CPlotter::setMarkers(qint64 a, qint64 b)
|
|||||||
updateOverlay();
|
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)
|
void CPlotter::calcDivSize (qint64 low, qint64 high, int divswanted, qint64 &adjlow, qint64 &step, int& divs)
|
||||||
{
|
{
|
||||||
qCDebug(plotter) << "low:" << low;
|
qCDebug(plotter) << "low:" << low;
|
||||||
|
@ -181,6 +181,7 @@ public slots:
|
|||||||
void enableBandPlan(bool enable);
|
void enableBandPlan(bool enable);
|
||||||
void enableMarkers(bool enabled);
|
void enableMarkers(bool enabled);
|
||||||
void setMarkers(qint64 a, qint64 b);
|
void setMarkers(qint64 a, qint64 b);
|
||||||
|
void clearWaterfall();
|
||||||
void updateOverlay();
|
void updateOverlay();
|
||||||
|
|
||||||
void setPercent2DScreen(int percent)
|
void setPercent2DScreen(int percent)
|
||||||
|
Loading…
Reference in New Issue
Block a user