X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fdecodesignal.cpp;h=32307e9c99dcf5d739205df177d904af5bf05ff0;hb=b213ef0991a13af0c74ffe5c54382c5c455c5496;hp=b151b3911d13ef6beb570cb092cefae115660ef1;hpb=f9abdc014adda6771828db4c8caa8f66e066b7a3;p=pulseview.git diff --git a/pv/view/decodesignal.cpp b/pv/view/decodesignal.cpp index b151b39..32307e9 100644 --- a/pv/view/decodesignal.cpp +++ b/pv/view/decodesignal.cpp @@ -24,7 +24,10 @@ extern "C" { #include +#include + #include +#include #include "decodesignal.h" @@ -59,11 +62,6 @@ DecodeSignal::DecodeSignal(pv::SigSession &session, this, SLOT(on_new_decode_data())); } -void DecodeSignal::init_context_bar_actions(QWidget *parent) -{ - (void)parent; -} - bool DecodeSignal::enabled() const { return true; @@ -109,12 +107,6 @@ void DecodeSignal::paint_mid(QPainter &p, int left, int right) } } -const list DecodeSignal::get_context_bar_actions() -{ - list actions; - return actions; -} - QMenu* DecodeSignal::create_context_menu(QWidget *parent) { QMenu *const menu = Trace::create_context_menu(parent); @@ -122,6 +114,7 @@ QMenu* DecodeSignal::create_context_menu(QWidget *parent) menu->addSeparator(); QAction *const del = new QAction(tr("Delete"), this); + del->setShortcuts(QKeySequence::Delete); connect(del, SIGNAL(triggered()), this, SLOT(on_delete())); menu->addAction(del); @@ -134,6 +127,11 @@ void DecodeSignal::on_new_decode_data() _view->update_viewport(); } +void DecodeSignal::delete_pressed() +{ + on_delete(); +} + void DecodeSignal::on_delete() { _session.remove_decode_signal(this);