X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fcursorpair.h;h=f7eb51cacaabe9a79cf2d715c487eed94f5ab222;hb=8dbbc7f0b9ea59d0f0d62225772f8a56eee125f5;hp=42e6e51fa32ca3c764ac521b1d16318983e56825;hpb=5139748b422db3a22ceed92894596873e868d676;p=pulseview.git diff --git a/pv/view/cursorpair.h b/pv/view/cursorpair.h index 42e6e51..f7eb51c 100644 --- a/pv/view/cursorpair.h +++ b/pv/view/cursorpair.h @@ -23,6 +23,8 @@ #include "cursor.h" +#include + #include class QPainter; @@ -40,27 +42,17 @@ public: * Constructor. * @param view A reference to the view that owns this cursor pair. */ - CursorPair(const View &view); - - /** - * Returns a reference to the first cursor. - */ - Cursor& first(); - - /** - * Returns a reference to the first cursor. - */ - const Cursor& first() const; + CursorPair(View &view); /** - * Returns a reference to the second cursor. + * Returns a pointer to the first cursor. */ - Cursor& second(); + std::shared_ptr first() const; /** - * Returns a reference to the second cursor. + * Returns a pointer to the second cursor. */ - const Cursor& second() const; + std::shared_ptr second() const; public: QRectF get_label_rect(const QRect &rect) const; @@ -77,10 +69,10 @@ public: std::pair get_cursor_offsets() const; private: - Cursor _first, _second; - const View &_view; + std::shared_ptr first_, second_; + const View &view_; - QSizeF _text_size; + QSizeF text_size_; }; } // namespace view