phonebookui/pbkcommonui/inc/cntcontactcarddetailitem.h
changeset 31 2a11b5b00470
parent 27 de1630741fbe
child 37 fd64c38c277d
--- a/phonebookui/pbkcommonui/inc/cntcontactcarddetailitem.h	Mon May 03 12:24:20 2010 +0300
+++ b/phonebookui/pbkcommonui/inc/cntcontactcarddetailitem.h	Fri May 14 15:42:23 2010 +0300
@@ -23,12 +23,12 @@
 
 class HbIconItem;
 class HbTextItem;
-class HbRichTextItem;
 class QGraphicsGridLayout;
 class HbFrameItem;
-class HbGestureSceneFilter;
-class HbGesture;
+class HbTouchArea;
 class CntContactCardDataItem;
+class QTapGesture;
+class QTapAndHoldGesture;
 
 class CntContactCardDetailItem : public HbWidget
 {
@@ -36,16 +36,22 @@
     Q_PROPERTY( QString text READ getText )
     Q_PROPERTY( QString valueText READ getValueText )
     Q_PROPERTY( HbIcon icon READ getIcon )
+    Q_PROPERTY( HbIcon secondaryIcon READ getSecondaryIcon )
 
 public:
     CntContactCardDetailItem(int index, QGraphicsItem *parent = 0, bool isFocusable = true);
     ~CntContactCardDetailItem();
 
 protected:
-    void mousePressEvent(QGraphicsSceneMouseEvent *event);
-    void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
-    void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
-
+    //void mousePressEvent(QGraphicsSceneMouseEvent *event);
+    //void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+    //void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+    void gestureEvent(QGestureEvent* event);
+      
+private:
+    void tapTriggered(QTapGesture *gesture);
+    void tapAndHoldTriggered(QTapAndHoldGesture *gesture);
+    
 public:
     void initGesture();
     void createPrimitives();
@@ -65,6 +71,7 @@
     QString getText() const { return text; }
     QString getValueText() const { return valueText; }
     HbIcon getIcon() const { return icon; }
+    HbIcon getSecondaryIcon() const { return secondaryIcon; }
 
 #ifdef PBK_UNIT_TEST
 public:
@@ -72,13 +79,13 @@
 private:
 #endif
     HbIconItem              *mIcon;
+    HbIconItem              *mSecondaryIcon;
     HbTextItem              *mFirstLineText;
     HbTextItem              *mSecondLineText;
     HbFrameItem             *mFrameItem;
     HbFrameItem             *mFocusItem;
+    HbTouchArea             *mTouchArea;
     bool                    mHasFocus;
-    HbGestureSceneFilter    *mGestureFilter;
-    HbGesture               *mGestureLongpressed;
     int                     mIndex;
     bool                    mIsFocusable;
     Qt::TextElideMode       mValueTextElideMode;
@@ -87,6 +94,7 @@
     QString                 text;
     QString                 valueText;
     HbIcon                  icon;
+    HbIcon                  secondaryIcon;
 };
 
 #endif // CNTCOMMLAUNCHERDETAILITEM_H