X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdata%2Fdecode%2Fannotation.hpp;h=aab5119c4b94596071cc01a4c7ddeb4bf439c580;hp=57ca46950384d16632cab87b0596b0fba9baab43;hb=8845be3c9c7d5aca02fb2efc4038f4735a5242d6;hpb=d656b01007629b239b51ab34e5a0219ef4f2595a diff --git a/pv/data/decode/annotation.hpp b/pv/data/decode/annotation.hpp index 57ca4695..aab5119c 100644 --- a/pv/data/decode/annotation.hpp +++ b/pv/data/decode/annotation.hpp @@ -17,8 +17,8 @@ * along with this program; if not, see . */ -#ifndef PULSEVIEW_PV_VIEW_DECODE_ANNOTATION_HPP -#define PULSEVIEW_PV_VIEW_DECODE_ANNOTATION_HPP +#ifndef PULSEVIEW_PV_DATA_DECODE_ANNOTATION_HPP +#define PULSEVIEW_PV_DATA_DECODE_ANNOTATION_HPP #include #include @@ -26,6 +26,8 @@ #include #include +#include "pv/data/decode/row.hpp" + using std::vector; struct srd_proto_data; @@ -34,17 +36,13 @@ namespace pv { namespace data { namespace decode { -class Row; class RowData; class Annotation { -public: - typedef uint32_t Class; - public: Annotation(uint64_t start_sample, uint64_t end_sample, - const vector* texts, Class ann_class_id, const RowData *data); + const vector* texts, uint32_t ann_class_id, const RowData *data); Annotation(Annotation&& a); Annotation& operator=(Annotation&& a); @@ -55,13 +53,15 @@ public: uint64_t end_sample() const; uint64_t length() const; - Class ann_class_id() const; + uint32_t ann_class_id() const; const QString ann_class_name() const; const QString ann_class_description() const; const vector* annotations() const; const QString longest_annotation() const; + bool visible() const; + const QColor color() const; const QColor bright_color() const; const QColor dark_color() const; @@ -72,7 +72,7 @@ private: uint64_t start_sample_; uint64_t end_sample_; const vector* texts_; - Class ann_class_id_; + uint32_t ann_class_id_; const RowData* data_; }; @@ -80,4 +80,4 @@ private: } // namespace data } // namespace pv -#endif // PULSEVIEW_PV_VIEW_DECODE_ANNOTATION_HPP +#endif // PULSEVIEW_PV_DATA_DECODE_ANNOTATION_HPP