summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/kernel/qgesture.cpp25
-rw-r--r--src/gui/kernel/qgesture.h21
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,