summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qevent.h
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@nokia.com>2010-11-30 21:44:52 (GMT)
committerRobert Griebl <robert.griebl@nokia.com>2010-12-02 00:04:34 (GMT)
commit0274e68767cce6440515a68d6af868725d5577a4 (patch)
tree7b219fb5cce3c9e76ae966f13401ae13bad9b28d /src/gui/kernel/qevent.h
parentf6f8ba94d5f82b8df723a217a3d0ecb50e570cbc (diff)
downloadQt-0274e68767cce6440515a68d6af868725d5577a4.zip
Qt-0274e68767cce6440515a68d6af868725d5577a4.tar.gz
Qt-0274e68767cce6440515a68d6af868725d5577a4.tar.bz2
QScroller merge, part 1
This merge consists of the actual kinetic scroller implementation, its autotests plus a few examples. QAbstractScrollArea and QAbstractItemView have been extended to support the new scroll events. The complete history is in http://scm.dev.nokia.troll.no/projects/qt/repos/rgriebls-qt-flickgesture/logs/4.7-flickgesture (part 2 is the QML Flickable replacement / part 3 is QWebView support) Task-number: QTBUG-9054 Reviewed-by: Ralf Engels
Diffstat (limited to 'src/gui/kernel/qevent.h')
-rw-r--r--src/gui/kernel/qevent.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/gui/kernel/qevent.h b/src/gui/kernel/qevent.h
index 9c70c02..6c0076d 100644
--- a/src/gui/kernel/qevent.h
+++ b/src/gui/kernel/qevent.h
@@ -880,6 +880,52 @@ private:
};
#endif // QT_NO_GESTURES
+class QScrollPrepareEventPrivate;
+class Q_GUI_EXPORT QScrollPrepareEvent : public QEvent
+{
+public:
+ QScrollPrepareEvent(const QPointF &startPos);
+ ~QScrollPrepareEvent();
+
+ QPointF startPos() const;
+
+ QSizeF viewportSize() const;
+ QRectF contentPosRange() const;
+ QPointF contentPos() const;
+
+ void setViewportSize(const QSizeF &size);
+ void setContentPosRange(const QRectF &rect);
+ void setContentPos(const QPointF &pos);
+
+private:
+ QScrollPrepareEventPrivate *d_func();
+ const QScrollPrepareEventPrivate *d_func() const;
+};
+
+
+class QScrollEventPrivate;
+class Q_GUI_EXPORT QScrollEvent : public QEvent
+{
+public:
+ enum ScrollState
+ {
+ ScrollStarted,
+ ScrollUpdated,
+ ScrollFinished
+ };
+
+ QScrollEvent(const QPointF &contentPos, const QPointF &overshoot, ScrollState scrollState);
+ ~QScrollEvent();
+
+ QPointF contentPos() const;
+ QPointF overshootDistance() const;
+ ScrollState scrollState() const;
+
+private:
+ QScrollEventPrivate *d_func();
+ const QScrollEventPrivate *d_func() const;
+};
+
QT_END_NAMESPACE
QT_END_HEADER