equal
deleted
inserted
replaced
13 * |
13 * |
14 * Description:attachment field to show attachment details. |
14 * Description:attachment field to show attachment details. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #ifndef UNIFIED_EDITOR_ATTACHMENT_H |
18 #ifndef MSG_UNIFIED_EDITOR_ATTACHMENT_H |
19 #define UNIFIED_EDITOR_ATTACHMENT_H |
19 #define MSG_UNIFIED_EDITOR_ATTACHMENT_H |
20 |
20 |
21 #include <HbWidget> |
21 #include <HbWidget> |
22 #include <QList> |
22 #include <QList> |
23 |
23 |
24 class HbTextItem; |
24 class HbTextItem; |
25 class HbIconItem; |
25 class HbIconItem; |
26 class HbGestureSceneFilter; |
26 class HbGestureSceneFilter; |
|
27 class HbFrameItem; |
|
28 class MsgUnifiedEditorUtils; |
27 |
29 |
28 class MsgUnifiedEditorAttachment : public HbWidget |
30 class MsgUnifiedEditorAttachment : public HbWidget |
29 { |
31 { |
30 Q_OBJECT |
32 Q_OBJECT |
31 |
33 |
65 * Check if the attachment content is MM content |
67 * Check if the attachment content is MM content |
66 * @return true/false |
68 * @return true/false |
67 */ |
69 */ |
68 bool isMultimediaContent(); |
70 bool isMultimediaContent(); |
69 |
71 |
70 /* |
|
71 * Depricated |
|
72 */ |
|
73 // HbFeedback::InstantEffect overrideFeedback(Hb::InstantInteraction interaction) const; |
|
74 |
|
75 protected: |
72 protected: |
76 /** |
73 /** |
77 * reimplemented from base class. |
74 * reimplemented from base class. |
78 */ |
75 */ |
79 virtual void mousePressEvent(QGraphicsSceneMouseEvent *event); |
76 virtual void gestureEvent(QGestureEvent *event); |
80 virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); |
|
81 |
77 |
82 |
78 |
83 private: |
79 private: |
84 /** |
80 |
85 * Helper method to initialize gesture. |
81 void setPressed(bool pressed); |
86 */ |
|
87 void initGesture(); |
|
88 |
82 |
89 |
83 |
90 signals: |
84 signals: |
91 /** |
85 /** |
92 * emit when short-tap happens on the attachment |
86 * emit when short-tap happens on the attachment |
100 |
94 |
101 private slots: |
95 private slots: |
102 /** |
96 /** |
103 * show longpress menu for attachment object |
97 * show longpress menu for attachment object |
104 */ |
98 */ |
105 void longPressed(QPointF position); |
99 void handleLongTap(QPointF position); |
|
100 |
|
101 /** |
|
102 * Handles short tap event. |
|
103 */ |
|
104 void handleShortTap(); |
106 |
105 |
107 /** |
106 /** |
108 * slot to remove attachment from msg editor |
107 * slot to remove attachment from msg editor |
109 */ |
108 */ |
110 void removeAttachment(); |
109 void handleRemove(); |
111 |
110 |
112 /** |
111 /** |
113 * slot to open attachment |
112 * slot to open attachment |
114 */ |
113 */ |
115 void openAttachment(); |
114 void handleOpen(); |
116 |
115 |
117 /** |
116 /** |
118 * slot to view details of the attachment file |
117 * slot to view details of the attachment file |
119 */ |
118 */ |
120 void viewDetails(); |
119 void viewDetails(); |
|
120 |
|
121 /** |
|
122 * Slot to regrab gesture after some delay (300 ms) to avoid multiple gesture |
|
123 * events back to back. |
|
124 */ |
|
125 void regrabGesture(); |
121 |
126 |
122 private: |
127 private: |
123 /** |
128 /** |
124 * attachment file's path |
129 * attachment file's path |
125 */ |
130 */ |
157 |
162 |
158 /** |
163 /** |
159 * Max limit on sms size. Store at class level for optimization |
164 * Max limit on sms size. Store at class level for optimization |
160 */ |
165 */ |
161 int mMaxSmsSize; |
166 int mMaxSmsSize; |
|
167 |
|
168 /** |
|
169 * Background item |
|
170 * Own |
|
171 */ |
|
172 HbFrameItem* mBackGround; |
|
173 |
|
174 /** |
|
175 * MsgUnifiedEditorUtils object. |
|
176 * Own |
|
177 */ |
|
178 MsgUnifiedEditorUtils *mEditorUtils; |
162 |
179 |
163 }; |
180 }; |
164 |
181 |
165 typedef QList<MsgUnifiedEditorAttachment*> MsgUnifiedEditorAttachmentList; |
182 typedef QList<MsgUnifiedEditorAttachment*> MsgUnifiedEditorAttachmentList; |
166 |
183 |
167 #endif //UNIFIED_EDITOR_ATTACHMENT_H |
184 #endif //MSG_UNIFIED_EDITOR_ATTACHMENT_H |