diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-09-03 14:36:15 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-09-03 14:36:15 (GMT) |
commit | f0844f9da7a834c282f6f04b2676f28de444e9dc (patch) | |
tree | 8e121429e25959043cc04c4364adbe8239e44a67 /src/gui/kernel/qstandardgestures.h | |
parent | fe763ef6cd255ccb54d0de1894c1a772f959585e (diff) | |
parent | f360180890298618ef3284c08789c2a243e1ba9d (diff) | |
download | Qt-f0844f9da7a834c282f6f04b2676f28de444e9dc.zip Qt-f0844f9da7a834c282f6f04b2676f28de444e9dc.tar.gz Qt-f0844f9da7a834c282f6f04b2676f28de444e9dc.tar.bz2 |
Merge commit 'qt/4.6' into kinetic-declarativeui
Diffstat (limited to 'src/gui/kernel/qstandardgestures.h')
-rw-r--r-- | src/gui/kernel/qstandardgestures.h | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/src/gui/kernel/qstandardgestures.h b/src/gui/kernel/qstandardgestures.h index bb6f3b6..53c4416 100644 --- a/src/gui/kernel/qstandardgestures.h +++ b/src/gui/kernel/qstandardgestures.h @@ -61,6 +61,7 @@ class Q_GUI_EXPORT QPanGesture : public QGesture Q_PROPERTY(QSizeF totalOffset READ totalOffset) Q_PROPERTY(QSizeF lastOffset READ lastOffset) + Q_PROPERTY(QSizeF offset READ offset) public: QPanGesture(QWidget *gestureTarget, QObject *parent = 0); @@ -69,6 +70,7 @@ public: QSizeF totalOffset() const; QSizeF lastOffset() const; + QSizeF offset() const; protected: void reset(); @@ -78,6 +80,7 @@ private: bool eventFilter(QObject *receiver, QEvent *event); friend class QWidget; + friend class QAbstractScrollAreaPrivate; }; class QPinchGesturePrivate; @@ -86,31 +89,48 @@ class Q_GUI_EXPORT QPinchGesture : public QGesture Q_OBJECT Q_DECLARE_PRIVATE(QPinchGesture) - Q_PROPERTY(qreal scaleFactor READ scaleFactor) +public: + enum WhatChange { + ScaleFactorChanged = 0x1, + RotationAngleChanged = 0x2, + CenterPointChanged = 0x4 + }; + Q_DECLARE_FLAGS(WhatChanged, WhatChange) + + Q_PROPERTY(WhatChanged whatChanged READ whatChanged) + + Q_PROPERTY(qreal totalScaleFactor READ totalScaleFactor) Q_PROPERTY(qreal lastScaleFactor READ lastScaleFactor) + Q_PROPERTY(qreal scaleFactor READ scaleFactor) - Q_PROPERTY(qreal rotationAngle READ rotationAngle) + Q_PROPERTY(qreal totalRotationAngle READ totalRotationAngle) Q_PROPERTY(qreal lastRotationAngle READ lastRotationAngle) + Q_PROPERTY(qreal rotationAngle READ rotationAngle) Q_PROPERTY(QPointF startCenterPoint READ startCenterPoint) Q_PROPERTY(QPointF lastCenterPoint READ lastCenterPoint) Q_PROPERTY(QPointF centerPoint READ centerPoint) public: + QPinchGesture(QWidget *gestureTarget, QObject *parent = 0); bool filterEvent(QEvent *event); void reset(); + WhatChanged whatChanged() const; + QPointF startCenterPoint() const; QPointF lastCenterPoint() const; QPointF centerPoint() const; - qreal scaleFactor() const; + qreal totalScaleFactor() const; qreal lastScaleFactor() const; + qreal scaleFactor() const; - qreal rotationAngle() const; + qreal totalRotationAngle() const; qreal lastRotationAngle() const; + qreal rotationAngle() const; private: bool event(QEvent *event); |