X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fdata%2Fdecode%2Fannotation.hpp;h=aab5119c4b94596071cc01a4c7ddeb4bf439c580;hb=9d307c60d7fc2dee27bca6eaadd1e68bf7ab0cbf;hp=2be8e88d989e4cddacaa18d9b86156ca875c4e95;hpb=6f925ba9d6faf1077b73c5a5808259576081716a;p=pulseview.git
diff --git a/pv/data/decode/annotation.hpp b/pv/data/decode/annotation.hpp
index 2be8e88d..aab5119c 100644
--- a/pv/data/decode/annotation.hpp
+++ b/pv/data/decode/annotation.hpp
@@ -17,13 +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
+#include "pv/data/decode/row.hpp"
+
using std::vector;
struct srd_proto_data;
@@ -32,25 +36,48 @@ namespace pv {
namespace data {
namespace decode {
+class RowData;
+
class Annotation
{
public:
- Annotation(const srd_proto_data *const pdata);
+ 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);
+
+ const RowData* row_data() const;
+ const Row* row() const;
uint64_t start_sample() const;
uint64_t end_sample() const;
- int format() 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_;
- int format_;
- 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