const shared_ptr<Decoder> dec = make_shared<Decoder>(decoder, stack_.size());
stack_.push_back(dec);
+ connect(dec.get(), SIGNAL(annotation_visibility_changed()),
+ this, SLOT(on_annotation_visibility_changed()));
+
// Include the newly created decode channels in the channel lists
update_channel_list();
begin_decode();
}
-double DecodeSignal::samplerate() const
+double DecodeSignal::get_samplerate() const
{
double result = 0;
i = 0;
for (const AnnotationClass* ann_class : decoder->ann_classes()) {
settings.beginGroup("ann_class" + QString::number(i));
- settings.setValue("visible", ann_class->visible);
+ settings.setValue("visible", ann_class->visible());
settings.endGroup();
i++;
}
if (QString::fromUtf8(dec->id) == id) {
shared_ptr<Decoder> decoder = make_shared<Decoder>(dec, stack_.size());
+ connect(decoder.get(), SIGNAL(annotation_visibility_changed()),
+ this, SLOT(on_annotation_visibility_changed()));
+
stack_.push_back(decoder);
decoder->set_visible(settings.value("visible", true).toBool());
i = 0;
for (AnnotationClass* ann_class : decoder->ann_classes()) {
settings.beginGroup("ann_class" + QString::number(i));
- ann_class->visible = settings.value("visible", true).toBool();
+ ann_class->set_visible(settings.value("visible", true).toBool());
settings.endGroup();
i++;
}
it--;
ann_has_earlier_start = (pdata->start_sample < (*it)->start_sample());
ann_has_same_start = (pdata->start_sample == (*it)->start_sample());
- ann_is_longer = (new_ann_len > ((*it)->end_sample() - (*it)->start_sample()));
+ ann_is_longer = (new_ann_len > (*it)->length());
} while ((ann_has_earlier_start || (ann_has_same_start && ann_is_longer)) && (it != all_annotations.begin()));
// Allow inserting at the front
logic_mux_cond_.notify_one();
}
+void DecodeSignal::on_annotation_visibility_changed()
+{
+ annotation_visibility_changed();
+}
+
} // namespace data
} // namespace pv