1 /* |
|
2 * Copyright (c) 2010 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 #ifndef HSWALLPAPERIMAGEREADER_H |
|
19 #define HSWALLPAPERIMAGEREADER_H |
|
20 |
|
21 #include <QThread> |
|
22 #include <QImage> |
|
23 |
|
24 #include "hsutils_global.h" |
|
25 |
|
26 #include "hstest_global.h" |
|
27 HOMESCREEN_TEST_CLASS(t_hsUtils) |
|
28 |
|
29 class HSUTILS_EXPORT HsWallpaperImageReader : public QThread |
|
30 { |
|
31 Q_OBJECT |
|
32 |
|
33 public: |
|
34 HsWallpaperImageReader(QObject *parent = 0); |
|
35 ~HsWallpaperImageReader(); |
|
36 |
|
37 void setSourcePath(const QString &sourcePath); |
|
38 QString sourcePath() const; |
|
39 void setSourceRect(const QRect &sourceRect); |
|
40 QRect sourceRect() const; |
|
41 void setTargetRect(const QRect &targetRect); |
|
42 QRect targetRect() const; |
|
43 void setCenterTarget(bool center); |
|
44 bool centerTarget(); |
|
45 QImage processedImage() const; |
|
46 |
|
47 signals: |
|
48 void processingFinished(); |
|
49 |
|
50 protected: |
|
51 void run(); |
|
52 |
|
53 private: |
|
54 Q_DISABLE_COPY(HsWallpaperImageReader) |
|
55 |
|
56 private: |
|
57 QString mSourcePath; |
|
58 QRect mSourceRect; |
|
59 QRect mTargetRect; |
|
60 bool mCenterTarget; |
|
61 QString mKey; |
|
62 QImage mProcessedImage; |
|
63 |
|
64 HOMESCREEN_TEST_FRIEND_CLASS(t_hsUtils) |
|
65 }; |
|
66 |
|
67 #endif // HSWALLPAPERIMAGEREADER_H |
|