X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Fcursorpair.hpp;h=6728268039f5e718d7363f68b63a9b43fa55758c;hp=12a9d7ff7a7344b0154a30f8a61e2e078e6cb989;hb=581724de334181fc5338f1efa87954264cf90520;hpb=79b53a1ae4a451ef60c18dff9957d311ab90c396 diff --git a/pv/views/trace/cursorpair.hpp b/pv/views/trace/cursorpair.hpp index 12a9d7ff..67282680 100644 --- a/pv/views/trace/cursorpair.hpp +++ b/pv/views/trace/cursorpair.hpp @@ -25,6 +25,7 @@ #include #include +#include using std::pair; using std::shared_ptr; @@ -35,8 +36,12 @@ namespace pv { namespace views { namespace trace { +class View; + class CursorPair : public TimeItem { + Q_OBJECT + private: static const int DeltaPadding; static const QColor ViewportFillColor; @@ -48,7 +53,6 @@ public: */ CursorPair(View &view); -public: /** * Returns true if the item is visible and enabled. */ @@ -98,14 +102,17 @@ public: */ QString format_string(); - void compute_text_size(QPainter &p); - pair get_cursor_offsets() const; +public Q_SLOTS: + void on_hover_point_changed(const QWidget* widget, const QPoint &hp); + private: shared_ptr first_, second_; QSizeF text_size_; + QRectF label_area_; + bool label_incomplete_; }; } // namespace trace