equal
deleted
inserted
replaced
22 |
22 |
23 #include "glxbinding.h" // The binding is created by the binding set factory. |
23 #include "glxbinding.h" // The binding is created by the binding set factory. |
24 #include "glxmedialistiterator.h" // Interface for going through items in the list in a non-sequential order |
24 #include "glxmedialistiterator.h" // Interface for going through items in the list in a non-sequential order |
25 #include "mglxmedialistobserver.h" // Observes for changes in media list |
25 #include "mglxmedialistobserver.h" // Observes for changes in media list |
26 #include <memory> |
26 #include <memory> |
27 #include <bitmaptransforms.h> |
|
28 |
27 |
29 class GlxThumbnailVariantType; |
28 class GlxThumbnailVariantType; |
30 class CGlxThumbnailContext; // Fetch context to retrieve thumbnails |
29 class CGlxThumbnailContext; // Fetch context to retrieve thumbnails |
31 |
30 |
32 /** |
31 /** |
33 * Observer interface |
32 * Observer interface |
34 */ |
33 */ |
35 class MPreviewTNObserver |
34 class MPreviewTNObserver |
36 { |
35 { |
37 public: |
36 public: |
38 virtual void PreviewTNReadyL(CFbsBitmap* aBitmap, CFbsBitmap* aMask, TInt aIndex) = 0; |
37 virtual void PreviewTNReadyL(CFbsBitmap* aBitmap, CFbsBitmap* aMask, TBool aPopulateList) = 0; |
39 }; |
38 }; |
40 |
39 |
41 // CLASS DECLARATION |
40 // CLASS DECLARATION |
42 /** |
41 /** |
43 * Implementation of preview thumbnail binding for the |
42 * Implementation of preview thumbnail binding for the |
85 * aDestBitmap - Scaled destination bitmap |
84 * aDestBitmap - Scaled destination bitmap |
86 */ |
85 */ |
87 void ScaleBitmapToListSizeL(CFbsBitmap* aSrcBitmap, CFbsBitmap* aDestBitmap); |
86 void ScaleBitmapToListSizeL(CFbsBitmap* aSrcBitmap, CFbsBitmap* aDestBitmap); |
88 |
87 |
89 public: |
88 public: |
90 void HandleItemChangedL(const CMPXCollectionPath& aPath, |
89 void HandleItemChangedL(const CMPXCollectionPath& aPath,TBool aPopulateListTNs, |
91 TBool aPopulateListTNs, TBool aBackwardNavigation); |
90 TBool aIsRefreshNeeded, TBool aBackwardNavigation); |
92 void StartTimer(TBool aPopulateListTNs); |
91 void StartTimer(TBool aPopulateListTNs); |
93 void StopTimer(); |
92 void StopTimer(); |
94 |
93 |
95 // From MGlxMediaListObserver |
94 // From MGlxMediaListObserver |
96 void HandleItemAddedL( TInt aStartIndex, TInt aEndIndex, MGlxMediaList* aList ); |
95 void HandleItemAddedL( TInt aStartIndex, TInt aEndIndex, MGlxMediaList* aList ); |
141 TBool iTimerTicked; |
140 TBool iTimerTicked; |
142 |
141 |
143 //flag will be true, when initially the first thumbnails for all the |
142 //flag will be true, when initially the first thumbnails for all the |
144 //items in the list are populated. |
143 //items in the list are populated. |
145 TBool iPopulateListTNs; |
144 TBool iPopulateListTNs; |
|
145 |
|
146 TBool iIsRefreshNeeded; |
146 |
147 |
147 //it holds the initial number of thumbnail to be displayed |
148 //it holds the initial number of thumbnail to be displayed |
148 RArray<TInt> iPreviewItemCount; |
149 RArray<TInt> iPreviewItemCount; |
149 |
150 |
150 TSize iGridIconSize; |
151 TSize iGridIconSize; |
153 // has to be called |
154 // has to be called |
154 TInt iTrialCount; |
155 TInt iTrialCount; |
155 |
156 |
156 TInt iTrial; |
157 TInt iTrial; |
157 |
158 |
158 TBool iBackwardNavigation; |
|
159 |
|
160 CMPXFilter* iPreviewFilter; |
159 CMPXFilter* iPreviewFilter; |
161 |
|
162 CBitmapScaler* iBitmapScaler; |
|
163 }; |
160 }; |
164 |
161 |
165 // ---------------------------------------------------------------------------- |
|
166 // CWaitScheduler - Active object to scale the bitmap to the desired size. |
|
167 // ---------------------------------------------------------------------------- |
|
168 class CGlxWaitScheduler : public CActive |
|
169 { |
|
170 public: |
|
171 static CGlxWaitScheduler* NewL(); |
|
172 void WaitForRequest(); |
|
173 |
|
174 private: |
|
175 CGlxWaitScheduler(); |
|
176 void ConstructL(); |
|
177 virtual ~CGlxWaitScheduler(); |
|
178 void RunL(); |
|
179 void DoCancel(); |
|
180 |
|
181 private: |
|
182 CActiveSchedulerWait iScheduler; |
|
183 }; |
|
184 |
|
185 #endif //_GLXPREVIEWTHUMBNAILBINDING_H_ |
162 #endif //_GLXPREVIEWTHUMBNAILBINDING_H_ |