videocollection/videocollectionwrapper/tsrc/testvideomodel/stub/src/videolistdatamodel_p.cpp
equal
deleted
inserted
replaced
62 /** |
62 /** |
63 * init failure flag |
63 * init failure flag |
64 */ |
64 */ |
65 bool VideoListDataModelPrivate::mFailInit = false; |
65 bool VideoListDataModelPrivate::mFailInit = false; |
66 |
66 |
|
67 bool VideoListDataModelPrivate::mOverrideVideoCount = false; |
|
68 quint32 VideoListDataModelPrivate::mVideoCount = 0; |
67 |
69 |
68 bool VideoListDataModelPrivate::mOverrideSize = false; |
70 bool VideoListDataModelPrivate::mOverrideSize = false; |
69 quint32 VideoListDataModelPrivate::mSize = 0; |
71 quint32 VideoListDataModelPrivate::mSize = 0; |
70 |
72 |
71 bool VideoListDataModelPrivate::mOverrideDuration = false; |
73 bool VideoListDataModelPrivate::mOverrideDuration = false; |
72 quint32 VideoListDataModelPrivate::mDuration = 0; |
74 quint32 VideoListDataModelPrivate::mDuration = 0; |
73 |
75 |
74 int VideoListDataModelPrivate::mGetVideoCountFail = -1; |
76 int VideoListDataModelPrivate::mGetVideoCountFail = -1; |
75 |
77 |
76 bool VideoListDataModelPrivate::mBelongsToAlbum = false; |
78 bool VideoListDataModelPrivate::mBelongsToAlbum = false; |
|
79 |
|
80 int VideoListDataModelPrivate::mRemoveFrAlbumReturn = -1; |
77 |
81 |
78 // ----------------------------------------------------------------------------- |
82 // ----------------------------------------------------------------------------- |
79 // CVideoListData |
83 // CVideoListData |
80 // ----------------------------------------------------------------------------- |
84 // ----------------------------------------------------------------------------- |
81 // |
85 // |
171 |
175 |
172 return &mIcon; |
176 return &mIcon; |
173 } |
177 } |
174 |
178 |
175 // ----------------------------------------------------------------------------- |
179 // ----------------------------------------------------------------------------- |
|
180 // getVideoThumbnailFromIndex |
|
181 // ----------------------------------------------------------------------------- |
|
182 // |
|
183 quint32 VideoListDataModelPrivate::getCategoryVideoCountFromIndex( int index ) const |
|
184 { |
|
185 if(mOverrideVideoCount) |
|
186 { |
|
187 return mVideoCount; |
|
188 } |
|
189 |
|
190 quint32 count(0); |
|
191 CMPXMedia *media = getMediaFromIndex(index); |
|
192 if( media && media->IsSupported( KVcxMediaMyVideosCategoryItemCount ) ) |
|
193 { |
|
194 count = *media->Value<TUint32>( KVcxMediaMyVideosCategoryItemCount ); |
|
195 } |
|
196 return count; |
|
197 } |
|
198 |
|
199 // ----------------------------------------------------------------------------- |
176 // getVideoSizeFromIndex |
200 // getVideoSizeFromIndex |
177 // ----------------------------------------------------------------------------- |
201 // ----------------------------------------------------------------------------- |
178 // |
202 // |
179 quint32 VideoListDataModelPrivate::getVideoSizeFromIndex( int index ) const |
203 quint32 VideoListDataModelPrivate::getVideoSizeFromIndex( int index ) const |
180 { |
204 { |
181 if(mOverrideSize) |
205 if(mOverrideSize) |
182 { |
206 { |
183 return mSize; |
207 return mSize; |
184 } |
208 } |
185 quint32 size(0); |
209 quint32 size(0); |
186 CMPXMedia *media = getMediaFromIndex(index); |
210 CMPXMedia *media = getMediaFromIndex(index); |
187 if(media && media->IsSupported( KMPXMediaGeneralSize )) |
211 if(media && media->IsSupported( KMPXMediaGeneralSize )) |
188 { |
212 { |
189 size = *( media->Value<quint32>( KMPXMediaGeneralSize ) ); // In bytes |
213 size = *( media->Value<quint32>( KMPXMediaGeneralSize ) ); // In bytes |
283 void VideoListDataModelPrivate::setAlbumInUse(TMPXItemId albumId) |
307 void VideoListDataModelPrivate::setAlbumInUse(TMPXItemId albumId) |
284 { |
308 { |
285 mCurrentAlbum = albumId; |
309 mCurrentAlbum = albumId; |
286 } |
310 } |
287 |
311 |
|
312 // ----------------------------------------------------------------------------- |
|
313 // removeItemsFromAlbum |
|
314 // ----------------------------------------------------------------------------- |
|
315 // |
|
316 int VideoListDataModelPrivate::removeItemsFromAlbum(TMPXItemId &albumId, const QList<TMPXItemId> &ids) |
|
317 { |
|
318 Q_UNUSED(albumId); |
|
319 Q_UNUSED(ids); |
|
320 return mRemoveFrAlbumReturn; |
|
321 } |
288 |
322 |
289 // ----------------------------------------------------------------------------- |
323 // ----------------------------------------------------------------------------- |
290 // getVideoStatusFromIndex |
324 // getVideoStatusFromIndex |
291 // ----------------------------------------------------------------------------- |
325 // ----------------------------------------------------------------------------- |
292 // |
326 // |