equal
deleted
inserted
replaced
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 MOBCNTICONMANAGER_H |
|
20 #define MOBCNTICONMANAGER_H |
|
21 |
|
22 #include <QObject> |
|
23 #include <QHash> |
|
24 #include <QMap> |
|
25 #include <QQueue> |
|
26 #include <QPair> |
|
27 #include <QIcon> |
|
28 #include <QTimer> |
|
29 |
|
30 class ThumbnailManager; |
|
31 |
|
32 class MobCntIconManager : public QObject |
|
33 { |
|
34 Q_OBJECT |
|
35 |
|
36 public: |
|
37 |
|
38 explicit MobCntIconManager(QObject *parent=0); |
|
39 virtual ~MobCntIconManager(); |
|
40 |
|
41 QIcon contactIcon(const QString &avatarPath, int index); |
|
42 void cancel(); |
|
43 |
|
44 signals: |
|
45 void contactIconReady(int index); |
|
46 |
|
47 public slots: |
|
48 void thumbnailReady(const QPixmap& pixmap, void *data, int id, int error); |
|
49 void thumbnailLoad(); |
|
50 void timerTimeout(); |
|
51 |
|
52 private: |
|
53 ThumbnailManager *mThumbnailManager; |
|
54 QHash<QString, QIcon> mImageCache; |
|
55 QMap<int, QString> mTnmReqMap; |
|
56 |
|
57 QQueue< QPair<QString, int> > mRequestQueue; |
|
58 int mQueueCount; |
|
59 QTimer* mTimer; |
|
60 |
|
61 }; |
|
62 |
|
63 #endif // MOBCNTICONMANAGER_H |
|
64 |
|