X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Fviewwidget.hpp;h=427a8994e60cbeadf91995ce5fc6c3bfda76137e;hb=74bf66669012692f7eda790abe724bd5bb4ae8c6;hp=e4fb73c8255debedb73963acddc0984e635a0433;hpb=1573bf16ba50d1c023ad3a9ce596f0ab6eaeacff;p=pulseview.git diff --git a/pv/views/trace/viewwidget.hpp b/pv/views/trace/viewwidget.hpp index e4fb73c8..427a8994 100644 --- a/pv/views/trace/viewwidget.hpp +++ b/pv/views/trace/viewwidget.hpp @@ -22,8 +22,11 @@ #include +#include #include +#include + using std::shared_ptr; using std::vector; @@ -49,7 +52,7 @@ protected: * if no view item is being hovered over. * @remarks the default implementation does nothing. */ - virtual void item_hover(const shared_ptr &item); + virtual void item_hover(const shared_ptr &item, QPoint pos); /** * Indicates the event an a view item has been clicked. @@ -130,6 +133,9 @@ protected: void mouseReleaseEvent(QMouseEvent *event); void mouseMoveEvent(QMouseEvent *event); + void keyPressEvent(QKeyEvent *event); + void keyReleaseEvent(QKeyEvent *event); + void leaveEvent(QEvent *event); public Q_SLOTS: @@ -142,7 +148,12 @@ protected: pv::views::trace::View &view_; QPoint mouse_point_; QPoint mouse_down_point_; + pv::util::Timestamp mouse_down_offset_; shared_ptr mouse_down_item_; + + /// Keyboard modifiers that were active when mouse was last moved or clicked + Qt::KeyboardModifiers mouse_modifiers_; + bool item_dragging_; };