X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fcursorpair.h;h=2e70f7da92b9dca7dec6770713624aefa8cf8b8c;hp=42e6e51fa32ca3c764ac521b1d16318983e56825;hb=58864c5c5dffac4254f199356aaeb5eabd608630;hpb=5139748b422db3a22ceed92894596873e868d676 diff --git a/pv/view/cursorpair.h b/pv/view/cursorpair.h index 42e6e51f..2e70f7da 100644 --- a/pv/view/cursorpair.h +++ b/pv/view/cursorpair.h @@ -23,6 +23,8 @@ #include "cursor.h" +#include + #include class QPainter; @@ -43,24 +45,14 @@ public: CursorPair(const View &view); /** - * Returns a reference to the first cursor. - */ - Cursor& first(); - - /** - * Returns a reference to the first cursor. - */ - const Cursor& first() const; - - /** - * Returns a reference to the second cursor. + * Returns a pointer to the first cursor. */ - Cursor& second(); + boost::shared_ptr first() const; /** - * Returns a reference to the second cursor. + * Returns a pointer to the second cursor. */ - const Cursor& second() const; + boost::shared_ptr second() const; public: QRectF get_label_rect(const QRect &rect) const; @@ -77,7 +69,7 @@ public: std::pair get_cursor_offsets() const; private: - Cursor _first, _second; + boost::shared_ptr _first, _second; const View &_view; QSizeF _text_size;