summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget.cpp
diff options
context:
space:
mode:
authorFrans Englich <frans.englich@nokia.com>2009-10-15 08:58:59 (GMT)
committerFrans Englich <frans.englich@nokia.com>2009-10-15 08:58:59 (GMT)
commitd245034a54d20a3ff59575158dbf8705547648a7 (patch)
tree6fdbf2718e6613e8af60b0fa4e77ba9b1f41660a /src/gui/kernel/qwidget.cpp
parent16dab236acbd35c351c1ac1d36dbf018db0d278c (diff)
parent376a5a845ba6d19751a58ea79a8d5701c4ba4d13 (diff)
downloadQt-d245034a54d20a3ff59575158dbf8705547648a7.zip
Qt-d245034a54d20a3ff59575158dbf8705547648a7.tar.gz
Qt-d245034a54d20a3ff59575158dbf8705547648a7.tar.bz2
Merge commit 'origin/4.6' into mmfphonon
Conflicts: src/corelib/kernel/qcoreevent.cpp src/corelib/kernel/qcoreevent.h
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r--src/gui/kernel/qwidget.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 7c9356e..8da415f 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -115,6 +115,7 @@
#include "private/qevent_p.h"
#include "private/qgraphicssystem_p.h"
+#include "private/qgesturemanager_p.h"
// widget/widget data creation count
//#define QWIDGET_EXTRA_DEBUG
@@ -901,9 +902,8 @@ void QWidget::setAutoFillBackground(bool enabled)
\sa QEvent, QPainter, QGridLayout, QBoxLayout
\section1 Softkeys
- \since 4.6
- Softkeys are usually physical keys on a device that have a corresponding label or
+ Since Qt 4.6, Softkeys are usually physical keys on a device that have a corresponding label or
other visual representation on the screen that is generally located next to its
physical counterpart. They are most often found on mobile phone platforms. In
modern touch based user interfaces it is also possible to have softkeys that do
@@ -8345,6 +8345,9 @@ bool QWidget::event(QEvent *event)
(void) QApplication::sendEvent(this, &mouseEvent);
break;
}
+ case QEvent::Gesture:
+ event->ignore();
+ break;
#ifndef QT_NO_PROPERTIES
case QEvent::DynamicPropertyChange: {
const QByteArray &propName = static_cast<QDynamicPropertyChangeEvent *>(event)->propertyName();
@@ -11681,6 +11684,19 @@ QGraphicsProxyWidget *QWidget::graphicsProxyWidget() const
Synonym for QList<QWidget *>.
*/
+/*!
+ Subscribes the widget to a given \a gesture with a \a context.
+
+ \sa QGestureEvent
+ \since 4.6
+*/
+void QWidget::grabGesture(Qt::GestureType gesture, Qt::GestureContext context)
+{
+ Q_D(QWidget);
+ d->gestureContext.insert(gesture, context);
+ (void)QGestureManager::instance(); // create a gesture manager
+}
+
QT_END_NAMESPACE
#include "moc_qwidget.cpp"