X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fcursor.h;h=dd8ef242d53163dfdd4a7f9bf10fc94d8886ff75;hp=3ee0200518108a30e52ef7b20b7ced7108d92386;hb=8782a1fdb4cd6e73ad068599f06292a2cecd4d7e;hpb=ca4ec3eab886e62c0f9d0cc91636383a74ad5d7b diff --git a/pv/view/cursor.h b/pv/view/cursor.h index 3ee02005..dd8ef242 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,9 +67,17 @@ 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 } // namespace pv -#endif // PULSEVIEW_PV_VIEW_CURSOR_H \ No newline at end of file +#endif // PULSEVIEW_PV_VIEW_CURSOR_H