X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fview.h;h=99c124733bfe094b69f7f48c3f46dbe77ff4659c;hb=b698553cd745bf4f50f73f513798bba6209a5d13;hp=5a10ee9ecea7be2b9dacd69c6bb964d0a215de23;hpb=b16907d341861d227d6d2db3014ee36a2af4b619;p=pulseview.git diff --git a/pv/view/view.h b/pv/view/view.h index 5a10ee9..99c1247 100644 --- a/pv/view/view.h +++ b/pv/view/view.h @@ -23,12 +23,12 @@ #include -#include +#include #include #include -#include "cursor.h" +#include "cursorpair.h" namespace pv { @@ -88,6 +88,8 @@ public: */ void set_scale_offset(double scale, double offset); + std::list > selected_items() const; + /** * Returns true if cursors are displayed. false otherwise. */ @@ -98,10 +100,20 @@ 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(); + + /** + * Returns a reference to the pair of cursors. + */ + const CursorPair& cursors() const; const QPoint& hover_point() const; @@ -112,6 +124,8 @@ signals: void signals_moved(); + void selection_changed(); + private: void get_scroll_layout(double &length, double &offset) const; @@ -154,9 +168,10 @@ private: double _offset; int _v_offset; + bool _updating_scroll; bool _show_cursors; - std::pair _cursors; + CursorPair _cursors; QPoint _hover_point; };