|
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 CXUIAPPLICATIONFRAMEWORKMONITOR_H |
|
18 #define CXUIAPPLICATIONFRAMEWORKMONITOR_H |
|
19 |
|
20 #include <QObject> |
|
21 |
|
22 class CxeSettings; |
|
23 class CxuiApplication; |
|
24 class CxuiApplicationFrameworkMonitorPrivate; |
|
25 |
|
26 /*! |
|
27 * Application Framework Monitor. |
|
28 */ |
|
29 class CxuiApplicationFrameworkMonitor : public QObject |
|
30 { |
|
31 Q_OBJECT |
|
32 Q_ENUMS(ForegroundState) |
|
33 |
|
34 public: |
|
35 /*! |
|
36 * Foreground state enumeration. |
|
37 */ |
|
38 enum ForegroundState |
|
39 { |
|
40 /*! Note or dialog partially owns foreground */ |
|
41 ForegroundPartiallyLost, |
|
42 /*! Other application owns foreground */ |
|
43 ForegroundFullyLost, |
|
44 /*! This application owns foreground */ |
|
45 ForegroundOwned |
|
46 }; |
|
47 |
|
48 public: |
|
49 CxuiApplicationFrameworkMonitor(CxuiApplication &application, CxeSettings& settings); |
|
50 virtual ~CxuiApplicationFrameworkMonitor(); |
|
51 |
|
52 public: |
|
53 ForegroundState foregroundState() const; |
|
54 |
|
55 signals: |
|
56 /*! |
|
57 * Signal that foreground state has changed. |
|
58 * @param t New foreground state. |
|
59 */ |
|
60 void foregroundStateChanged(CxuiApplicationFrameworkMonitor::ForegroundState t); |
|
61 |
|
62 /*! |
|
63 * Signal battery being empty. Device is ecpected to power down at any moment. |
|
64 */ |
|
65 void batteryEmpty(); |
|
66 |
|
67 private: |
|
68 CxuiApplicationFrameworkMonitorPrivate* p; |
|
69 }; |
|
70 |
|
71 #endif // CXUIAPPLICATIONFRAMEWORKMONITOR_H |