equal
deleted
inserted
replaced
44 #define BG_FRAME "qtg_fr_groupbox" |
44 #define BG_FRAME "qtg_fr_groupbox" |
45 |
45 |
46 //Localized Constants for item specific menu |
46 //Localized Constants for item specific menu |
47 #define LOC_OPEN hbTrId("txt_common_menu_open") |
47 #define LOC_OPEN hbTrId("txt_common_menu_open") |
48 #define LOC_REMOVE hbTrId("txt_common_menu_remove") |
48 #define LOC_REMOVE hbTrId("txt_common_menu_remove") |
49 #define LOC_DETAILS hbTrId("txt_common_menu_details") |
|
50 |
49 |
51 const QString LIST_ITEM_BG_FRAME_NORMAL ("qtg_fr_list_normal"); |
50 const QString LIST_ITEM_BG_FRAME_NORMAL ("qtg_fr_list_normal"); |
52 const QString LIST_ITEM_BG_FRAME_PRESSED("qtg_fr_list_pressed"); |
51 const QString LIST_ITEM_BG_FRAME_PRESSED("qtg_fr_list_pressed"); |
53 |
52 |
54 const QString ATTACHMENT_ICON("qtg_small_attachment"); |
53 const QString ATTACHMENT_ICON("qtg_small_attachment"); |
139 } |
138 } |
140 |
139 |
141 void MsgUnifiedEditorAttachment::handleLongTap(QPointF position) |
140 void MsgUnifiedEditorAttachment::handleLongTap(QPointF position) |
142 { |
141 { |
143 HbMenu* menu = new HbMenu; |
142 HbMenu* menu = new HbMenu; |
|
143 |
144 menu->addAction(LOC_OPEN, this, SLOT(handleOpen())); |
144 menu->addAction(LOC_OPEN, this, SLOT(handleOpen())); |
145 menu->addAction(LOC_REMOVE, this, SLOT(handleRemove())); |
145 menu->addAction(LOC_REMOVE, this, SLOT(handleRemove())); |
146 menu->addAction(LOC_DETAILS, this, SLOT(viewDetails())); |
146 |
147 menu->setDismissPolicy(HbPopup::TapAnywhere); |
147 menu->setDismissPolicy(HbPopup::TapAnywhere); |
148 menu->setAttribute(Qt::WA_DeleteOnClose, true); |
148 menu->setAttribute(Qt::WA_DeleteOnClose, true); |
149 menu->setPreferredPos(position); |
149 menu->setPreferredPos(position); |
150 menu->show(); |
150 menu->show(); |
151 } |
151 } |
167 } |
167 } |
168 mEditorUtils->launchContentViewer(mMimeType, mPath); |
168 mEditorUtils->launchContentViewer(mMimeType, mPath); |
169 |
169 |
170 //fire timer to regrab gesture after some delay. |
170 //fire timer to regrab gesture after some delay. |
171 QTimer::singleShot(300,this,SLOT(regrabGesture())); |
171 QTimer::singleShot(300,this,SLOT(regrabGesture())); |
172 } |
|
173 |
|
174 void MsgUnifiedEditorAttachment::viewDetails() |
|
175 { |
|
176 //open details view. |
|
177 } |
172 } |
178 |
173 |
179 bool MsgUnifiedEditorAttachment::isMultimediaContent() |
174 bool MsgUnifiedEditorAttachment::isMultimediaContent() |
180 { |
175 { |
181 bool ret = true; |
176 bool ret = true; |