X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fdialogs%2Fdecoder.cpp;h=b7ddb52135a52824c0f335a67b6c47d0e8f708d6;hb=67fe5e9c02e4e9cfe94d465a0a5e5b598129e4e3;hp=1611d9b3217c9b22fd75192fc0d956e3d736aca5;hpb=4206fe26e6b3f6439e382a072f5ff67c009f412a;p=pulseview.git diff --git a/pv/dialogs/decoder.cpp b/pv/dialogs/decoder.cpp index 1611d9b..b7ddb52 100644 --- a/pv/dialogs/decoder.cpp +++ b/pv/dialogs/decoder.cpp @@ -40,10 +40,12 @@ namespace pv { namespace dialogs { Decoder::Decoder(QWidget *parent, const srd_decoder *decoder, - const vector< shared_ptr > &sigs) : + const vector< shared_ptr > &sigs, GHashTable *options) : QDialog(parent), _decoder(decoder), _sigs(sigs), + _options(options), + _binding(decoder, options), _layout(this), _form(this), _form_layout(&_form), @@ -97,6 +99,19 @@ Decoder::Decoder(QWidget *parent, const srd_decoder *decoder, _form_layout.addRow(new QLabel( tr("* Required Probes"), &_form)); + + // Add the options + if (!_binding.properties().empty()) { + _form_layout.addRow(new QLabel(tr("

Options

"), + &_form)); + _binding.add_properties_to_form(&_form_layout); + } +} + +void Decoder::accept() +{ + QDialog::accept(); + _binding.commit(); } QComboBox* Decoder::create_probe_selector(