X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fview%2Fview.h;h=0f5e254da4f12681dfff1f10621c91c0af1b9422;hb=c23b29d67ed68c1a899000bf0049056fe9f51a62;hp=980ccf1f61e8488d38dea381953ab15bb8d6d112;hpb=528bd8a194362b7e73d53360ec78ec22f06eecc2;p=pulseview.git diff --git a/pv/view/view.h b/pv/view/view.h index 980ccf1f..0f5e254d 100644 --- a/pv/view/view.h +++ b/pv/view/view.h @@ -23,12 +23,10 @@ #include -#include - #include #include -#include "cursor.h" +#include "cursorpair.h" namespace pv { @@ -98,10 +96,15 @@ public: */ void show_cursors(bool show = true); + /** + * Moves the cursors to a convenient position in the view. + */ + void centre_cursors(); + /** * Returns a reference to the pair of cursors. */ - std::pair& cursors(); + CursorPair& cursors(); const QPoint& hover_point() const; @@ -157,7 +160,7 @@ private: bool _updating_scroll; bool _show_cursors; - std::pair _cursors; + CursorPair _cursors; QPoint _hover_point; };