+ index_(0),
+ decoder_(nullptr),
+ srd_row_(nullptr),
+ visible_(true)
+{
+}
+
+Row::Row(uint32_t index, Decoder* decoder, const srd_decoder_annotation_row* srd_row) :
+ index_(index),
+ decoder_(decoder),
+ srd_row_(srd_row),
+ visible_(true)
+{
+}
+
+const Decoder* Row::decoder() const
+{
+ return decoder_;
+}
+
+const srd_decoder_annotation_row* Row::get_srd_row() const
+{
+ return srd_row_;
+}
+
+const QString Row::title() const
+{
+ if (decoder_ && decoder_->name() && srd_row_ && srd_row_->desc)
+ return QString("%1: %2")
+ .arg(QString::fromUtf8(decoder_->name()),
+ QString::fromUtf8(srd_row_->desc));
+ if (decoder_ && decoder_->name())
+ return QString::fromUtf8(decoder_->name());
+ if (srd_row_ && srd_row_->desc)
+ return QString::fromUtf8(srd_row_->desc);
+
+ return QString();
+}
+
+const QString Row::description() const
+{
+ if (srd_row_ && srd_row_->desc)
+ return QString::fromUtf8(srd_row_->desc);
+ return QString();
+}
+
+vector<AnnotationClass*> Row::ann_classes() const
+{
+ assert(decoder_);
+
+ vector<AnnotationClass*> result;
+
+ if (!srd_row_) {
+ if (index_ == 0) {
+ // When operating as the fallback row, all annotation classes belong to it
+ return decoder_->ann_classes();
+ }
+ return result;
+ }
+
+ for (GSList *l = srd_row_->ann_classes; l; l = l->next) {
+ size_t class_id = (size_t)l->data;
+ result.push_back(decoder_->get_ann_class_by_id(class_id));
+ }
+
+ return result;
+}
+
+uint32_t Row::index() const