diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-05-19 16:10:30 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-05-20 13:10:03 (GMT) |
commit | cc1486132fcb47f74c132f3f17f7f2759b0ba165 (patch) | |
tree | ff42203404b3c5e283166c3a64400d205a12be7a /src/gui/kernel | |
parent | 6cd7a9039eafd0a4a00b0a1cf80bdf7517a25c50 (diff) | |
download | Qt-cc1486132fcb47f74c132f3f17f7f2759b0ba165.zip Qt-cc1486132fcb47f74c132f3f17f7f2759b0ba165.tar.gz Qt-cc1486132fcb47f74c132f3f17f7f2759b0ba165.tar.bz2 |
Added setters to QGesture object.
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qgesture.cpp | 25 | ||||
-rw-r--r-- | src/gui/kernel/qgesture.h | 21 |
2 files changed, 39 insertions, 7 deletions
diff --git a/src/gui/kernel/qgesture.cpp b/src/gui/kernel/qgesture.cpp index ac55521..2bb7de7 100644 --- a/src/gui/kernel/qgesture.cpp +++ b/src/gui/kernel/qgesture.cpp @@ -181,6 +181,11 @@ QRect QGesture::rect() const return d_func()->rect; } +void QGesture::setRect(const QRect &rect) +{ + d_func()->rect = rect; +} + /*! \property QGesture::hotSpot @@ -191,6 +196,11 @@ QPoint QGesture::hotSpot() const return d_func()->hotSpot; } +void QGesture::setHotSpot(const QPoint &point) +{ + d_func()->hotSpot = point; +} + /*! \property QGesture::startTime @@ -221,6 +231,11 @@ QPoint QGesture::startPos() const return d_func()->startPos; } +void QGesture::setStartPos(const QPoint &point) +{ + d_func()->startPos = point; +} + /*! \property QGesture::lastPos @@ -231,6 +246,11 @@ QPoint QGesture::lastPos() const return d_func()->lastPos; } +void QGesture::setLastPos(const QPoint &point) +{ + d_func()->lastPos = point; +} + /*! \property QGesture::pos @@ -241,6 +261,11 @@ QPoint QGesture::pos() const return d_func()->pos; } +void QGesture::setPos(const QPoint &point) +{ + d_func()->pos = point; +} + /*! \class QPanningGesture \since 4.6 diff --git a/src/gui/kernel/qgesture.h b/src/gui/kernel/qgesture.h index 64a1424..95486bf 100644 --- a/src/gui/kernel/qgesture.h +++ b/src/gui/kernel/qgesture.h @@ -64,13 +64,14 @@ class Q_GUI_EXPORT QGesture : public QObject Q_PROPERTY(QString type READ type) Q_PROPERTY(Qt::GestureState state READ state) - Q_PROPERTY(QRect rect READ rect) - Q_PROPERTY(QPoint hotSpot READ hotSpot) Q_PROPERTY(QDateTime startTime READ startTime) Q_PROPERTY(uint duration READ duration) - Q_PROPERTY(QPoint startPos READ startPos) - Q_PROPERTY(QPoint lastPos READ lastPos) - Q_PROPERTY(QPoint pos READ pos) + + Q_PROPERTY(QRect rect READ rect WRITE setRect) + Q_PROPERTY(QPoint hotSpot READ hotSpot WRITE setHotSpot) + Q_PROPERTY(QPoint startPos READ startPos WRITE setStartPos) + Q_PROPERTY(QPoint lastPos READ lastPos WRITE setLastPos) + Q_PROPERTY(QPoint pos READ pos WRITE setPos) public: QGesture(QObject *parent, const QString &type, @@ -91,14 +92,20 @@ public: QString type() const; Qt::GestureState state() const; - QRect rect() const; - QPoint hotSpot() const; QDateTime startTime() const; uint duration() const; + QRect rect() const; + void setRect(const QRect &rect); + QPoint hotSpot() const; + void setHotSpot(const QPoint &point); + QPoint startPos() const; + void setStartPos(const QPoint &point); QPoint lastPos() const; + void setLastPos(const QPoint &point); QPoint pos() const; + void setPos(const QPoint &point); protected: QGesture(QGesturePrivate &dd, QObject *parent, const QString &type, |