summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicssceneevent.cpp
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-03-13 18:15:35 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-05-11 14:51:31 (GMT)
commit32164d09d8647995e6177efec967ace799b7c528 (patch)
tree8e90cec32f3713357c86e67c795657bff4136fab /src/gui/graphicsview/qgraphicssceneevent.cpp
parent86a160b083f9d43c07d42bbd7d2ef8b676552e38 (diff)
downloadQt-32164d09d8647995e6177efec967ace799b7c528.zip
Qt-32164d09d8647995e6177efec967ace799b7c528.tar.gz
Qt-32164d09d8647995e6177efec967ace799b7c528.tar.bz2
De-inlined functions in gesture events.
Diffstat (limited to 'src/gui/graphicsview/qgraphicssceneevent.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicssceneevent.cpp69
1 files changed, 53 insertions, 16 deletions
diff --git a/src/gui/graphicsview/qgraphicssceneevent.cpp b/src/gui/graphicsview/qgraphicssceneevent.cpp
index 4d9e7bb..4f24a74 100644
--- a/src/gui/graphicsview/qgraphicssceneevent.cpp
+++ b/src/gui/graphicsview/qgraphicssceneevent.cpp
@@ -304,6 +304,8 @@
QT_BEGIN_NAMESPACE
+QString qt_getStandardGestureTypeName(Qt::GestureType type);
+
class QGraphicsSceneEventPrivate
{
public:
@@ -1725,45 +1727,80 @@ void QGraphicsSceneMoveEvent::setNewPos(const QPointF &pos)
gestures with \l{QGraphicsItem::}{grabGesture()}.
*/
-/*! \fn bool QGraphicsSceneGestureEvent::contains(const Qt::GestureType &type) const
+QGraphicsSceneGestureEvent::QGraphicsSceneGestureEvent()
+ : QGraphicsSceneEvent(QEvent::GraphicsSceneGesture)
+{
+}
+
+QGraphicsSceneGestureEvent::~QGraphicsSceneGestureEvent()
+{
+}
+
+/*!
Checks if the gesture event contains gesture of specific \a type.
*/
+bool QGraphicsSceneGestureEvent::contains(const QString &type) const
+{
+ return gesture(type) != 0;
+}
-/*! \fn QList<Qt::GestureType> QGraphicsSceneGestureEvent::gestureTypes() const
+/*!
+ Checks if the gesture event contains gesture of specific \a type.
+*/
+bool QGraphicsSceneGestureEvent::contains(Qt::GestureType type) const
+{
+ return contains(qt_getStandardGestureTypeName(type));
+}
+/*!
Returns a list of gesture names that the event contains.
*/
+QList<QString> QGraphicsSceneGestureEvent::gestureTypes() const
+{
+ return m_gestures.keys();
+}
-/*! \fn const QGesture* QGraphicsSceneGestureEvent::gesture(const Qt::GestureType &type) const
-
+/*!
Returns extended information about a gesture of specific \a type.
*/
+const QGesture* QGraphicsSceneGestureEvent::gesture(const QString &type) const
+{
+ return m_gestures.value(type, QSharedPointer<QGesture>()).data();
+}
-/*! \fn QList<QSharedPointer<QGesture> > QGraphicsSceneGestureEvent::gestures() const
+/*!
+ Returns extended information about a gesture of specific \a type.
+*/
+const QGesture* QGraphicsSceneGestureEvent::gesture(Qt::GestureType type) const
+{
+ return gesture(qt_getStandardGestureTypeName(type));
+}
+/*!
Returns extended information about all triggered gestures.
*/
+QList<QSharedPointer<QGesture> > QGraphicsSceneGestureEvent::gestures() const
+{
+ return m_gestures.values();
+}
-/*! \fn QSet<Qt::GestureType> QGraphicsSceneGestureEvent::cancelledGestures() const
-
+/*!
Returns a set of gesture names that used to be executed, but got
cancelled (i.e. they were not finished properly).
*/
+QSet<QString> QGraphicsSceneGestureEvent::cancelledGestures() const
+{
+ return m_cancelledGestures;
+}
-/*! \fn void QGraphicsSceneGestureEvent::setCancelledGestures(const QSet<Qt::GestureType> &)
-
+/*!
Returns a set of gesture names that used to be executed, but got
cancelled (i.e. they were not finished properly).
*/
-
-QGraphicsSceneGestureEvent::QGraphicsSceneGestureEvent()
- : QGraphicsSceneEvent(QEvent::GraphicsSceneGesture)
-{
-}
-
-QGraphicsSceneGestureEvent::~QGraphicsSceneGestureEvent()
+void QGraphicsSceneGestureEvent::setCancelledGestures(const QSet<QString> &cancelledGestures)
{
+ m_cancelledGestures = cancelledGestures;
}
/*!