diff options
Diffstat (limited to 'examples/gestures/imageviewer/imagewidget.h')
-rw-r--r-- | examples/gestures/imageviewer/imagewidget.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/examples/gestures/imageviewer/imagewidget.h b/examples/gestures/imageviewer/imagewidget.h index 7ec73a7..e12634d 100644 --- a/examples/gestures/imageviewer/imagewidget.h +++ b/examples/gestures/imageviewer/imagewidget.h @@ -50,17 +50,24 @@ class ImageWidget : public QWidget { + Q_OBJECT + public: ImageWidget(QWidget *parent = 0); void openDirectory(const QString &path); protected: - bool event(QEvent *event); void paintEvent(QPaintEvent*); - void gestureEvent(QGestureEvent *event); void resizeEvent(QResizeEvent*); void timerEvent(QTimerEvent*); + void mousePressEvent(QMouseEvent*); + void mouseDoubleClickEvent(QMouseEvent*); + +private slots: + void gestureTriggered(); + void gestureFinished(); + void gestureCancelled(); private: void updateImage(); @@ -71,6 +78,9 @@ private: void goPrevImage(); void goToImage(int index); + QPanGesture *panGesture; + QTapAndHoldGesture *tapAndHoldGesture; + QString path; QStringList files; int position; |