messagingapp/msgui/unifiededitor/inc/msgunieditorattachment.h
branchGCC_SURGE
changeset 47 5b14749788d7
parent 27 e4592d119491
parent 34 84197e66a4bd
--- a/messagingapp/msgui/unifiededitor/inc/msgunieditorattachment.h	Thu Jun 17 09:57:06 2010 +0100
+++ b/messagingapp/msgui/unifiededitor/inc/msgunieditorattachment.h	Thu Jul 22 16:32:06 2010 +0100
@@ -15,8 +15,8 @@
  *
  */
 
-#ifndef UNIFIED_EDITOR_ATTACHMENT_H
-#define UNIFIED_EDITOR_ATTACHMENT_H
+#ifndef MSG_UNIFIED_EDITOR_ATTACHMENT_H
+#define MSG_UNIFIED_EDITOR_ATTACHMENT_H
 
 #include <HbWidget>
 #include <QList>
@@ -24,6 +24,8 @@
 class HbTextItem;
 class HbIconItem;
 class HbGestureSceneFilter;
+class HbFrameItem;
+class MsgUnifiedEditorUtils;
 
 class MsgUnifiedEditorAttachment : public HbWidget
     {
@@ -67,24 +69,16 @@
      */
     bool isMultimediaContent();
     
-    /*
-     * Depricated
-     */
-  //  HbFeedback::InstantEffect overrideFeedback(Hb::InstantInteraction interaction) const;
-
 protected:
     /**
      * reimplemented from base class.
      */
-    virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
-    virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+    virtual void gestureEvent(QGestureEvent *event);
     
     
 private:
-    /**
-     * Helper method to initialize gesture.
-     */
-    void initGesture();
+   
+    void setPressed(bool pressed);
 
 
 signals:
@@ -102,22 +96,33 @@
     /**
 	 * show longpress menu for attachment object
 	 */
-    void longPressed(QPointF position);
+    void handleLongTap(QPointF position);
+    
+    /**
+     * Handles short tap event.
+     */
+    void handleShortTap();
 
 	/**
 	 * slot to remove attachment from msg editor
 	 */
-    void removeAttachment();
+    void handleRemove();
 
 	/**
 	 * slot to open attachment
 	 */
-    void openAttachment();
+    void handleOpen();
 
 	/**
 	 * slot to view details of the attachment file
 	 */
     void viewDetails();
+    
+    /**
+     * Slot to regrab gesture after some delay (300 ms) to avoid multiple gesture
+     * events back to back.  
+     */
+    void regrabGesture();
 
 private:
     /**
@@ -159,9 +164,21 @@
      * Max limit on sms size. Store at class level for optimization
      */
     int mMaxSmsSize;
+    
+	/**
+     * Background item
+     * Own
+     */
+    HbFrameItem* mBackGround;
+    
+    /**
+     * MsgUnifiedEditorUtils object.
+     * Own
+     */
+    MsgUnifiedEditorUtils *mEditorUtils;
 
     };
 
 typedef QList<MsgUnifiedEditorAttachment*> MsgUnifiedEditorAttachmentList;
 
-#endif //UNIFIED_EDITOR_ATTACHMENT_H
+#endif //MSG_UNIFIED_EDITOR_ATTACHMENT_H