diff -r ebfee66fde93 -r 84197e66a4bd messagingapp/msgui/unifiededitor/inc/msgunieditorattachment.h --- a/messagingapp/msgui/unifiededitor/inc/msgunieditorattachment.h Fri Jun 04 10:25:39 2010 +0100 +++ b/messagingapp/msgui/unifiededitor/inc/msgunieditorattachment.h Fri Jun 11 13:35:48 2010 +0300 @@ -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 #include @@ -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 MsgUnifiedEditorAttachmentList; -#endif //UNIFIED_EDITOR_ATTACHMENT_H +#endif //MSG_UNIFIED_EDITOR_ATTACHMENT_H