--- a/videocollection/videocollectionwrapper/inc/videothumbnaildata_p.h Tue Jul 06 14:17:50 2010 +0300
+++ b/videocollection/videocollectionwrapper/inc/videothumbnaildata_p.h Wed Aug 18 09:50:14 2010 +0300
@@ -68,7 +68,7 @@
* @return QIcon* thumbnail pointer
*
*/
- const QIcon* getThumbnail(TMPXItemId mediaId);
+ const QIcon* getThumbnail(const TMPXItemId &mediaId);
/**
* Method removes thumbnail data from the icon cache.
@@ -78,7 +78,7 @@
* @return bool: true if item removed correctly, false if not.
*
*/
- bool removeThumbnail(TMPXItemId mediaId);
+ bool removeThumbnail(const TMPXItemId &mediaId);
/**
* Starts background thumbnail fetching from the given fetch index.
@@ -104,6 +104,13 @@
void enableThumbnailCreation(bool enable);
/**
+ * Returns if background fetching is enabled.
+ *
+ * @return bool: true if background fetching is enabled, otherwise false.
+ */
+ bool backgroundFetchingEnabled();
+
+ /**
* Frees allocated data for thumbnails and cancels ongoing fetches.
*/
void freeThumbnailData();
@@ -159,7 +166,7 @@
* @return int: thumbnail id or -1 if fetch starting fails.
*
*/
- int startFetchingThumbnail(TMPXItemId mediaId, int priority);
+ int startFetchingThumbnail(const TMPXItemId &mediaId, int priority);
/**
* Appends indexes in the source model to the list between start and end.
@@ -168,7 +175,7 @@
* @param startIndex start index
* @param endIndex end index
*/
- void getModelIndexes(QList<QModelIndex> &indexes, int startIndex, int endIndex);
+ void getModelIndexes(QList<QModelIndex> &indexes, int &startIndex, int &endIndex);
/**
* Method returns default thumbnail data.
@@ -178,7 +185,7 @@
* @return QIcon: reference to default thumbnail data
*
*/
- const QIcon* defaultThumbnail(TMPXItemId mediaId);
+ const QIcon* defaultThumbnail(const TMPXItemId &mediaId);
/**
* Loads icon from file or resource, the icon is scaled to size of the
@@ -204,7 +211,7 @@
* @param mediaIds: media ids of the videos whose thumbnail is ready.
*
*/
- void thumbnailsFetched(QList<TMPXItemId> mediaIds);
+ void thumbnailsFetched(QList<TMPXItemId>& mediaIds);
private slots:
@@ -220,12 +227,6 @@
void thumbnailReadySlot(QPixmap tnData, const TMPXItemId &mediaId, int error);
/**
- * VideoListDataModel signals this slot when the model has been changed.
- *
- */
- void modelChangedSlot();
-
- /**
* Fetches thumbnails around of mCurrentFetchIndex in batches of THUMBNAIL_BACKGROUND_FETCH_AMOUNT.
* The fetch index is set by startFetchingThumbnails which also resets
* mCurrentBackgroundFetchCount. Maximum of THUMBNAIL_MAX_BACKGROUND_FETCH thumbnails are