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 HSSELECTBACKGROUNDSTATESTATE_H |
|
19 #define HSSELECTBACKGROUNDSTATESTATE_H |
|
20 |
|
21 #include <QState> |
|
22 #include <QStringList> |
|
23 |
|
24 #include "hstest_global.h" |
|
25 #include "hswallpaperimagereader.h" |
|
26 |
|
27 HOMESCREEN_TEST_CLASS(HomeScreenStatePluginTest) |
|
28 |
|
29 class HbProgressDialog; |
|
30 class HbView; |
|
31 #ifdef Q_OS_SYMBIAN |
|
32 class HsImageFetcherClient; |
|
33 #else |
|
34 class XQAIWGetImageClient; |
|
35 #endif |
|
36 |
|
37 class HsSelectBackgroundState : public QState |
|
38 { |
|
39 Q_OBJECT |
|
40 |
|
41 public: |
|
42 HsSelectBackgroundState(QState *parent = 0); |
|
43 ~HsSelectBackgroundState(); |
|
44 |
|
45 private: |
|
46 Q_DISABLE_COPY(HsSelectBackgroundState) |
|
47 |
|
48 signals: |
|
49 void event_waitInput(); |
|
50 void handleError(); |
|
51 |
|
52 private slots: |
|
53 void action_selectWallpaper(); |
|
54 void action_disconnectImageFetcher(); |
|
55 |
|
56 void onFetchComplete(QStringList imageStringList); |
|
57 void onFetchFailed(int error); |
|
58 void onImageProcessed(); |
|
59 void onShowAnimation(); |
|
60 void onHandleError(); |
|
61 |
|
62 // for S60 API |
|
63 #ifdef Q_OS_SYMBIAN |
|
64 void fetchCompleted(const QString&); |
|
65 void fetchFailed(int, const QString&); |
|
66 #endif |
|
67 |
|
68 private: |
|
69 |
|
70 #ifdef Q_OS_SYMBIAN |
|
71 HsImageFetcherClient *mImageFetcher; |
|
72 #else |
|
73 XQAIWGetImageClient *mImageFetcher; |
|
74 #endif |
|
75 |
|
76 HbView *mSourceView; |
|
77 HsWallpaperImageReader *mPortraitWallpaperImageReader; |
|
78 HsWallpaperImageReader *mLandscapeWallpaperImageReader; |
|
79 HbProgressDialog *mProgressDialog; |
|
80 int mRunningThreadAmount; |
|
81 bool mShowAnimation; |
|
82 |
|
83 HOMESCREEN_TEST_FRIEND_CLASS(HomeScreenStatePluginTest) |
|
84 }; |
|
85 |
|
86 #endif |
|