X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdata%2Fdecode%2Fannotation.hpp;h=717206a4b97b06b6f73eecb09b315002ebf6db0f;hp=071f292a8c2fa1a687295590a94b9cb5d67b3bb4;hb=1e948182f3f9353bd74875a37cacc833312a8c8e;hpb=7a01bd3654ed046216308fa64edfd79be7cd525f
diff --git a/pv/data/decode/annotation.hpp b/pv/data/decode/annotation.hpp
index 071f292a..717206a4 100644
--- a/pv/data/decode/annotation.hpp
+++ b/pv/data/decode/annotation.hpp
@@ -14,38 +14,66 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see .
*/
#ifndef PULSEVIEW_PV_VIEW_DECODE_ANNOTATION_HPP
#define PULSEVIEW_PV_VIEW_DECODE_ANNOTATION_HPP
-#include
+#include
+#include
+#include
#include
+#include "pv/data/decode/row.hpp"
+
+using std::vector;
+
struct srd_proto_data;
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 std::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_;
- std::vector annotations_;
+ const vector* texts_;
+ uint32_t ann_class_id_;
+ const RowData* data_;
};
} // namespace decode