summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Bugge Monsen <mmonsen@trolltech.com>2009-07-14 11:30:49 (GMT)
committerMarius Bugge Monsen <mmonsen@trolltech.com>2009-07-14 11:34:18 (GMT)
commita749d4cb3509f9a82c1d7d3b6a03e2c99dfe1842 (patch)
treef74a7f37446b85112acc9c3d94f2b36a1afe6fe3
parent8189132079abb2349b44b3e13e58b5453c489e98 (diff)
downloadQt-a749d4cb3509f9a82c1d7d3b6a03e2c99dfe1842.zip
Qt-a749d4cb3509f9a82c1d7d3b6a03e2c99dfe1842.tar.gz
Qt-a749d4cb3509f9a82c1d7d3b6a03e2c99dfe1842.tar.bz2
Remove sendGestureEvent().
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp68
1 files changed, 0 insertions, 68 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index e2458f5..3296775 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -3042,74 +3042,6 @@ bool QGraphicsScene::event(QEvent *event)
return true;
}
-<<<<<<< HEAD:src/gui/graphicsview/qgraphicsscene.cpp
-=======
-void QGraphicsScenePrivate::sendGestureEvent(const QSet<QGesture*> &gestures, const QSet<QString> &cancelled)
-{
- Q_Q(QGraphicsScene);
- typedef QMap<QGraphicsItem*, QSet<QGesture*> > ItemGesturesMap;
- ItemGesturesMap itemGestures;
- QSet<QGesture*> startedGestures;
- for(QSet<QGesture*>::const_iterator it = gestures.begin(), e = gestures.end();
- it != e; ++it) {
- QGesture *g = *it;
- Q_ASSERT(g != 0);
- QGesturePrivate *gd = g->d_func();
- if (gd->graphicsItem != 0) {
- itemGestures[gd->graphicsItem].insert(g);
- if (g->state() == Qt::GestureStarted || gd->singleshot)
- startedGestures.insert(g);
- }
- }
-
- QSet<QGesture*> ignoredGestures;
- for(ItemGesturesMap::const_iterator it = itemGestures.begin(), e = itemGestures.end();
- it != e; ++it) {
- QGraphicsItem *receiver = it.key();
- Q_ASSERT(receiver != 0);
- QGraphicsSceneGestureEvent event;
- event.setGestures(it.value());
- event.setCancelledGestures(cancelled);
- bool processed = sendEvent(receiver, &event);
- QSet<QGesture*> started = startedGestures.intersect(it.value());
- if (event.isAccepted())
- foreach(QGesture *g, started)
- g->accept();
- if (!started.isEmpty() && !(processed && event.isAccepted())) {
- // there are started gestures event that weren't
- // accepted, so propagating each gesture independently.
- QSet<QGesture*>::const_iterator it = started.begin(),
- e = started.end();
- for(; it != e; ++it) {
- QGesture *g = *it;
- if (processed && g->isAccepted()) {
- continue;
- }
- QGesturePrivate *gd = g->d_func();
- QGraphicsItem *item = gd->graphicsItem;
- Q_UNUSED(item); // ### REMOVE
- gd->graphicsItem = 0;
-
- //### THIS IS BS, DONT FORGET TO REWRITE THIS CODE
- // need to make sure we try to deliver event just once to each widget
- const QString gestureType = g->type();
- QList<QGraphicsItem*> itemsUnderGesture = q->items(g->hotSpot());
- for (int i = 0; i < itemsUnderGesture.size(); ++i) {
- QGraphicsItem *item = itemsUnderGesture.at(i);
- if (item != receiver && item->d_func()->hasGesture(gestureType)) {
- ignoredGestures.insert(g);
- gd->graphicsItem = item;
- break;
- }
- }
- }
- }
- }
- if (!ignoredGestures.isEmpty())
- sendGestureEvent(ignoredGestures, cancelled);
-}
-
->>>>>>> 296da87... Add QGraphicsView::filtersChildEvents property.:src/gui/graphicsview/qgraphicsscene.cpp
/*!
\reimp