X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fdata%2Fdecode%2Fannotation.hpp;h=aab5119c4b94596071cc01a4c7ddeb4bf439c580;hb=1c552f400ee967f7a489853578c4d8d4bd2edfbf;hp=1bb9ad34c046a215321d6e276b3ddea6bb453106;hpb=462941e2626cef9855e810abdb0458e99ee1c5f1;p=pulseview.git diff --git a/pv/data/decode/annotation.hpp b/pv/data/decode/annotation.hpp index 1bb9ad34..aab5119c 100644 --- a/pv/data/decode/annotation.hpp +++ b/pv/data/decode/annotation.hpp @@ -17,14 +17,17 @@ * 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 +#include #include +#include "pv/data/decode/row.hpp" + using std::vector; struct srd_proto_data; @@ -33,37 +36,48 @@ namespace pv { namespace data { namespace decode { -class Row; +class RowData; class Annotation { public: - typedef uint32_t Class; - -public: - Annotation(const srd_proto_data *const pdata, const Row *row); + Annotation(uint64_t start_sample, uint64_t end_sample, + const vector* texts, uint32_t ann_class_id, const RowData *data); Annotation(Annotation&& a); Annotation& operator=(Annotation&& a); - ~Annotation(); + + const RowData* row_data() const; + const Row* row() const; uint64_t start_sample() const; uint64_t end_sample() const; - Class ann_class_id() const; + uint64_t length() const; + + uint32_t ann_class_id() const; + const QString ann_class_name() const; + const QString ann_class_description() const; + const vector* annotations() const; - const Row* row() const; + const QString longest_annotation() const; + + bool visible() const; + + const QColor color() const; + const QColor bright_color() const; + const QColor dark_color() const; bool operator<(const Annotation &other) const; private: uint64_t start_sample_; uint64_t end_sample_; - vector* annotations_; - const Row *row_; - Class ann_class_id_; + const vector* texts_; + uint32_t ann_class_id_; + const RowData* data_; }; } // namespace decode } // namespace data } // namespace pv -#endif // PULSEVIEW_PV_VIEW_DECODE_ANNOTATION_HPP +#endif // PULSEVIEW_PV_DATA_DECODE_ANNOTATION_HPP