X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Fviewwidget.hpp;h=ef3cfa2fc303d9692d84e596d486191888cda143;hp=f4928e67f885bcd948c10ae0b72a7da03bff5d5b;hb=20c99cfc69d3c7430817abd9a1f810698deb4a18;hpb=119c5c232ef47e92ef6a5cc9f8b7c4c31dc2f387 diff --git a/pv/views/trace/viewwidget.hpp b/pv/views/trace/viewwidget.hpp index f4928e67..ef3cfa2f 100644 --- a/pv/views/trace/viewwidget.hpp +++ b/pv/views/trace/viewwidget.hpp @@ -17,14 +17,16 @@ * along with this program; if not, see . */ -#ifndef PULSEVIEW_PV_VIEWWIDGET_HPP -#define PULSEVIEW_PV_VIEWWIDGET_HPP +#ifndef PULSEVIEW_PV_VIEWS_TRACE_VIEWWIDGET_HPP +#define PULSEVIEW_PV_VIEWS_TRACE_VIEWWIDGET_HPP #include #include #include +#include + using std::shared_ptr; using std::vector; @@ -131,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: @@ -143,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_; }; @@ -151,4 +161,4 @@ protected: } // namespace views } // namespace pv -#endif // PULSEVIEW_PV_VIEWWIDGET_HPP +#endif // PULSEVIEW_PV_VIEWS_TRACE_VIEWWIDGET_HPP