summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget.cpp
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-08-03 16:24:44 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-08-04 14:22:45 (GMT)
commit6e7a6478279a94a82af46e6814f113244aca46dd (patch)
treeabd54ce05996b2377fa78b3b895446f85ab15e90 /src/gui/kernel/qwidget.cpp
parentfbee62af06ebe2c8cf6da1cc18a665c69c64eff7 (diff)
downloadQt-6e7a6478279a94a82af46e6814f113244aca46dd.zip
Qt-6e7a6478279a94a82af46e6814f113244aca46dd.tar.gz
Qt-6e7a6478279a94a82af46e6814f113244aca46dd.tar.bz2
Moved the native window gesture handling code to the right place.
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r--src/gui/kernel/qwidget.cpp53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 5400146..765b26f 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -7940,59 +7940,6 @@ bool QWidget::event(QEvent *event)
(void) QApplication::sendEvent(this, &mouseEvent);
break;
}
-#ifdef Q_WS_WIN
- case QEvent::NativeGesture: {
- QNativeGestureEvent *ev = static_cast<QNativeGestureEvent*>(event);
- QApplicationPrivate *qAppPriv = qApp->d_func();
- QApplicationPrivate::WidgetStandardGesturesMap::iterator it;
- it = qAppPriv->widgetGestures.find(this);
- if (it != qAppPriv->widgetGestures.end()) {
- Qt::GestureState state = Qt::GestureUpdated;
- if (qAppPriv->lastGestureId == 0)
- state = Qt::GestureStarted;
- QNativeGestureEvent::Type type = ev->gestureType;
- if (ev->gestureType == QNativeGestureEvent::GestureEnd) {
- type = (QNativeGestureEvent::Type)qAppPriv->lastGestureId;
- state = Qt::GestureFinished;
- }
-
- QGesture *gesture = 0;
- switch (type) {
- case QNativeGestureEvent::Pan: {
- QPanGesture *pan = it.value().pan;
- gesture = pan;
- if (state == Qt::GestureStarted) {
- gesture->setStartPos(ev->position);
- gesture->setLastPos(ev->position);
- } else {
- gesture->setLastPos(gesture->pos());
- }
- gesture->setPos(ev->position);
- break;
- }
- case QNativeGestureEvent::Pinch:
- break;
- default:
- break;
- }
- if (gesture) {
- gesture->setState(state);
- if (state == Qt::GestureStarted)
- emit gesture->started();
- emit gesture->triggered();
- if (state == Qt::GestureFinished)
- emit gesture->finished();
- event->accept();
- }
- if (ev->gestureType == QNativeGestureEvent::GestureEnd) {
- qAppPriv->lastGestureId = 0;
- } else {
- qAppPriv->lastGestureId = type;
- }
- }
- break;
- }
-#endif
#ifndef QT_NO_PROPERTIES
case QEvent::DynamicPropertyChange: {
const QByteArray &propName = static_cast<QDynamicPropertyChangeEvent *>(event)->propertyName();