X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fruler.h;h=129b70cbe54520d0ccebb2b829a91f3b7211e496;hp=f855185b904a75209ce521ec12c4399913bd6d5e;hb=488883133fefe0af41737cea9b2fc9eb114042b8;hpb=640d091b45b196cc586fbc6a7bec71c5c7d75544 diff --git a/pv/view/ruler.h b/pv/view/ruler.h index f855185b..129b70cb 100644 --- a/pv/view/ruler.h +++ b/pv/view/ruler.h @@ -26,6 +26,7 @@ namespace pv { namespace view { +class TimeMarker; class View; class Ruler : public QWidget @@ -39,14 +40,33 @@ private: static const QString SIPrefixes[9]; static const int FirstSIPrefixPower; + static const int HoverArrowSize; + public: Ruler(View &parent); private: void paintEvent(QPaintEvent *event); + void mouseMoveEvent(QMouseEvent *e); + void mousePressEvent(QMouseEvent *e); + void mouseReleaseEvent(QMouseEvent *); + +private: + void draw_cursors(QPainter &p); + + /** + * Draw a hover arrow under the cursor position. + */ + void draw_hover_mark(QPainter &p); + +private slots: + void hover_point_changed(); + private: View &_view; + + TimeMarker *_grabbed_marker; }; } // namespace view