55 : QAbstractListModel(parent), |
55 : QAbstractListModel(parent), |
56 mCachingInProgress(false), |
56 mCachingInProgress(false), |
57 mImageType(ImageTypeNone), |
57 mImageType(ImageTypeNone), |
58 // mDefaultIcon((":/images/default.svg")), |
58 // mDefaultIcon((":/images/default.svg")), |
59 mUseLowResImages(false), |
59 mUseLowResImages(false), |
|
60 mBufferManager(0), |
|
61 mSilentDataFetch(false), |
60 mWrapper( new ThumbnailManager() ), |
62 mWrapper( new ThumbnailManager() ), |
61 mThumbnailRequestPending(false), |
63 mThumbnailRequestPending(false), |
62 mThumbnailRequestIndex(-1), |
64 mThumbnailRequestIndex(-1), |
63 mThumbnailRequestID(-1), |
65 mThumbnailRequestID(-1) |
64 mBufferManager(0), |
|
65 mSilentDataFetch(false) |
|
66 { |
66 { |
67 FUNC_LOG; |
67 FUNC_LOG; |
68 mWrapper->setQualityPreference( ThumbnailManager::OptimizeForPerformance ); |
68 mWrapper->setQualityPreference( ThumbnailManager::OptimizeForPerformance ); |
69 |
69 |
70 mWrapper->setProperty("qimageSupport","true"); |
70 mWrapper->setProperty("qimageSupport","true"); |
594 getNextThumbnail(); |
594 getNextThumbnail(); |
595 } |
595 } |
596 |
596 |
597 void HgWidgetTestDataModel::thumbnailReady( QPixmap pixmap, void* data, int /*id*/, int error ) |
597 void HgWidgetTestDataModel::thumbnailReady( QPixmap pixmap, void* data, int /*id*/, int error ) |
598 { |
598 { |
|
599 Q_UNUSED(data); |
|
600 |
599 if (!error && !pixmap.isNull() ){ |
601 if (!error && !pixmap.isNull() ){ |
600 // int idx = reinterpret_cast<int>(data); |
602 // int idx = reinterpret_cast<int>(data); |
601 if (mImageType == ImageTypeQPixmap || mImageType == ImageTypeHbIcon) |
603 if (mImageType == ImageTypeQPixmap || mImageType == ImageTypeHbIcon) |
602 { |
604 { |
603 mPixmaps.replace(mThumbnailRequestIndex, pixmap); |
605 mPixmaps.replace(mThumbnailRequestIndex, pixmap); |