X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fview.h;h=13dd766ce788d1aa5a536a837654bb7066f081c8;hp=ac2835a49cb4b6157075741d436c6708bd165727;hb=f76af6375b8aea6b7edb2d6ee838e1589c3490f3;hpb=e2f5223b74da179688de92146a2716209b42bdb0 diff --git a/pv/view/view.h b/pv/view/view.h index ac2835a4..13dd766c 100644 --- a/pv/view/view.h +++ b/pv/view/view.h @@ -23,8 +23,12 @@ #include +#include + #include +#include "cursor.h" + namespace pv { class SigSession; @@ -50,6 +54,8 @@ private: public: static const int SignalHeight; + static const QColor CursorAreaColour; + public: explicit View(SigSession &session, QWidget *parent = 0); @@ -77,6 +83,21 @@ public: */ void set_scale_offset(double scale, double offset); + /** + * Returns true if cursors are displayed. false otherwise. + */ + bool cursors_shown() const; + + /** + * Shows or hides the cursors. + */ + void show_cursors(bool show = true); + + /** + * Returns a reference to the pair of cursors. + */ + std::pair& cursors(); + const QPoint& hover_point() const; signals: @@ -118,6 +139,9 @@ private: int _v_offset; + bool _show_cursors; + std::pair _cursors; + QPoint _hover_point; };