X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fdata%2Fdecode%2Fannotation.hpp;h=aab5119c4b94596071cc01a4c7ddeb4bf439c580;hb=9d307c60d7fc2dee27bca6eaadd1e68bf7ab0cbf;hp=a107e0efeed7426584cbded2169ca639ffc47288;hpb=f228f00ed2c11ce4c9c36e0b758132a075e251da;p=pulseview.git
diff --git a/pv/data/decode/annotation.hpp b/pv/data/decode/annotation.hpp
index a107e0ef..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,28 +36,48 @@ namespace pv {
namespace data {
namespace decode {
+class RowData;
+
class Annotation
{
public:
- typedef uint32_t Class;
+ 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);
-public:
- Annotation(const srd_proto_data *const pdata);
+ const RowData* row_data() const;
+ const Row* row() const;
uint64_t start_sample() const;
uint64_t end_sample() const;
- Class ann_class() const;
- const vector& annotations() 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 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_;
- Class ann_class_;
- vector annotations_;
+ 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