X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Fviewport.hpp;h=8c82354ea8dcfb6f2e75ddeb8a34b35932087ef5;hb=66a43b4f9cf76853e99e7f5fc2f9df49ec58bd34;hp=ab67f69f3ee2d618895b6d5595a7251f97ef538c;hpb=1573bf16ba50d1c023ad3a9ce596f0ab6eaeacff;p=pulseview.git
diff --git a/pv/views/trace/viewport.hpp b/pv/views/trace/viewport.hpp
index ab67f69f..8c82354e 100644
--- a/pv/views/trace/viewport.hpp
+++ b/pv/views/trace/viewport.hpp
@@ -17,14 +17,17 @@
* along with this program; if not, see .
*/
-#ifndef PULSEVIEW_PV_VIEWS_TRACEVIEW_VIEWPORT_HPP
-#define PULSEVIEW_PV_VIEWS_TRACEVIEW_VIEWPORT_HPP
+#ifndef PULSEVIEW_PV_VIEWS_TRACE_VIEWPORT_HPP
+#define PULSEVIEW_PV_VIEWS_TRACE_VIEWPORT_HPP
#include
+#include
#include
#include
+#include
+
#include "pv/util.hpp"
#include "viewwidget.hpp"
@@ -41,20 +44,13 @@ namespace trace {
class View;
-class Viewport : public ViewWidget
+class Viewport : public ViewWidget, public GlobalSettingsInterface
{
Q_OBJECT
public:
explicit Viewport(View &parent);
-
-private:
- /**
- * Indicates when a view item is being hovered over.
- * @param item The item that is being hovered over, or @c nullptr
- * if no view item is being hovered over.
- */
- void item_hover(const shared_ptr &item);
+ ~Viewport();
/**
* Gets the first view item which has a hit-box that contains @c pt .
@@ -64,6 +60,14 @@ private:
*/
shared_ptr get_mouse_over_item(const QPoint &pt);
+private:
+ /**
+ * Indicates when a view item is being hovered over.
+ * @param item The item that is being hovered over, or @c nullptr
+ * if no view item is being hovered over.
+ */
+ void item_hover(const shared_ptr &item, QPoint pos);
+
/**
* Sets this item into the dragged state.
*/
@@ -91,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_;
@@ -110,4 +117,4 @@ private:
} // namespace views
} // namespace pv
-#endif // PULSEVIEW_PV_VIEWS_TRACEVIEW_VIEWPORT_HPP
+#endif // PULSEVIEW_PV_VIEWS_TRACE_VIEWPORT_HPP