29 //Forward Declarations |
29 //Forward Declarations |
30 class MGlxMediaList; |
30 class MGlxMediaList; |
31 class CGlxMLGenericObserver; |
31 class CGlxMLGenericObserver; |
32 class CGlxThumbnailContext; |
32 class CGlxThumbnailContext; |
33 class HbIcon; |
33 class HbIcon; |
|
34 class QImage; |
34 class CGlxDefaultAttributeContext; |
35 class CGlxDefaultAttributeContext; |
35 class CGlxDefaultThumbnailContext; |
36 class CGlxDefaultThumbnailContext; |
36 class CGlxDefaultListAttributeContext; |
37 class CGlxDefaultListAttributeContext; |
37 |
38 |
38 //to use first call GlxMLWrapperPrivate::Instance then set the mode by calling GlxMLWrapperPrivate::SetContextMode() |
39 //to use first call GlxMLWrapperPrivate::Instance then set the mode by calling GlxMLWrapperPrivate::SetContextMode() |
44 /** |
45 /** |
45 * Two-phased constructor. |
46 * Two-phased constructor. |
46 * |
47 * |
47 * @return Pointer to newly created object. NULL if creation fails. Avoiding Leave as would be called by a QT wrapper Class |
48 * @return Pointer to newly created object. NULL if creation fails. Avoiding Leave as would be called by a QT wrapper Class |
48 */ |
49 */ |
49 static GlxMLWrapperPrivate* Instance(GlxMLWrapper* aMLWrapper, int aCollectionId, int aHierarchyId, TGlxFilterItemType aFilterType); |
50 static GlxMLWrapperPrivate* Instance(GlxMLWrapper* aMLWrapper, int aCollectionId, int aHierarchyId, TGlxFilterItemType aFilterType,QString uri); |
50 /** |
51 /** |
51 * Destructor. |
52 * Destructor. |
52 */ |
53 */ |
53 ~GlxMLWrapperPrivate(); |
54 ~GlxMLWrapperPrivate(); |
54 /** |
55 /** |
98 public: |
99 public: |
99 /** |
100 /** |
100 * RetrieveItemIcon() |
101 * RetrieveItemIcon() |
101 */ |
102 */ |
102 HbIcon* RetrieveItemIcon(int index, GlxTBContextType aTBContextType); |
103 HbIcon* RetrieveItemIcon(int index, GlxTBContextType aTBContextType); |
|
104 QImage RetrieveItemImage(int index, GlxTBContextType aTBContextType); |
103 QString RetrieveListTitle(int index); |
105 QString RetrieveListTitle(int index); |
104 QString RetrieveListSubTitle(int index); |
106 QString RetrieveListSubTitle(int index); |
105 QString RetrieveItemUri(int index); |
107 QString RetrieveItemUri(int index); |
106 QSize RetrieveItemDimension(int index); |
108 QSize RetrieveItemDimension(int index); |
107 QDate RetrieveItemDate(int index); |
109 QDate RetrieveItemDate(int index); |
108 int RetrieveItemFrameCount(int aItemIndex); |
110 int RetrieveItemFrameCount(int aItemIndex); |
109 CFbsBitmap* RetrieveBitmap(int aItemIndex); |
111 CFbsBitmap* RetrieveBitmap(int aItemIndex); |
|
112 int RetrieveListItemCount( int aItemIndex ); |
|
113 bool isSystemItem( int aItemIndex ); |
110 |
114 |
111 private: |
115 private: |
112 |
116 |
113 /** |
117 /** |
114 * C++ default constructor. |
118 * C++ default constructor. |
116 GlxMLWrapperPrivate(GlxMLWrapper* aMLWrapper); |
120 GlxMLWrapperPrivate(GlxMLWrapper* aMLWrapper); |
117 |
121 |
118 /** |
122 /** |
119 * By default Symbian 2nd phase constructor is private. |
123 * By default Symbian 2nd phase constructor is private. |
120 */ |
124 */ |
121 void ConstructL(int aCollectionId, int aHierarchyId, TGlxFilterItemType aFilterType); |
125 void ConstructL(int aCollectionId, int aHierarchyId, TGlxFilterItemType aFilterType,QString uri=NULL); |
122 /** |
126 /** |
123 * Create an instance of Media List. |
127 * Create an instance of Media List. |
124 * |
128 * |
125 * @leave with error code if creation fails. |
129 * @leave with error code if creation fails. |
126 */ |
130 */ |
127 void CreateMediaListL(int aCollectionId, int aHierarchyId, TGlxFilterItemType aFilterType); |
131 void CreateMediaListL(int aCollectionId, int aHierarchyId, TGlxFilterItemType aFilterType); |
128 void CreateMediaListAlbumItemL(int aCollectionId, int aHierarchyId, TGlxFilterItemType aFilterType); |
132 void CreateMediaListAlbumItemL(int aCollectionId, int aHierarchyId, TGlxFilterItemType aFilterType); |
|
133 void CreateMediaListFavoritesItemL(int aCollectionId, int aHierarchyId, TGlxFilterItemType aFilterType,QString uri); |
129 void SetThumbnailContextL(GlxContextMode aContextMode); |
134 void SetThumbnailContextL(GlxContextMode aContextMode); |
130 void SetListContextL(GlxContextMode aContextMode); |
135 void SetListContextL(GlxContextMode aContextMode); |
|
136 void SetFavouriteContextL(); |
131 void CreateGridContextL(); |
137 void CreateGridContextL(); |
132 void CreateLsFsContextL(); |
138 void CreateLsFsContextL(); |
133 void CreatePtFsContextL(); |
139 void CreatePtFsContextL(); |
134 void RemoveGridContext(); |
140 void RemoveGridContext(); |
135 void RemoveLsFsContext(); |
141 void RemoveLsFsContext(); |
136 void RemovePtFsContext(); |
142 void RemovePtFsContext(); |
137 void RemoveListContext(); |
143 void RemoveListContext(); |
|
144 void RemoveFavouriteContext(); |
138 //for the attribute filtering |
145 //for the attribute filtering |
139 TInt CheckTBAttributesPresenceandSanity(TInt aItemIndex, |
146 TInt CheckTBAttributesPresenceandSanity(TInt aItemIndex, |
140 const RArray<TMPXAttribute>& aAttributes, TMPXAttribute aThumbnailAttribute ); |
147 const RArray<TMPXAttribute>& aAttributes, TMPXAttribute aThumbnailAttribute ); |
141 void CheckGridTBAttribute(TInt aItemIndex, const RArray<TMPXAttribute>& aAttributes); |
148 void CheckGridTBAttribute(TInt aItemIndex, const RArray<TMPXAttribute>& aAttributes); |
142 void CheckPtFsTBAttribute(TInt aItemIndex, const RArray<TMPXAttribute>& aAttributes); |
149 void CheckPtFsTBAttribute(TInt aItemIndex, const RArray<TMPXAttribute>& aAttributes); |
165 |
172 |
166 // FS related thumbnail contexts |
173 // FS related thumbnail contexts |
167 CGlxDefaultThumbnailContext* iPtFsThumbnailContext; |
174 CGlxDefaultThumbnailContext* iPtFsThumbnailContext; |
168 CGlxDefaultThumbnailContext* iLsFsThumbnailContext; |
175 CGlxDefaultThumbnailContext* iLsFsThumbnailContext; |
169 CGlxDefaultThumbnailContext* iFocusFsThumbnailContext; |
176 CGlxDefaultThumbnailContext* iFocusFsThumbnailContext; |
170 CGlxThumbnailContext* iFocusGridThumbnailContext; |
177 CGlxDefaultThumbnailContext* iFocusGridThumbnailContext; |
|
178 CGlxThumbnailContext* iFilmStripThumbnailContext; |
171 |
179 |
172 //List related contexts |
180 //List related contexts |
173 // Fetch context for retrieving title attribute |
181 // Fetch context for retrieving title attribute |
174 CGlxDefaultListAttributeContext* iTitleAttributeContext; |
182 CGlxDefaultListAttributeContext* iTitleAttributeContext; |
175 |
183 |
176 // Fetch context for retrieving subtitle |
184 // Fetch context for retrieving subtitle |
177 CGlxDefaultListAttributeContext* iSubtitleAttributeContext; |
185 CGlxDefaultListAttributeContext* iSubtitleAttributeContext; |
|
186 |
|
187 //to find if the image is in favorites or not |
|
188 CGlxDefaultAttributeContext *iFavouriteContext; |
178 |
189 |
179 CGlxThumbnailContext* iListThumbnailContext; |
190 CGlxThumbnailContext* iListThumbnailContext; |
180 // for thumbnail context |
191 // for thumbnail context |
181 TGlxFromVisibleIndexOutwardListIterator iThumbnailIterator; |
192 TGlxFromVisibleIndexOutwardListIterator iThumbnailIterator; |
182 |
193 |
183 // Iterators for Grid and FS |
194 // Iterators for Grid and FS |
184 TGlxFromManualIndexBlockyIterator iBlockyIterator; |
195 TGlxScrollingDirectionIterator iBlockyIterator; |
185 TGlxFromManualIndexBlockyIterator iBlockyIteratorForFocus; |
196 TGlxFromManualIndexBlockyIterator iBlockyIteratorForFilmStrip; |
186 |
197 |
187 //Variables for checking the active contexts |
198 //Variables for checking the active contexts |
188 //todo merge all these variables into 1 and have bitwise operation on them |
199 //todo merge all these variables into 1 and have bitwise operation on them |
189 TBool iGridContextActivated; |
200 TBool iGridContextActivated; |
190 TBool iLsFsContextActivated; |
201 TBool iLsFsContextActivated; |
191 TBool iPtFsContextActivated; |
202 TBool iPtFsContextActivated; |
192 TBool iLsListContextActivated; //currently not used as we have not implemented the logic for 3 thumbnails |
203 TBool iLsListContextActivated; //currently not used as we have not implemented the logic for 3 thumbnails |
193 TBool iPtListContextActivated; |
204 TBool iPtListContextActivated; |
194 TBool iSelectionListContextActivated; |
205 TBool iSelectionListContextActivated; |
|
206 |
195 }; |
207 }; |
196 #endif //GLXMLWRAPPER_P_H |
208 #endif //GLXMLWRAPPER_P_H |