]> sigrok.org Git - pulseview.git/blobdiff - pv/view/viewport.h
RowItemOwner: Replaced parent notification scheme
[pulseview.git] / pv / view / viewport.h
index e2517fa776156f1ef28e6c80e04914658855ba75..1de9cd2a5d1ac51e1e40f6de101baa40754b05f8 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
-#ifndef PV_VIEW_VIEWPORT_H
-#define PV_VIEW_VIEWPORT_H
+#ifndef PULSEVIEW_PV_VIEW_VIEWPORT_H
+#define PULSEVIEW_PV_VIEW_VIEWPORT_H
 
 #include <QTimer>
 #include <QWidget>
+#include <QTouchEvent>
 
 class QPainter;
 class QPaintEvent;
@@ -40,25 +41,34 @@ class Viewport : public QWidget
 public:
        explicit Viewport(View &parent);
 
-       int get_total_height() const;
-
 protected:
        void paintEvent(QPaintEvent *event);
 
 private:
+       bool event(QEvent *event);
        void mousePressEvent(QMouseEvent *event);
-       void mouseMoveEvent(QMouseEvent *event);
        void mouseReleaseEvent(QMouseEvent *event);
+       void mouseMoveEvent(QMouseEvent *event);
+       void mouseDoubleClickEvent(QMouseEvent * event);
        void wheelEvent(QWheelEvent *event);
+       bool touchEvent(QTouchEvent *e);
+
+private Q_SLOTS:
+       void on_signals_moved();
 
 private:
        View &_view;
 
        QPoint _mouse_down_point;
        double _mouse_down_offset;
+       bool _mouse_down_valid;
+
+       double _pinch_offset0;
+       double _pinch_offset1;
+       bool _pinch_zoom_active;
 };
 
 } // namespace view
 } // namespace pv
 
-#endif // PV_VIEW_VIEWPORT_H
+#endif // PULSEVIEW_PV_VIEW_VIEWPORT_H