|
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 |
|
18 #include <qsize.h> |
|
19 #include "thumbnailmanager_qt.h" |
|
20 #include "thumbnailmanager_p_qt.h" |
|
21 |
|
22 EXPORT_C ThumbnailManager::ThumbnailManager( QObject* parentPtr ) : |
|
23 QObject( parentPtr ), |
|
24 d( new ThumbnailManagerPrivate() ) |
|
25 { |
|
26 QObject::connect( d, SIGNAL( thumbnailReady( QPixmap , void * , int , int ) ), |
|
27 this, SIGNAL( thumbnailReady( QPixmap , void * , int , int ) ) ); |
|
28 } |
|
29 |
|
30 |
|
31 EXPORT_C ThumbnailManager::~ThumbnailManager() |
|
32 { |
|
33 QObject::disconnect( d, SIGNAL( thumbnailReady( QPixmap , void * , int , int ) ), |
|
34 this, SIGNAL( thumbnailReady( QPixmap , void * , int , int ) ) ); |
|
35 if( NULL != d ){ |
|
36 delete d; |
|
37 } |
|
38 } |
|
39 |
|
40 EXPORT_C ThumbnailManager::QualityPreference ThumbnailManager::qualityPreference() const |
|
41 { |
|
42 return d->qualityPreference(); |
|
43 } |
|
44 |
|
45 EXPORT_C bool ThumbnailManager::setQualityPreference( QualityPreference |
|
46 qualityPreference ) |
|
47 { |
|
48 return d->setQualityPreference( qualityPreference ); |
|
49 } |
|
50 |
|
51 EXPORT_C QSize ThumbnailManager::thumbnailSize() const |
|
52 { |
|
53 return d->thumbnailSize(); |
|
54 } |
|
55 |
|
56 EXPORT_C bool ThumbnailManager::setThumbnailSize( const QSize& thumbnailSize ) |
|
57 { |
|
58 return d->setThumbnailSize( thumbnailSize ); |
|
59 } |
|
60 |
|
61 EXPORT_C bool ThumbnailManager::setThumbnailSize( ThumbnailSize thumbnailSize ) |
|
62 { |
|
63 return d->setThumbnailSize( thumbnailSize ); |
|
64 } |
|
65 |
|
66 EXPORT_C ThumbnailManager::ThumbnailMode ThumbnailManager::mode() const |
|
67 { |
|
68 return d->mode(); |
|
69 } |
|
70 |
|
71 EXPORT_C bool ThumbnailManager::setMode( ThumbnailMode mode ) |
|
72 { |
|
73 return d->setMode( mode ); |
|
74 } |
|
75 |
|
76 EXPORT_C int ThumbnailManager::getThumbnail( const QString& fileName, void * clientData, |
|
77 int priority ) |
|
78 { |
|
79 return d->getThumbnail( fileName, clientData, priority ); |
|
80 } |
|
81 |
|
82 EXPORT_C int ThumbnailManager::getThumbnail( unsigned long int thumbnailId, void * clientData, |
|
83 int priority ) |
|
84 { |
|
85 return d->getThumbnail( thumbnailId, clientData, priority ); |
|
86 } |
|
87 |
|
88 EXPORT_C int ThumbnailManager::setThumbnail( const QPixmap& source, const QString& filename, |
|
89 void * clientData , int priority ) |
|
90 { |
|
91 return d->setThumbnail( source, filename, clientData, priority ); |
|
92 } |
|
93 |
|
94 EXPORT_C void ThumbnailManager::deleteThumbnails( const QString& fileName ) |
|
95 { |
|
96 d->deleteThumbnails( fileName ); |
|
97 } |
|
98 |
|
99 EXPORT_C void ThumbnailManager::deleteThumbnails( unsigned long int thumbnailId ) |
|
100 { |
|
101 d->deleteThumbnails( thumbnailId ); |
|
102 } |
|
103 |
|
104 EXPORT_C bool ThumbnailManager::cancelRequest( int id ) |
|
105 { |
|
106 return d->cancelRequest( id ); |
|
107 } |
|
108 |
|
109 EXPORT_C bool ThumbnailManager::changePriority( int id, int newPriority ) |
|
110 { |
|
111 return d->changePriority( id, newPriority ); |
|
112 } |
|
113 |