]> sigrok.org Git - pulseview.git/blobdiff - pv/data/decode/annotation.cpp
DecodeTrace: Add "%c" to the format string
[pulseview.git] / pv / data / decode / annotation.cpp
index e32dcc9fdc7f0b529dde1b90666b21abbe64e69e..8ac8d5f9e4970e193771cffe107c414da73f077a 100644 (file)
@@ -25,6 +25,7 @@ extern "C" {
 #include <vector>
 
 #include <pv/data/decode/annotation.hpp>
 #include <vector>
 
 #include <pv/data/decode/annotation.hpp>
+#include <pv/data/decode/decoder.hpp>
 
 using std::vector;
 
 
 using std::vector;
 
@@ -104,6 +105,14 @@ Annotation::Class Annotation::ann_class_id() const
        return ann_class_id_;
 }
 
        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<QString>* Annotation::annotations() const
 {
        return annotations_;
 const vector<QString>* Annotation::annotations() const
 {
        return annotations_;