X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdata%2Fdecode%2Frow.hpp;h=000bdf9e6b935c8ee838367c7a5c8460badfcca9;hp=21f46d22057fccaf71f32f4b419acc24980fb20f;hb=ae30ff422a495a6b1a4ad2893566628863ea222b;hpb=6a26fc4417798ab21654197e105e707a14d462f0 diff --git a/pv/data/decode/row.hpp b/pv/data/decode/row.hpp index 21f46d22..000bdf9e 100644 --- a/pv/data/decode/row.hpp +++ b/pv/data/decode/row.hpp @@ -22,6 +22,8 @@ #include +#include + #include #include @@ -32,6 +34,9 @@ namespace pv { namespace data { namespace decode { +#define DECODE_COLOR_SATURATION (180) /* 0-255 */ +#define DECODE_COLOR_VALUE (170) /* 0-255 */ + struct AnnotationClass; class Decoder; @@ -54,6 +59,14 @@ public: bool visible() const; void set_visible(bool visible); + void set_base_color(QColor base_color); + const QColor color() const; + const QColor get_class_color(uint32_t ann_class_id) const; + const QColor get_bright_class_color(uint32_t ann_class_id) const; + const QColor get_dark_class_color(uint32_t ann_class_id) const; + + bool has_hidden_classes() const; + bool operator<(const Row& other) const; bool operator==(const Row& other) const; @@ -62,6 +75,11 @@ private: Decoder* decoder_; const srd_decoder_annotation_row* srd_row_; bool visible_; + + QColor color_; + map ann_class_color_; + map ann_bright_class_color_; + map ann_dark_class_color_; }; } // namespace decode