19 |
19 |
20 #include <QObject> |
20 #include <QObject> |
21 #include <QVariant> |
21 #include <QVariant> |
22 #include "cxuiapplicationframeworkmonitor.h" |
22 #include "cxuiapplicationframeworkmonitor.h" |
23 |
23 |
|
24 |
24 class CxeSettings; |
25 class CxeSettings; |
25 class CxuiApplication; |
26 class CxuiApplication; |
26 #ifdef Q_OS_SYMBIAN |
27 #ifdef Q_OS_SYMBIAN |
27 class RWsSession; |
28 class RWsSession; |
28 class RWindowGroup; |
29 class RWindowGroup; |
29 class QString; |
30 class QString; |
30 class QSymbianEvent; |
31 class QSymbianEvent; |
|
32 class CxuiEventLog; |
31 #endif // Q_OS_SYMBIAN |
33 #endif // Q_OS_SYMBIAN |
32 |
34 |
33 |
35 |
34 class CxuiApplicationFrameworkMonitorPrivate : public QObject |
36 class CxuiApplicationFrameworkMonitorPrivate : public QObject |
35 { |
37 { |
36 Q_OBJECT |
38 Q_OBJECT |
37 |
39 |
38 public: |
40 private: |
39 CxuiApplicationFrameworkMonitorPrivate(CxuiApplication &application, CxeSettings& settings); |
41 CxuiApplicationFrameworkMonitorPrivate(CxuiApplicationFrameworkMonitor *parent, |
|
42 CxuiApplication &application, |
|
43 CxeSettings &settings); |
40 virtual ~CxuiApplicationFrameworkMonitorPrivate(); |
44 virtual ~CxuiApplicationFrameworkMonitorPrivate(); |
41 |
45 |
42 public: |
|
43 CxuiApplicationFrameworkMonitor::ForegroundState foregroundState() const; |
46 CxuiApplicationFrameworkMonitor::ForegroundState foregroundState() const; |
44 |
47 bool isUsbMassMemoryModeActive() const; |
45 signals: |
|
46 void foregroundStateChanged(CxuiApplicationFrameworkMonitor::ForegroundState t); |
|
47 void batteryEmpty(); |
|
48 |
48 |
49 #ifdef Q_OS_SYMBIAN |
49 #ifdef Q_OS_SYMBIAN |
50 private slots: |
50 private slots: |
51 void handleEvent(const QSymbianEvent *event); |
51 void handleEvent(const QSymbianEvent *event); |
52 void handlePropertyEvent(long int uid, unsigned long int key, QVariant value); |
52 void handlePropertyEvent(long int uid, unsigned long int key, QVariant value); |
53 |
53 |
54 private: |
54 private: |
55 void init(); |
55 void init(); |
56 bool handleWindowServerEvent(const QSymbianEvent *event); |
56 void handleWindowServerEvent(const QSymbianEvent *event); |
|
57 void handleUsbPropertyEvent(unsigned long int key, QVariant value); |
57 void setState(CxuiApplicationFrameworkMonitor::ForegroundState state); |
58 void setState(CxuiApplicationFrameworkMonitor::ForegroundState state); |
58 CxuiApplicationFrameworkMonitor::ForegroundState getCurrentState(); |
59 CxuiApplicationFrameworkMonitor::ForegroundState getCurrentState(); |
59 unsigned int focusedApplicationUid(); |
60 unsigned int focusedApplicationUid(); |
60 #endif // Q_OS_SYMBIAN |
61 #endif // Q_OS_SYMBIAN |
61 |
62 |
62 |
|
63 private: |
63 private: |
|
64 CxuiApplicationFrameworkMonitor *q; |
64 CxuiApplication &mApplication; |
65 CxuiApplication &mApplication; |
65 CxeSettings& mSettings; |
66 CxeSettings &mSettings; |
66 #ifdef Q_OS_SYMBIAN |
67 #ifdef Q_OS_SYMBIAN |
67 RWsSession &mWsSession; |
68 RWsSession &mWsSession; |
68 RWindowGroup &mWindowGroup; |
69 RWindowGroup &mWindowGroup; |
69 int mWindowGroupId; |
70 int mWindowGroupId; |
70 QString mWindowGroupName; |
71 QString mWindowGroupName; |
|
72 |
71 int mKeyLockState; |
73 int mKeyLockState; |
72 int mBatteryStatus; |
74 int mBatteryStatus; |
|
75 int mUsbPersonality; |
|
76 |
|
77 CxuiEventLog *mEventLog; |
73 #endif // Q_OS_SYMBIAN |
78 #endif // Q_OS_SYMBIAN |
|
79 |
74 CxuiApplicationFrameworkMonitor::ForegroundState mState; |
80 CxuiApplicationFrameworkMonitor::ForegroundState mState; |
|
81 |
|
82 friend class CxuiApplicationFrameworkMonitor; |
75 }; |
83 }; |
76 |
84 |
77 #endif // CXUIAPPLICATIONFRAMEWORKMONITORPRIVATE_H |
85 #endif // CXUIAPPLICATIONFRAMEWORKMONITORPRIVATE_H |