-rw-r--r-- | core/launcher/serverapp.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/launcher/serverapp.h b/core/launcher/serverapp.h index 0a3259a..fe3f24a 100644 --- a/core/launcher/serverapp.h +++ b/core/launcher/serverapp.h | |||
@@ -16,129 +16,129 @@ | |||
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 | class ODeviceButton; | 38 | class ODeviceButton; |
39 | } | 39 | } |
40 | 40 | ||
41 | struct QCopKeyRegister { | 41 | struct QCopKeyRegister { |
42 | QCopKeyRegister(); | 42 | QCopKeyRegister(); |
43 | QCopKeyRegister( int k, const QCString&, const QCString& ); | 43 | QCopKeyRegister( int k, const QCString&, const QCString& ); |
44 | int keyCode()const; | 44 | int keyCode()const; |
45 | QCString channel()const; | 45 | QCString channel()const; |
46 | QCString message()const; | 46 | QCString message()const; |
47 | inline bool send(); | 47 | inline bool send(); |
48 | 48 | ||
49 | private: | 49 | private: |
50 | int m_keyCode; | 50 | int m_keyCode; |
51 | QCString m_channel, m_message; | 51 | QCString m_channel, m_message; |
52 | }; | 52 | }; |
53 | 53 | ||
54 | typedef QMap<int, QCopKeyRegister> KeyRegisterList; | 54 | typedef QMap<int, QCopKeyRegister> KeyRegisterList; |
55 | 55 | ||
56 | class KeyFilter : public QObject { | 56 | class KeyFilter : public QObject { |
57 | Q_OBJECT | 57 | Q_OBJECT |
58 | public: | 58 | public: |
59 | KeyFilter(QObject* parent); | 59 | KeyFilter(QObject* parent); |
60 | void registerKey( const QCopKeyRegister& ); | 60 | void registerKey( const QCopKeyRegister& ); |
61 | void unregisterKey( const QCopKeyRegister& ); | 61 | void unregisterKey( const QCopKeyRegister& ); |
62 | bool checkButtonAction( bool, int, int, int ); | 62 | bool checkButtonAction( bool, int, int, int ); |
63 | 63 | ||
64 | 64 | ||
65 | 65 | ||
66 | protected: | 66 | protected: |
67 | void timerEvent(QTimerEvent*); | 67 | void timerEvent(QTimerEvent*); |
68 | 68 | ||
69 | signals: | 69 | signals: |
70 | void launch(); | 70 | void launch(); |
71 | void power(); | 71 | void power(); |
72 | void backlight(); | 72 | void backlight(); |
73 | void symbol(); | 73 | void symbol(); |
74 | void numLockStateToggle(); | 74 | void numLockStateToggle(); |
75 | void capsLockStateToggle(); | 75 | void capsLockStateToggle(); |
76 | void activate(const Opie::ODeviceButton*,bool); | 76 | void activate(const Opie::ODeviceButton*,bool); |
77 | 77 | ||
78 | 78 | ||
79 | private: | 79 | private: |
80 | inline bool keyRegistered( int key ); | 80 | bool keyRegistered( int key ); |
81 | int held_tid; | 81 | int held_tid; |
82 | const Opie::ODeviceButton* heldButton; | 82 | const Opie::ODeviceButton* heldButton; |
83 | KeyRegisterList m_keys; | 83 | KeyRegisterList m_keys; |
84 | }; | 84 | }; |
85 | 85 | ||
86 | class ServerApplication : public QPEApplication | 86 | class ServerApplication : public QPEApplication |
87 | { | 87 | { |
88 | Q_OBJECT | 88 | Q_OBJECT |
89 | public: | 89 | public: |
90 | ServerApplication( int& argc, char **argv, Type t ); | 90 | ServerApplication( int& argc, char **argv, Type t ); |
91 | ~ServerApplication(); | 91 | ~ServerApplication(); |
92 | 92 | ||
93 | static bool doRestart; | 93 | static bool doRestart; |
94 | static bool allowRestart; | 94 | static bool allowRestart; |
95 | static bool screenLocked(); | 95 | static bool screenLocked(); |
96 | static void login(bool at_poweron); | 96 | static void login(bool at_poweron); |
97 | 97 | ||
98 | static void switchLCD ( bool on ); // only for togglePower in Desktop | 98 | static void switchLCD ( bool on ); // only for togglePower in Desktop |
99 | static void soundAlarm(); // only because QCop soundAlarm() is defined in QPE/TaskBar | 99 | static void soundAlarm(); // only because QCop soundAlarm() is defined in QPE/TaskBar |
100 | 100 | ||
101 | void restart(); | 101 | void restart(); |
102 | 102 | ||
103 | signals: | 103 | signals: |
104 | void menu(); | 104 | void menu(); |
105 | void home(); | 105 | void home(); |
106 | void launch(); | 106 | void launch(); |
107 | void power(); | 107 | void power(); |
108 | void backlight(); | 108 | void backlight(); |
109 | void symbol(); | 109 | void symbol(); |
110 | void numLockStateToggle(); | 110 | void numLockStateToggle(); |
111 | void capsLockStateToggle(); | 111 | void capsLockStateToggle(); |
112 | void prepareForRestart(); | 112 | void prepareForRestart(); |
113 | void activate(const Opie::ODeviceButton*,bool); | 113 | void activate(const Opie::ODeviceButton*,bool); |
114 | 114 | ||
115 | public slots: | 115 | public slots: |
116 | virtual void systemMessage( const QCString& msg, const QByteArray& ); | 116 | virtual void systemMessage( const QCString& msg, const QByteArray& ); |
117 | virtual void launcherMessage( const QCString& msg, const QByteArray& ); | 117 | virtual void launcherMessage( const QCString& msg, const QByteArray& ); |
118 | void rereadVolumes(); | 118 | void rereadVolumes(); |
119 | 119 | ||
120 | protected: | 120 | protected: |
121 | bool eventFilter( QObject*, QEvent* ); | 121 | bool eventFilter( QObject*, QEvent* ); |
122 | #ifdef Q_WS_QWS | 122 | #ifdef Q_WS_QWS |
123 | bool qwsEventFilter( QWSEvent * ); | 123 | bool qwsEventFilter( QWSEvent * ); |
124 | #endif | 124 | #endif |
125 | void shutdown(); | 125 | void shutdown(); |
126 | void checkMemory(); | 126 | void checkMemory(); |
127 | bool recoverMemory(); | 127 | bool recoverMemory(); |
128 | void keyClick(int keycode, bool press, bool repeat); | 128 | void keyClick(int keycode, bool press, bool repeat); |
129 | void screenClick(bool press); | 129 | void screenClick(bool press); |
130 | 130 | ||
131 | protected slots: | 131 | protected slots: |
132 | void shutdown(ShutdownImpl::Type); | 132 | void shutdown(ShutdownImpl::Type); |
133 | void apmTimeout(); | 133 | void apmTimeout(); |
134 | void showSafeMode(); | 134 | void showSafeMode(); |
135 | void clearSafeMode(); | 135 | void clearSafeMode(); |
136 | void togglePower(); | 136 | void togglePower(); |
137 | void toggleLight(); | 137 | void toggleLight(); |
138 | 138 | ||
139 | private: | 139 | private: |
140 | static ServerApplication *me (); | 140 | static ServerApplication *me (); |
141 | void reloadPowerWarnSettings(); | 141 | void reloadPowerWarnSettings(); |
142 | KeyFilter *kf; | 142 | KeyFilter *kf; |
143 | 143 | ||
144 | 144 | ||