From: Uwe Hermann Date: Tue, 17 Dec 2019 06:19:36 +0000 (+0100) Subject: Use 'd' shortcut to show/hide decoder selector, also ESC to hide it. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=6b8b739df2fedddbf3f5838d64442e073ba43484;p=pulseview.git Use 'd' shortcut to show/hide decoder selector, also ESC to hide it. --- diff --git a/doc/pulseview.1 b/doc/pulseview.1 index 9c993070..0aecb3c0 100644 --- a/doc/pulseview.1 +++ b/doc/pulseview.1 @@ -1,4 +1,4 @@ -.TH PULSEVIEW 1 "July 31, 2019" +.TH PULSEVIEW 1 "December 17, 2019" .SH "NAME" PulseView \- Qt-based LA/scope/MSO GUI for sigrok .SH "SYNOPSIS" @@ -90,6 +90,9 @@ Show / hide analog minor grid (in addition to the vdiv grid). .B "c" Show / hide cursors. .TP +.B "d" +Show / hide protocol decoder selector. +.TP .B "b" Toggle between coloured trace backgrounds and alternating light/dark gray trace backgrounds. diff --git a/pv/mainwindow.cpp b/pv/mainwindow.cpp index 51ebda83..2823adc0 100644 --- a/pv/mainwindow.cpp +++ b/pv/mainwindow.cpp @@ -306,6 +306,9 @@ shared_ptr MainWindow::add_subwindow( dock->findChildren // clazy:exclude=detaching-temporary ("qt_dockwidget_closebutton").front(); + // Allow all subwindows to be closed via ESC. + close_btn->setShortcut(QKeySequence(Qt::Key_Escape)); + connect(close_btn, SIGNAL(clicked(bool)), this, SLOT(on_sub_window_close_clicked())); diff --git a/pv/toolbars/mainbar.cpp b/pv/toolbars/mainbar.cpp index 3836b09a..a7998b40 100644 --- a/pv/toolbars/mainbar.cpp +++ b/pv/toolbars/mainbar.cpp @@ -226,6 +226,7 @@ MainBar::MainBar(Session &session, QWidget *parent, pv::views::trace::View *view add_decoder_button_->setIcon(QIcon(":/icons/add-decoder.svg")); add_decoder_button_->setPopupMode(QToolButton::InstantPopup); add_decoder_button_->setToolTip(tr("Add protocol decoder")); + add_decoder_button_->setShortcut(QKeySequence(Qt::Key_D)); connect(add_decoder_button_, SIGNAL(clicked()), this, SLOT(on_add_decoder_clicked()));