-rw-r--r-- | core/launcher/serverapp.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/launcher/serverapp.h b/core/launcher/serverapp.h index 4d9f808..916d83c 100644 --- a/core/launcher/serverapp.h +++ b/core/launcher/serverapp.h | |||
@@ -14,127 +14,129 @@ | |||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #ifndef SERVERAPP_H | 21 | #ifndef SERVERAPP_H |
22 | #define SERVERAPP_H | 22 | #define SERVERAPP_H |
23 | 23 | ||
24 | #include <qtopia/qpeapplication.h> | 24 | #include <qtopia/qpeapplication.h> |
25 | 25 | ||
26 | #include <qwidget.h> | 26 | #include <qwidget.h> |
27 | #ifdef QWS | 27 | #ifdef QWS |
28 | #include <qwindowsystem_qws.h> | 28 | #include <qwindowsystem_qws.h> |
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | #include "shutdownimpl.h" | 31 | #include "shutdownimpl.h" |
32 | 32 | ||
33 | class PowerStatus; | 33 | class PowerStatus; |
34 | class DesktopPowerAlerter; | 34 | class DesktopPowerAlerter; |
35 | 35 | ||
36 | class OpieScreenSaver; | 36 | class OpieScreenSaver; |
37 | namespace Opie { | 37 | namespace Opie { |
38 | namespace Core { | ||
38 | class ODeviceButton; | 39 | class ODeviceButton; |
39 | } | 40 | } |
41 | } | ||
40 | 42 | ||
41 | struct QCopKeyRegister { | 43 | struct QCopKeyRegister { |
42 | QCopKeyRegister(); | 44 | QCopKeyRegister(); |
43 | QCopKeyRegister( int k, const QCString&, const QCString& ); | 45 | QCopKeyRegister( int k, const QCString&, const QCString& ); |
44 | int keyCode()const; | 46 | int keyCode()const; |
45 | QCString channel()const; | 47 | QCString channel()const; |
46 | QCString message()const; | 48 | QCString message()const; |
47 | inline bool send(); | 49 | inline bool send(); |
48 | 50 | ||
49 | private: | 51 | private: |
50 | int m_keyCode; | 52 | int m_keyCode; |
51 | QCString m_channel, m_message; | 53 | QCString m_channel, m_message; |
52 | }; | 54 | }; |
53 | 55 | ||
54 | typedef QMap<int, QCopKeyRegister> KeyRegisterList; | 56 | typedef QMap<int, QCopKeyRegister> KeyRegisterList; |
55 | 57 | ||
56 | class KeyFilter : public QObject { | 58 | class KeyFilter : public QObject { |
57 | Q_OBJECT | 59 | Q_OBJECT |
58 | public: | 60 | public: |
59 | KeyFilter(QObject* parent); | 61 | KeyFilter(QObject* parent); |
60 | void registerKey( const QCopKeyRegister& ); | 62 | void registerKey( const QCopKeyRegister& ); |
61 | void unregisterKey( const QCopKeyRegister& ); | 63 | void unregisterKey( const QCopKeyRegister& ); |
62 | bool checkButtonAction( bool, int, int, int ); | 64 | bool checkButtonAction( bool, int, int, int ); |
63 | 65 | ||
64 | 66 | ||
65 | 67 | ||
66 | protected: | 68 | protected: |
67 | void timerEvent(QTimerEvent*); | 69 | void timerEvent(QTimerEvent*); |
68 | 70 | ||
69 | signals: | 71 | signals: |
70 | void launch(); | 72 | void launch(); |
71 | void power(); | 73 | void power(); |
72 | void backlight(); | 74 | void backlight(); |
73 | void symbol(); | 75 | void symbol(); |
74 | void numLockStateToggle(); | 76 | void numLockStateToggle(); |
75 | void capsLockStateToggle(); | 77 | void capsLockStateToggle(); |
76 | void activate(const Opie::ODeviceButton*,bool); | 78 | void activate(const Opie::Core::ODeviceButton*,bool); |
77 | 79 | ||
78 | 80 | ||
79 | private: | 81 | private: |
80 | bool keyRegistered( int key ); | 82 | bool keyRegistered( int key ); |
81 | int held_tid; | 83 | int held_tid; |
82 | const Opie::ODeviceButton* heldButton; | 84 | const Opie::Core::ODeviceButton* heldButton; |
83 | KeyRegisterList m_keys; | 85 | KeyRegisterList m_keys; |
84 | }; | 86 | }; |
85 | 87 | ||
86 | class ServerApplication : public QPEApplication | 88 | class ServerApplication : public QPEApplication |
87 | { | 89 | { |
88 | Q_OBJECT | 90 | Q_OBJECT |
89 | public: | 91 | public: |
90 | ServerApplication( int& argc, char **argv, Type t ); | 92 | ServerApplication( int& argc, char **argv, Type t ); |
91 | ~ServerApplication(); | 93 | ~ServerApplication(); |
92 | 94 | ||
93 | static bool doRestart; | 95 | static bool doRestart; |
94 | static bool allowRestart; | 96 | static bool allowRestart; |
95 | static bool screenLocked(); | 97 | static bool screenLocked(); |
96 | static void login(bool at_poweron); | 98 | static void login(bool at_poweron); |
97 | 99 | ||
98 | static bool isStarting(); | 100 | static bool isStarting(); |
99 | 101 | ||
100 | static void switchLCD ( bool on ); // only for togglePower in Desktop | 102 | static void switchLCD ( bool on ); // only for togglePower in Desktop |
101 | static void soundAlarm(); // only because QCop soundAlarm() is defined in QPE/TaskBar | 103 | static void soundAlarm(); // only because QCop soundAlarm() is defined in QPE/TaskBar |
102 | 104 | ||
103 | void restart(); | 105 | void restart(); |
104 | int exec(); | 106 | int exec(); |
105 | 107 | ||
106 | signals: | 108 | signals: |
107 | void menu(); | 109 | void menu(); |
108 | void home(); | 110 | void home(); |
109 | void launch(); | 111 | void launch(); |
110 | void power(); | 112 | void power(); |
111 | void backlight(); | 113 | void backlight(); |
112 | void symbol(); | 114 | void symbol(); |
113 | void numLockStateToggle(); | 115 | void numLockStateToggle(); |
114 | void capsLockStateToggle(); | 116 | void capsLockStateToggle(); |
115 | void prepareForRestart(); | 117 | void prepareForRestart(); |
116 | void activate(const Opie::ODeviceButton*,bool); | 118 | void activate(const Opie::Core::ODeviceButton*,bool); |
117 | 119 | ||
118 | public slots: | 120 | public slots: |
119 | virtual void systemMessage( const QCString& msg, const QByteArray& ); | 121 | virtual void systemMessage( const QCString& msg, const QByteArray& ); |
120 | virtual void launcherMessage( const QCString& msg, const QByteArray& ); | 122 | virtual void launcherMessage( const QCString& msg, const QByteArray& ); |
121 | void rereadVolumes(); | 123 | void rereadVolumes(); |
122 | 124 | ||
123 | protected: | 125 | protected: |
124 | bool eventFilter( QObject*, QEvent* ); | 126 | bool eventFilter( QObject*, QEvent* ); |
125 | #ifdef Q_WS_QWS | 127 | #ifdef Q_WS_QWS |
126 | bool qwsEventFilter( QWSEvent * ); | 128 | bool qwsEventFilter( QWSEvent * ); |
127 | #endif | 129 | #endif |
128 | void shutdown(); | 130 | void shutdown(); |
129 | void checkMemory(); | 131 | void checkMemory(); |
130 | bool recoverMemory(); | 132 | bool recoverMemory(); |
131 | void keyClick(int keycode, bool press, bool repeat); | 133 | void keyClick(int keycode, bool press, bool repeat); |
132 | void screenClick(bool press); | 134 | void screenClick(bool press); |
133 | 135 | ||
134 | protected slots: | 136 | protected slots: |
135 | void shutdown(ShutdownImpl::Type); | 137 | void shutdown(ShutdownImpl::Type); |
136 | void apmTimeout(); | 138 | void apmTimeout(); |
137 | void showSafeMode(); | 139 | void showSafeMode(); |
138 | void clearSafeMode(); | 140 | void clearSafeMode(); |
139 | void togglePower(); | 141 | void togglePower(); |
140 | void toggleLight(); | 142 | void toggleLight(); |