+ DecodeSignal* signal = dynamic_cast<DecodeSignal*>(sb);
+ assert(signal);
+
+ // Update all decoder entries provided by this signal
+ auto stack = signal->decoder_stack();
+ if (stack.size() > 1) {
+ for (const shared_ptr<Decoder>& dec : stack) {
+ QString title = QString("%1 (%2)").arg(signal->name(), dec->name());
+ int index = decoder_selector_->findData(QVariant::fromValue((void*)dec.get()));
+
+ if (index != -1)
+ decoder_selector_->setItemText(index, title);
+ }
+ } else
+ if (!stack.empty()) {
+ shared_ptr<Decoder>& dec = stack.at(0);
+ int index = decoder_selector_->findData(QVariant::fromValue((void*)dec.get()));
+
+ if (index != -1)
+ decoder_selector_->setItemText(index, signal->name());
+ }
+}
+
+void View::on_new_binary_data(unsigned int segment_id, void* decoder, unsigned int bin_class_id)
+{
+ if ((segment_id == current_segment_) && (decoder == decoder_) && (bin_class_id == bin_class_id_))
+ if (!delayed_view_updater_.isActive())
+ delayed_view_updater_.start();
+}
+
+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);
+
+ // Only add the decoder if it has binary output
+ if (d->get_binary_class_count() == 0)
+ return;
+
+ // 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));
+