X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdata%2Fdecode%2Fannotation.cpp;fp=pv%2Fdata%2Fdecode%2Fannotation.cpp;h=8ac8d5f9e4970e193771cffe107c414da73f077a;hp=e32dcc9fdc7f0b529dde1b90666b21abbe64e69e;hb=761f8302350c52f2cf357f49e1084e7101c70497;hpb=273798599b8be55a7ed9bbc99077b3478a094aec diff --git a/pv/data/decode/annotation.cpp b/pv/data/decode/annotation.cpp index e32dcc9f..8ac8d5f9 100644 --- a/pv/data/decode/annotation.cpp +++ b/pv/data/decode/annotation.cpp @@ -25,6 +25,7 @@ extern "C" { #include #include +#include using std::vector; @@ -104,6 +105,14 @@ Annotation::Class Annotation::ann_class_id() const return ann_class_id_; } +const QString Annotation::ann_class_name() const +{ + const AnnotationClass* ann_class = + row_->decoder()->get_ann_class_by_id(ann_class_id_); + + return QString(ann_class->name); +} + const vector* Annotation::annotations() const { return annotations_;