namespace decode {
Annotation::Annotation(uint64_t start_sample, uint64_t end_sample,
- const vector<QString>* texts, Class ann_class_id, const RowData *data) :
+ const vector<QString>* texts, uint32_t ann_class_id, const RowData *data) :
start_sample_(start_sample),
end_sample_(end_sample),
texts_(texts),
return end_sample_ - start_sample_;
}
-Annotation::Class Annotation::ann_class_id() const
+uint32_t Annotation::ann_class_id() const
{
return ann_class_id_;
}
#include <QColor>
#include <QString>
+#include "pv/data/decode/row.hpp"
+
using std::vector;
struct srd_proto_data;
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<QString>* texts, Class ann_class_id, const RowData *data);
+ const vector<QString>* texts, uint32_t ann_class_id, const RowData *data);
Annotation(Annotation&& a);
Annotation& operator=(Annotation&& a);
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;
uint64_t start_sample_;
uint64_t end_sample_;
const vector<QString>* texts_;
- Class ann_class_id_;
+ uint32_t ann_class_id_;
const RowData* data_;
};
#include <QObject>
-#include <pv/data/signalbase.hpp>
#include <pv/data/decode/row.hpp>
using std::deque;
using std::map;
+using std::shared_ptr;
using std::string;
using std::vector;
#ifndef PULSEVIEW_PV_DATA_DECODE_ROW_HPP
#define PULSEVIEW_PV_DATA_DECODE_ROW_HPP
+#include <map>
#include <vector>
+#include <QObject>
#include <QColor>
-#include <pv/data/decode/annotation.hpp>
-#include <pv/data/decode/decoder.hpp>
-
struct srd_decoder;
struct srd_decoder_annotation_row;
+using std::map;
+using std::vector;
+
namespace pv {
namespace data {
namespace decode {
{
const srd_proto_data_annotation *const pda = (const srd_proto_data_annotation*)pdata->data;
- Annotation::Class ann_class_id = (Annotation::Class)(pda->ann_class);
+ uint32_t ann_class_id = pda->ann_class;
// Look up the longest annotation text to see if we have it in storage.
// This implies that if the longest text is the same, the shorter texts
void DecodeTrace::draw_annotations(deque<const Annotation*>& annotations,
QPainter &p, const ViewItemPaintParams &pp, int y, const DecodeTraceRow& row)
{
- Annotation::Class block_class = 0;
+ uint32_t block_class = 0;
bool block_class_uniform = true;
qreal block_start = 0;
int block_ann_count = 0;
}
void DecodeTrace::draw_annotation_block(qreal start, qreal end,
- Annotation::Class ann_class, bool use_ann_format, QPainter &p, int y,
+ uint32_t ann_class, bool use_ann_format, QPainter &p, int y,
const DecodeTraceRow& row) const
{
const double top = y + .5 - annotation_height_ / 2;
void draw_annotation(const Annotation* a, QPainter &p,
const ViewItemPaintParams &pp, int y, const DecodeTraceRow& row) const;
- void draw_annotation_block(qreal start, qreal end, Annotation::Class ann_class,
+ void draw_annotation_block(qreal start, qreal end, uint32_t ann_class,
bool use_ann_format, QPainter &p, int y, const DecodeTraceRow& row) const;
void draw_instant(const Annotation* a, QPainter &p, qreal x, int y) const;