]> sigrok.org Git - pulseview.git/commitdiff
Use 'd' shortcut to show/hide decoder selector, also ESC to hide it.
authorUwe Hermann <redacted>
Tue, 17 Dec 2019 06:19:36 +0000 (07:19 +0100)
committerUwe Hermann <redacted>
Tue, 17 Dec 2019 11:25:37 +0000 (12:25 +0100)
doc/pulseview.1
pv/mainwindow.cpp
pv/toolbars/mainbar.cpp

index 9c9930706114786a50e69e4701e7269a24a67ff8..0aecb3c098e86b68648a0bc3fa64b98a18a9db0a 100644 (file)
@@ -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.
index 51ebda8369a05be3ec1d3555cb9e0e5f1bb24015..2823adc0ec08e1f9f3f341ef7e52415c506471b0 100644 (file)
@@ -306,6 +306,9 @@ shared_ptr<subwindows::SubWindowBase> MainWindow::add_subwindow(
                dock->findChildren<QAbstractButton*>  // 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()));
 
index 3836b09a78786516ce66514337f40e5e3517425f..a7998b4046511077502a4971bdfa7bc55d3e21d0 100644 (file)
@@ -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()));