70 * parent() - return the model index of the child. |
72 * parent() - return the model index of the child. |
71 * It always return invalid model index since no there is no parent |
73 * It always return invalid model index since no there is no parent |
72 */ |
74 */ |
73 QModelIndex parent( const QModelIndex &child ) const; |
75 QModelIndex parent( const QModelIndex &child ) const; |
74 |
76 |
|
77 QVariant itemImageData( const QModelIndex &index, int role ) const; |
|
78 QVariant collectionProperty( int role ) const; |
|
79 QVariant itemProperty( const QModelIndex &index, int role ) const; |
|
80 |
75 /** |
81 /** |
76 * data() - return the data of corresponding role. |
82 * data() - return the data of corresponding role. |
77 * @param - model index of interested item. |
83 * @param - model index of interested item. |
78 * @param - role of corresponding data. |
84 * @param - role of corresponding data. |
79 */ |
85 */ |
92 * @param - row index of the item. |
98 * @param - row index of the item. |
93 * @param - column index of the item, it is always one. |
99 * @param - column index of the item, it is always one. |
94 */ |
100 */ |
95 QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const; |
101 QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const; |
96 |
102 |
97 /** |
103 |
98 * addExternalItems() - for setting external image data to the model. |
|
99 */ |
|
100 void addExternalItems( GlxExternalData* externalItems ); |
|
101 |
|
102 /** |
|
103 * clearExternalItems() - for removing all external image data from the model. |
|
104 */ |
|
105 void clearExternalItems(); |
|
106 |
|
107 signals : |
104 signals : |
108 /** |
105 /** |
109 * albumTitleAvailable() - emit this signal when album title is available. |
106 * albumTitleAvailable() - emit this signal when album title is available. |
110 * @parma - album title |
107 * @parma - album title |
111 */ |
108 */ |
148 * GetFsIconItem() - To fetch the full screen size thumbnail |
145 * GetFsIconItem() - To fetch the full screen size thumbnail |
149 * @param - item index |
146 * @param - item index |
150 * @param - media list context type |
147 * @param - media list context type |
151 * @return - return the hbicon of the item |
148 * @return - return the hbicon of the item |
152 */ |
149 */ |
153 HbIcon* GetFsIconItem( int itemIndex,GlxTBContextType tbContextType )const; |
150 HbIcon* GetFsIconItem( int itemIndex, GlxTBContextType tbContextType )const; |
154 |
151 |
155 /** |
152 HbIcon gridToFullscreenIcon( HbIcon * icon, int itemIndex ) const; |
156 * GetExternalIconItem() - To fetch the grid size thumbnail of external item. |
153 |
157 * @param - item index |
154 HbIcon getFullScreenIcon( int itemIndex ) const; |
158 * @param - media list context type |
155 |
159 * @return - return the hbicon of the item |
156 QImage getFullScreenImage( int itemIndex ) const; |
160 */ |
157 |
161 HbIcon* GetExternalIconItem( int itemIndex,GlxTBContextType tbContextType )const; |
|
162 |
|
163 /** |
158 /** |
164 * setContextMode() - for setting the attribute context mode will be used mainly for |
159 * setContextMode() - for setting the attribute context mode will be used mainly for |
165 * retreiving thumbnail of different sizes. |
160 * retreiving thumbnail of different sizes. |
166 */ |
161 */ |
167 void setContextMode( GlxContextMode contextMode ); |
162 void setContextMode( GlxContextMode contextMode ); |
256 * @param - media list context type |
251 * @param - media list context type |
257 */ |
252 */ |
258 void updateItemIcon( int itemIndex, HbIcon* itemIcon, GlxTBContextType tbContextType ); |
253 void updateItemIcon( int itemIndex, HbIcon* itemIcon, GlxTBContextType tbContextType ); |
259 |
254 |
260 private: |
255 private: |
261 GlxMLWrapper* mMLWrapper; |
256 GlxMLWrapper* mMLWrapper; |
262 QCache<int, HbIcon> itemIconCache; |
257 QCache<int, HbIcon> itemIconCache; |
263 QCache<int, HbIcon> itemFsIconCache; |
258 QCache<int, HbIcon> itemFsIconCache; |
264 HbIcon* m_DefaultIcon; |
259 HbIcon* m_DefaultIcon; |
265 HbIcon* m_CorruptIcon; |
260 HbIcon* m_CorruptIcon; |
266 |
261 GlxContextMode mContextMode; |
267 GlxContextMode mContextMode; |
262 int mFocusIndex; |
268 //for external data to be populated by model |
263 int mSubState; |
269 GlxExternalData* mExternalItems; |
264 GlxDRMUtilityWrapper* mDRMUtilityWrapper; |
270 QCache<int, HbIcon> itemExternalIconCache; |
265 int mTempVisibleWindowIndex; |
271 int externalDataCount; |
266 bool thumbnailPopulatedFlag; |
272 int mFocusIndex; |
267 bool mPaintPage; |
273 int mSubState; |
|
274 GlxDRMUtilityWrapper* mDRMUtilityWrapper; |
|
275 int mTempVisibleWindowIndex; |
|
276 bool thumbnailPopulatedFlag; |
|
277 bool mPaintPage; |
|
278 }; |
268 }; |
279 |
269 |
280 |
270 |
281 #endif /* GLXMEDIAMODEL_H_ */ |
271 #endif /* GLXMEDIAMODEL_H_ */ |