|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Music Player collection album art manager. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MPCOLLECTIONALBUMARTMANAGER_H |
|
20 #define MPCOLLECTIONALBUMARTMANAGER_H |
|
21 |
|
22 #include <QObject> |
|
23 #include <QCache> |
|
24 #include <QIcon> |
|
25 #include <QList> |
|
26 |
|
27 class MpMpxCollectionData; |
|
28 class ThumbnailManager; |
|
29 |
|
30 class MpCollectionAlbumArtManager : public QObject |
|
31 { |
|
32 Q_OBJECT |
|
33 |
|
34 public: |
|
35 |
|
36 explicit MpCollectionAlbumArtManager( MpMpxCollectionData *data, QObject *parent=0 ); |
|
37 virtual ~MpCollectionAlbumArtManager(); |
|
38 |
|
39 const QIcon* albumArt( int index ); |
|
40 void cacheFirstScreen(); |
|
41 void cancel(); |
|
42 |
|
43 signals: |
|
44 |
|
45 void albumArtReady( int index ); |
|
46 |
|
47 public slots: |
|
48 |
|
49 void thumbnailReady( QPixmap pixmap, void *data, int id, int error ); |
|
50 |
|
51 private: |
|
52 |
|
53 MpMpxCollectionData *mCollectionData; |
|
54 ThumbnailManager *mThumbnailManager; |
|
55 QCache<int, QIcon> mImageCache; |
|
56 bool mCachingInProgress; |
|
57 |
|
58 QIcon *mDefaultIcon; |
|
59 |
|
60 QList<int> mRequestQueue; |
|
61 bool mPendingRequest; |
|
62 int mRequestId; |
|
63 |
|
64 }; |
|
65 |
|
66 #endif // MPCOLLECTIONALBUMARTMANAGER_H |
|
67 |