X-Git-Url: http://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Fviewport.hpp;fp=pv%2Fviews%2Ftrace%2Fviewport.hpp;h=8c82354ea8dcfb6f2e75ddeb8a34b35932087ef5;hp=48f2d09c9d0c4c178535c089bdc86a7a064d26fc;hb=e6c8d58bde2c32f0ee8b73c5577505736caf8e23;hpb=c583ea05e31967f78870ebbe19f6794e51f512c6;ds=sidebyside diff --git a/pv/views/trace/viewport.hpp b/pv/views/trace/viewport.hpp index 48f2d09c..8c82354e 100644 --- a/pv/views/trace/viewport.hpp +++ b/pv/views/trace/viewport.hpp @@ -26,6 +26,8 @@ #include #include +#include + #include "pv/util.hpp" #include "viewwidget.hpp" @@ -42,12 +44,13 @@ namespace trace { class View; -class Viewport : public ViewWidget +class Viewport : public ViewWidget, public GlobalSettingsInterface { Q_OBJECT public: explicit Viewport(View &parent); + ~Viewport(); /** * Gets the first view item which has a hit-box that contains @c pt . @@ -92,15 +95,18 @@ private: */ bool touch_event(QTouchEvent *event); -private: void paintEvent(QPaintEvent *event); void mouseDoubleClickEvent(QMouseEvent *event); + void wheelEvent(QWheelEvent *event); + void on_setting_changed(const QString &key, const QVariant &value); + private: boost::optional drag_offset_; int drag_v_offset_; + bool allow_vertical_dragging_; double pinch_offset0_; double pinch_offset1_;