equal
deleted
inserted
replaced
69 Send request to start Video picker |
69 Send request to start Video picker |
70 */ |
70 */ |
71 void NmAttachmentPicker::fetchVideo() |
71 void NmAttachmentPicker::fetchVideo() |
72 { |
72 { |
73 NM_FUNCTION; |
73 NM_FUNCTION; |
|
74 |
74 fetch(XQI_VIDEO_FETCH, XQOP_VIDEO_FETCH); |
75 fetch(XQI_VIDEO_FETCH, XQOP_VIDEO_FETCH); |
75 } |
76 } |
76 |
77 |
77 /*! |
78 /*! |
78 Send request to start general file picker |
79 Send request to start general file picker |
92 Send request to retrieve image from camera |
93 Send request to retrieve image from camera |
93 */ |
94 */ |
94 void NmAttachmentPicker::fetchCameraStill() |
95 void NmAttachmentPicker::fetchCameraStill() |
95 { |
96 { |
96 NM_FUNCTION; |
97 NM_FUNCTION; |
|
98 |
97 fetchFromCamera(NmAttachmentPickerStillMode); |
99 fetchFromCamera(NmAttachmentPickerStillMode); |
98 } |
100 } |
99 |
101 |
100 /*! |
102 /*! |
101 Send request to retrieve video from camera |
103 Send request to retrieve video from camera |
102 */ |
104 */ |
103 void NmAttachmentPicker::fetchCameraVideo() |
105 void NmAttachmentPicker::fetchCameraVideo() |
104 { |
106 { |
105 NM_FUNCTION; |
107 NM_FUNCTION; |
|
108 |
106 fetchFromCamera(NmAttachmentPickerVideoMode); |
109 fetchFromCamera(NmAttachmentPickerVideoMode); |
107 } |
110 } |
108 |
111 |
109 /*! |
112 /*! |
110 Send request to retrieve image/video from camera |
113 Send request to retrieve image/video from camera |
151 if (mRequest) { |
154 if (mRequest) { |
152 mRequest->setSynchronous(false); |
155 mRequest->setSynchronous(false); |
153 if (args) { |
156 if (args) { |
154 mRequest->setArguments(*args); |
157 mRequest->setArguments(*args); |
155 } |
158 } |
|
159 // Set the title for the picker window |
|
160 // Title setting disabled |
|
161 //QVariant title(mTitle); |
|
162 //XQRequestInfo info; |
|
163 //info.setInfo(XQINFO_KEY_WINDOW_TITLE, title); |
|
164 //mRequest->setInfo(info); |
|
165 |
156 connect(mRequest, SIGNAL(requestOk(const QVariant&)), |
166 connect(mRequest, SIGNAL(requestOk(const QVariant&)), |
157 this, SIGNAL(attachmentsFetchOk(const QVariant&))); |
167 this, SIGNAL(attachmentsFetchOk(const QVariant&))); |
158 |
168 |
159 connect(mRequest, SIGNAL(requestError(int, const QString&)), |
169 connect(mRequest, SIGNAL(requestError(int, const QString&)), |
160 this, SIGNAL(attachmentsFetchError(int, const QString&))); |
170 this, SIGNAL(attachmentsFetchError(int, const QString&))); |
166 /*! |
176 /*! |
167 Launch the correct fetcher based on the clicked list item. |
177 Launch the correct fetcher based on the clicked list item. |
168 */ |
178 */ |
169 void NmAttachmentPicker::selectFetcher(HbListWidgetItem *listItem) |
179 void NmAttachmentPicker::selectFetcher(HbListWidgetItem *listItem) |
170 { |
180 { |
171 QString itemText = listItem->text(); |
181 NM_FUNCTION; |
|
182 |
|
183 QString itemText = listItem->text(); |
172 if (itemText == hbTrId("txt_mail_list_photo")) { |
184 if (itemText == hbTrId("txt_mail_list_photo")) { |
173 fetchImage(); |
185 fetchImage(); |
174 } |
186 } |
175 else if (itemText == hbTrId("txt_mail_list_music")) { |
187 else if (itemText == hbTrId("txt_mail_list_music")) { |
176 fetchAudio(); |
188 fetchAudio(); |
182 QMetaObject::invokeMethod(this, "fetchOther", Qt::QueuedConnection); |
194 QMetaObject::invokeMethod(this, "fetchOther", Qt::QueuedConnection); |
183 } |
195 } |
184 else if (itemText == hbTrId("txt_mail_list_new_photo")) { |
196 else if (itemText == hbTrId("txt_mail_list_new_photo")) { |
185 fetchCameraStill(); |
197 fetchCameraStill(); |
186 } |
198 } |
187 } |
199 else if (itemText == hbTrId("txt_mail_list_new_video")) { |
|
200 fetchCameraVideo(); |
|
201 } |
|
202 } |
|
203 |
|
204 /*! |
|
205 Sets the title used in the picker views |
|
206 */ |
|
207 void NmAttachmentPicker::setTitle(const QString &title) |
|
208 { |
|
209 NM_FUNCTION; |
|
210 |
|
211 mTitle = title; |
|
212 } |