equal
deleted
inserted
replaced
20 |
20 |
21 #include <qsortfilterproxymodel.h> |
21 #include <qsortfilterproxymodel.h> |
22 #include <e32const.h> |
22 #include <e32const.h> |
23 #include <mpxitemid.h> |
23 #include <mpxitemid.h> |
24 #include "videocollectionexport.h" |
24 #include "videocollectionexport.h" |
|
25 #include "videocollectioncommon.h" |
25 |
26 |
26 class QTimer; |
27 class QTimer; |
27 class VideoListDataModel; |
28 class VideoListDataModel; |
28 class VideoCollectionClient; |
29 class VideoCollectionClient; |
29 |
30 |
37 * Contructor. |
38 * Contructor. |
38 * |
39 * |
39 * @param parent parent of this widget |
40 * @param parent parent of this widget |
40 * @param client Collection client pointer to use. |
41 * @param client Collection client pointer to use. |
41 */ |
42 */ |
42 VideoSortFilterProxyModel(int type, QObject *parent=0); |
43 VideoSortFilterProxyModel(VideoCollectionCommon::TModelType type, QObject *parent=0); |
43 |
44 |
44 /** |
45 /** |
45 * Destructor. |
46 * Destructor. |
46 * |
47 * |
47 */ |
48 */ |
65 * This starts populating the model data from the MyVideos collection plugin. |
66 * This starts populating the model data from the MyVideos collection plugin. |
66 * |
67 * |
67 * @param level The level where the collection is opened. |
68 * @param level The level where the collection is opened. |
68 * @return 0 if opening was successful, negative if not. |
69 * @return 0 if opening was successful, negative if not. |
69 */ |
70 */ |
70 int open(int level); |
71 int open(VideoCollectionCommon::TCollectionLevels level); |
71 |
72 |
72 /** |
73 /** |
73 * Starts sorting. If async parameter is defined as true uses idle timer: |
74 * Starts sorting. If async parameter is defined as true uses idle timer: |
74 * starts timer with zero interval. When system has time to run timer sort() |
75 * starts timer with zero interval. When system has time to run timer sort() |
75 * -method is called. If async is false, then the sort() -method is called |
76 * -method is called. If async is false, then the sort() -method is called |
184 * @param mediaIds, list of item ids |
185 * @param mediaIds, list of item ids |
185 * @return 0 if no errors. |
186 * @return 0 if no errors. |
186 */ |
187 */ |
187 int removeItemsFromAlbum(TMPXItemId &albumId, const QList<TMPXItemId> &mediaIds); |
188 int removeItemsFromAlbum(TMPXItemId &albumId, const QList<TMPXItemId> &mediaIds); |
188 |
189 |
189 /** |
190 /** |
|
191 * Renames an album. |
|
192 * |
|
193 * @param itemId, Album to be renamed. |
|
194 * @param newTitle, New title for the album. |
|
195 * @return 0 if no errors. |
|
196 */ |
|
197 int renameAlbum(const TMPXItemId &albumId, const QString &newTitle); |
|
198 |
|
199 /** |
190 * Resolves duplicate album names and returns the resolved name. |
200 * Resolves duplicate album names and returns the resolved name. |
191 * 'New collection' -> 'New collection (1)' -> 'New collection (2)', etc. |
201 * 'New collection' -> 'New collection (1)' -> 'New collection (2)', etc. |
192 * |
202 * |
193 * @param albumName, Name specified by the user. |
203 * @param albumName, Name specified by the user. |
194 * @return Resolved name given to the album. |
204 * @return Resolved name given to the album. |
222 * @param None. |
232 * @param None. |
223 * @return TMPXItemId. |
233 * @return TMPXItemId. |
224 */ |
234 */ |
225 TMPXItemId getOpenItem() const; |
235 TMPXItemId getOpenItem() const; |
226 |
236 |
|
237 /** |
|
238 * Gets the type of model. |
|
239 * |
|
240 * @param None. |
|
241 * @return TModelType. |
|
242 */ |
|
243 VideoCollectionCommon::TModelType getType(); |
|
244 |
227 signals: |
245 signals: |
228 |
246 |
229 |
247 |
230 /** |
248 /** |
231 * Signal to be emitted if detail fetching started ok |
249 * Signal to be emitted if detail fetching started ok |
277 /** |
295 /** |
278 * signaled when particular album content has changed and |
296 * signaled when particular album content has changed and |
279 * refiltering is required |
297 * refiltering is required |
280 */ |
298 */ |
281 void albumChangedSlot(); |
299 void albumChangedSlot(); |
|
300 |
|
301 /** |
|
302 * signaled when data for item has changed and |
|
303 * invalidate is required. |
|
304 */ |
|
305 void itemModifiedSlot(const TMPXItemId &itemId); |
282 |
306 |
283 private: |
307 private: |
284 |
308 |
285 /** |
309 /** |
286 * disabled contructor |
310 * disabled contructor |
314 VideoCollectionClient *mCollectionClient; |
338 VideoCollectionClient *mCollectionClient; |
315 |
339 |
316 /** |
340 /** |
317 * type of data excepted |
341 * type of data excepted |
318 */ |
342 */ |
319 int mType; |
343 VideoCollectionCommon::TModelType mType; |
320 |
344 |
321 /** |
345 /** |
322 * Currently open level. |
346 * Currently open level. |
323 */ |
347 */ |
324 int mLevel; |
348 VideoCollectionCommon::TCollectionLevels mLevel; |
325 |
349 |
326 /** |
350 /** |
327 * item id used as filter if model type is generic model |
351 * item id used as filter if model type is generic model |
328 */ |
352 */ |
329 TMPXItemId mGenericFilterId; |
353 TMPXItemId mGenericFilterId; |