X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fview%2Fcursor.h;h=1469f2cc1edf0db599f8b6f147cabbb4fd235abd;hb=8d44d030c3923055f2ea81d5334d3a3bce7900c2;hp=3ee0200518108a30e52ef7b20b7ced7108d92386;hpb=ca4ec3eab886e62c0f9d0cc91636383a74ad5d7b;p=pulseview.git diff --git a/pv/view/cursor.h b/pv/view/cursor.h index 3ee02005..1469f2cc 100644 --- a/pv/view/cursor.h +++ b/pv/view/cursor.h @@ -23,6 +23,10 @@ #include "timemarker.h" +#include + +class QPainter; + namespace pv { namespace view { @@ -34,10 +38,13 @@ private: static const QColor LineColour; static const QColor FillColour; static const QColor HighlightColour; + static const QColor TextColour; static const int Size; static const int Offset; + static const int ArrowSize; + public: /** * Constructor. @@ -60,6 +67,14 @@ public: * @param rect The rectangle of the ruler client area. */ void paint_label(QPainter &p, const QRect &rect); + +private: + void compute_text_size(QPainter &p); + + void format_text(char *text); + +private: + QSizeF _text_size; }; } // namespace view