+void View::on_decoder_stacked(void* decoder)
+{
+ // TODO This doesn't change existing entries for the same signal - but it should as the naming scheme may change
+
+ Decoder* d = static_cast<Decoder*>(decoder);
+
+ // Find the signal that contains the selected decoder
+ DecodeSignal* signal = nullptr;
+
+ for (const shared_ptr<DecodeSignal>& ds : decode_signals_)
+ for (const shared_ptr<Decoder>& dec : ds->decoder_stack())
+ if (d == dec.get())
+ signal = ds.get();
+
+ assert(signal);
+
+ // Add the decoder to the list
+ QString title = QString("%1 (%2)").arg(signal->name(), d->name());
+ decoder_selector_->addItem(title, QVariant::fromValue((void*)d));
+}
+
+void View::on_decoder_removed(void* decoder)
+{
+ Decoder* d = static_cast<Decoder*>(decoder);
+
+ // Remove the decoder from the list
+ int index = decoder_selector_->findData(QVariant::fromValue((void*)d));
+
+ if (index != -1)
+ decoder_selector_->removeItem(index);
+}
+
+