]> sigrok.org Git - pulseview.git/blobdiff - pv/view/cursorpair.h
Bring the cursors into view when they are shown
[pulseview.git] / pv / view / cursorpair.h
index 2bf85d835b775bc7b20245ce981401b4002575df..42e6e51fa32ca3c764ac521b1d16318983e56825 100644 (file)
@@ -32,6 +32,9 @@ namespace view {
 
 class CursorPair
 {
+private:
+       static const int DeltaPadding;
+
 public:
        /**
         * Constructor.
@@ -60,13 +63,24 @@ public:
        const Cursor& second() const;
 
 public:
+       QRectF get_label_rect(const QRect &rect) const;
+
+       void draw_markers(QPainter &p,
+               const QRect &rect, unsigned int prefix);
+
        void draw_viewport_background(QPainter &p, const QRect &rect);
 
        void draw_viewport_foreground(QPainter &p, const QRect &rect);
 
+       void compute_text_size(QPainter &p, unsigned int prefix);
+
+       std::pair<float, float> get_cursor_offsets() const;
+
 private:
        Cursor _first, _second;
        const View &_view;
+
+       QSizeF _text_size;
 };
 
 } // namespace view