From: Joel Holdsworth Date: Sun, 10 Nov 2013 21:44:41 +0000 (+0000) Subject: Integrated stacking button X-Git-Tag: pulseview-0.2.0~221 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=ce94e4fd5d7ab666259231d21759613f1f2b93ee;p=pulseview.git Integrated stacking button --- diff --git a/pv/view/decodetrace.cpp b/pv/view/decodetrace.cpp index 28443673..29c4a6e9 100644 --- a/pv/view/decodetrace.cpp +++ b/pv/view/decodetrace.cpp @@ -31,6 +31,7 @@ extern "C" { #include #include #include +#include #include "decodetrace.h" @@ -39,6 +40,7 @@ extern "C" { #include #include #include +#include using namespace boost; using namespace std; @@ -179,6 +181,17 @@ void DecodeTrace::populate_popup_form(QWidget *parent, QFormLayout *form) parent)); _binding.add_properties_to_form(form, true); } + + // Add stacking button + QPushButton *const stack_button = + new QPushButton(tr("Stack Decoder"), parent); + pv::widgets::DecoderMenu *const decoder_menu = + new pv::widgets::DecoderMenu(parent); + stack_button->setMenu(decoder_menu); + + QHBoxLayout *stack_button_box = new QHBoxLayout; + stack_button_box->addWidget(stack_button, 0, Qt::AlignRight); + form->addRow(stack_button_box); } QMenu* DecodeTrace::create_context_menu(QWidget *parent)