diff -r 25a3fbb5e4d3 -r 1cc4c46c2963 cpsecplugins/devicelockplugin/src/cpremotelockdataformviewitem.cpp --- a/cpsecplugins/devicelockplugin/src/cpremotelockdataformviewitem.cpp Fri Sep 17 08:35:02 2010 +0300 +++ b/cpsecplugins/devicelockplugin/src/cpremotelockdataformviewitem.cpp Mon Oct 04 01:41:57 2010 +0300 @@ -19,7 +19,7 @@ #include #include #include <../../inc/cpsecplugins.h> - +#include /* ***************************************************************** @@ -116,6 +116,12 @@ CpLockEdit::CpLockEdit(const QString &text, QGraphicsItem *parent /*= 0*/) : HbLineEdit(text,parent) { + RDEBUG("0", 0); + grabGesture(Qt::TapGesture); + grabGesture(Qt::PanGesture); + grabGesture(Qt::PinchGesture); + grabGesture(Qt::SwipeGesture); + } @@ -144,6 +150,11 @@ void CpLockEdit::mousePressEvent(QGraphicsSceneMouseEvent *event) { RDEBUG("0", 0); + RDEBUG("Nothing to do because QTapGesture did it", 0); + event->ignore(); + return; + + /* if (event->button() != Qt::LeftButton) { event->ignore(); return; @@ -155,5 +166,21 @@ } else { event->ignore(); - } + } + */ } + +void CpLockEdit::gestureEvent(QGestureEvent *event) +{ + RDEBUG("0", 0); + if (QTapGesture *tap = (QTapGesture*)event->gesture(Qt::TapGesture)) { + switch(tap->state()) { + case Qt::GestureStarted: + RDEBUG("0", 0); + emit clicked(); + break; + default: + break; + } + } +}