|
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: Default implementation of the home screen runtime. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef HSDEFAULTRUNTIME_H |
|
19 #define HSDEFAULTRUNTIME_H |
|
20 |
|
21 #include <QStateMachine> |
|
22 |
|
23 #ifndef HSDEFAULTRUNTIMEPLUGIN_UNITTEST |
|
24 #define TEST_CLASS_FWD |
|
25 #define TEST_FRIEND |
|
26 #else |
|
27 #define TEST_CLASS_FWD class DefaultRuntimePluginTest; |
|
28 #define TEST_FRIEND friend class DefaultRuntimePluginTest; |
|
29 #endif |
|
30 |
|
31 class HsContentService; |
|
32 |
|
33 TEST_CLASS_FWD |
|
34 |
|
35 class HsDefaultRuntime : public QStateMachine |
|
36 { |
|
37 Q_OBJECT |
|
38 |
|
39 public: |
|
40 HsDefaultRuntime(QObject *parent = 0); |
|
41 ~HsDefaultRuntime(); |
|
42 |
|
43 signals: |
|
44 void event_exit(); |
|
45 |
|
46 protected: |
|
47 bool eventFilter(QObject *watched, QEvent *event); |
|
48 |
|
49 private: |
|
50 Q_DISABLE_COPY(HsDefaultRuntime) |
|
51 |
|
52 void createContentServiceParts(); |
|
53 void createStates(); |
|
54 void assignServices(); |
|
55 void updatePSKeys(); |
|
56 |
|
57 private slots: |
|
58 void onIdleStateEntered(); |
|
59 void onIdleStateExited(); |
|
60 |
|
61 private: |
|
62 HsContentService *mContentService; |
|
63 |
|
64 bool mHomeScreenActive; |
|
65 bool mIdleStateActive; |
|
66 |
|
67 TEST_FRIEND |
|
68 }; |
|
69 |
|
70 #endif |