diff options
author | Daniel d'Andrada <daniel.dandrada@nokia.com> | 2010-11-18 12:49:05 +0200 |
---|---|---|
committer | Daniel d'Andrada <daniel.dandrada@nokia.com> | 2010-11-18 12:49:05 +0200 |
commit | 4e18f291b25d24c2e7300cd2981b77b7d9ddde2a (patch) | |
tree | 0c088b70403a56eac7cea54db8641c2e883c96be /examples | |
parent | 5d613573e905c659bfe16350b0d371b52127be41 (diff) |
Changes: Remove setAcceptTouchEvents() and grabGesture() calls from examples.
RevBy: TrustMe
Details: MSceneWindow already does all that, so there's no need to do it again
in inherited classes.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/gestures/mypage.cpp | 21 | ||||
-rw-r--r-- | examples/tutorial_music_catalogue/albumpage.cpp | 3 |
2 files changed, 0 insertions, 24 deletions
diff --git a/examples/gestures/mypage.cpp b/examples/gestures/mypage.cpp index cb5f716e..0c56c152 100644 --- a/examples/gestures/mypage.cpp +++ b/examples/gestures/mypage.cpp @@ -18,27 +18,6 @@ MyPage::MyPage(QGraphicsItem *parent) { setTitle("Gestures example"); - // This enables delivery of low-level touch events to the widget. - // While we aren't directly interested in these, on a multitouch - // capable system the pinch gesture is recognized by the touch events. - setAcceptTouchEvents(true); - - // The grabGesture methods enables delivery of the high-level gesture - // events (QPinchGesture and QSwipeGesture in our case) to the widget. - // - // The reason the gestures are handled by the page instead of the - // actual image widget, is that we want the entire page area to - // function as a single pinching/rotating/swiping surface. - // - // In general, you should handle gestures on the largest possible - // area, even if it holds multiple widgets. In case of multiple widgets, - // you can determine the target of the gesture using the event's hotSpot - // property. - grabGesture(Qt::TapGesture); - grabGesture(Qt::TapAndHoldGesture); - grabGesture(Qt::PinchGesture); - grabGesture(Qt::SwipeGesture); - // Setting up our animations swipeAnimation = new QParallelAnimationGroup(this); diff --git a/examples/tutorial_music_catalogue/albumpage.cpp b/examples/tutorial_music_catalogue/albumpage.cpp index 18facc02..10c2c652 100644 --- a/examples/tutorial_music_catalogue/albumpage.cpp +++ b/examples/tutorial_music_catalogue/albumpage.cpp @@ -14,9 +14,6 @@ AlbumPage::AlbumPage(const Album *album, QGraphicsItem *parent) { setTitle(album->title); connect(this, SIGNAL(appeared()), SLOT(fadeInAlbumCover())); - - setAcceptTouchEvents(true); - grabGesture(Qt::PinchGesture); } void AlbumPage::createContent() |