- _session.set_device(_sampling_bar->get_selected_device());
-}
-
-void MainWindow::add_decoder(QObject *action)
-{
- assert(action);
- srd_decoder *const dec =
- (srd_decoder*)((QAction*)action)->data().value<void*>();
- assert(dec);
-
- const std::vector< boost::shared_ptr<view::Signal> > &sigs =
- _session.get_signals();
-
- GHashTable *const options = g_hash_table_new_full(g_str_hash,
- g_str_equal, g_free, (GDestroyNotify)g_variant_unref);
-
- dialogs::Decoder dlg(this, dec, sigs, options);
- if(dlg.exec() != QDialog::Accepted) {
- g_hash_table_destroy(options);
- return;
- }
-
- _session.add_decoder(dec, dlg.get_probes(), options);