X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;ds=sidebyside;f=pv%2Fview%2Fdecode%2Fannotation.h;h=078c12a19190d47ed7baeedb4c28fe79b84e7b25;hb=4d3c4e342104dcba47c252e734dee441faaf2a9e;hp=7ba7d3676b0b1a5c87e726e63eb6d61119007937;hpb=9472f4476b27336e9187635015169e308bfe8af7;p=pulseview.git diff --git a/pv/view/decode/annotation.h b/pv/view/decode/annotation.h index 7ba7d36..078c12a 100644 --- a/pv/view/decode/annotation.h +++ b/pv/view/decode/annotation.h @@ -33,15 +33,31 @@ namespace decode { class Annotation { +private: + static const double EndCapWidth; + static const int DrawPadding; + + static const QColor Colours[7]; + public: Annotation(const srd_proto_data *const pdata); - void paint(QPainter &p, int left, int right, double samples_per_pixel, - double pixels_offset, int y); + void paint(QPainter &p, QColor text_colour, int text_height, int left, + int right, double samples_per_pixel, double pixels_offset, + int y); + +private: + void draw_instant(QPainter &p, QColor fill, QColor outline, + QColor text_color, int h, double x, int y); + + void draw_range(QPainter &p, QColor fill, QColor outline, + QColor text_color, int h, double start, + double end, int y); private: uint64_t _start_sample; uint64_t _end_sample; + int _format; std::vector _annotations; };