X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fview.h;h=3397ba2ce28800c3b996c7a1f19e455ef800ce6a;hp=ac2835a49cb4b6157075741d436c6708bd165727;hb=a2f71ef0465ce94c6a1006adf520ba76605b457e;hpb=e2f5223b74da179688de92146a2716209b42bdb0 diff --git a/pv/view/view.h b/pv/view/view.h index ac2835a4..3397ba2c 100644 --- a/pv/view/view.h +++ b/pv/view/view.h @@ -23,7 +23,12 @@ #include +#include + #include +#include + +#include "cursor.h" namespace pv { @@ -50,6 +55,10 @@ private: public: static const int SignalHeight; + static const QColor CursorAreaColour; + + static const QSizeF LabelPadding; + public: explicit View(SigSession &session, QWidget *parent = 0); @@ -77,6 +86,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: @@ -101,6 +125,8 @@ private slots: void data_updated(); + void marker_time_changed(); + private: SigSession &_session; @@ -118,6 +144,9 @@ private: int _v_offset; + bool _show_cursors; + std::pair _cursors; + QPoint _hover_point; };