X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fdata%2Fdecode%2Fannotation.cpp;fp=pv%2Fdata%2Fdecode%2Fannotation.cpp;h=829bdbaf9a700b645f9fb55d6b7bdf0a725855ca;hb=ae30ff422a495a6b1a4ad2893566628863ea222b;hp=9f86b2bab84362e26503233c3cb516ee7ebcdf41;hpb=1dcd9b18186741d3ce3164f7e8d6cb13abb578d3;p=pulseview.git diff --git a/pv/data/decode/annotation.cpp b/pv/data/decode/annotation.cpp index 9f86b2ba..829bdbaf 100644 --- a/pv/data/decode/annotation.cpp +++ b/pv/data/decode/annotation.cpp @@ -66,8 +66,9 @@ Annotation& Annotation::operator=(Annotation&& a) return *this; } -Annotation::~Annotation() +const Row* Annotation::row() const { + return data_->row(); } uint64_t Annotation::start_sample() const @@ -103,9 +104,19 @@ const QString Annotation::longest_annotation() const return texts_->front(); } -const Row* Annotation::row() const +const QColor Annotation::color() const { - return data_->row(); + return data_->row()->get_class_color(ann_class_id_); +} + +const QColor Annotation::bright_color() const +{ + return data_->row()->get_bright_class_color(ann_class_id_); +} + +const QColor Annotation::dark_color() const +{ + return data_->row()->get_dark_class_color(ann_class_id_); } bool Annotation::operator<(const Annotation &other) const