|
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: |
|
15 * |
|
16 */ |
|
17 #ifndef CXETHUMBNAILMANAGERSYMBIAN_H_ |
|
18 #define CXETHUMBNAILMANAGERSYMBIAN_H_ |
|
19 |
|
20 #include <QHash> |
|
21 #include <QObject> |
|
22 #include <QString> |
|
23 #include <QPixmap> |
|
24 |
|
25 // forward declaration |
|
26 class ThumbnailManager; |
|
27 |
|
28 |
|
29 /*! |
|
30 * Class handles thumbnail creation for both still and video. It uses Thumbnail manager |
|
31 * component for creating the thumb nails for the given snapshot and the file name. |
|
32 */ |
|
33 class CxeThumbnailManagerSymbian : public QObject |
|
34 { |
|
35 Q_OBJECT |
|
36 |
|
37 public: |
|
38 |
|
39 CxeThumbnailManagerSymbian(); |
|
40 ~CxeThumbnailManagerSymbian(); |
|
41 |
|
42 public slots: |
|
43 |
|
44 /** |
|
45 * Creates from given thumbnail. |
|
46 */ |
|
47 virtual void createThumbnail(const QString& filename, QPixmap thumbnail); |
|
48 |
|
49 /** |
|
50 * Cancels thumbnail creation. |
|
51 */ |
|
52 virtual void cancelThumbnail(const QString& filename); |
|
53 |
|
54 signals: |
|
55 |
|
56 /** |
|
57 * Informs clients about thumbnail ready event |
|
58 */ |
|
59 void thumbnailReady(QPixmap thumbnail, int error); |
|
60 |
|
61 private slots: |
|
62 |
|
63 /** |
|
64 * slot that gets called when thumbnail manager has created a thumbnail |
|
65 */ |
|
66 void thumbnailReady(QPixmap thumbnail, void * data, int id, int error); |
|
67 |
|
68 private: |
|
69 ThumbnailManager* mThumbnailManager; |
|
70 // file name, thumbnail id hash table |
|
71 QHash<QString, int> mThumbnailRequests; |
|
72 }; |
|
73 |
|
74 #endif /* CXETHUMBNAILMANAGERSYMBIAN_H_ */ |