-rw-r--r-- | core/launcher/desktop.h | 131 |
1 files changed, 66 insertions, 65 deletions
diff --git a/core/launcher/desktop.h b/core/launcher/desktop.h index 09ffe1c..5de85f4 100644 --- a/core/launcher/desktop.h +++ b/core/launcher/desktop.h | |||
@@ -1,146 +1,147 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
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 __DESKTOP_H__ | 21 | #ifndef __DESKTOP_H__ |
22 | #define __DESKTOP_H__ | 22 | #define __DESKTOP_H__ |
23 | 23 | ||
24 | 24 | ||
25 | #include "shutdownimpl.h" | 25 | #include "shutdownimpl.h" |
26 | 26 | ||
27 | #include <qpe/qpeapplication.h> | 27 | #include <qpe/qpeapplication.h> |
28 | 28 | ||
29 | #include <qwidget.h> | 29 | #include <qwidget.h> |
30 | #include <qdatetime.h> | 30 | #include <qdatetime.h> |
31 | 31 | ||
32 | class Background; | 32 | class Background; |
33 | class Launcher; | 33 | class Launcher; |
34 | class TaskBar; | 34 | class TaskBar; |
35 | class PowerStatus; | 35 | class PowerStatus; |
36 | class QCopBridge; | 36 | class QCopBridge; |
37 | class TransferServer; | 37 | class TransferServer; |
38 | class DesktopPowerAlerter; | 38 | class DesktopPowerAlerter; |
39 | class PackageSlave; | 39 | class PackageSlave; |
40 | class QPEScreenSaver; | 40 | class QPEScreenSaver; |
41 | 41 | ||
42 | class DesktopApplication : public QPEApplication | 42 | class DesktopApplication : public QPEApplication |
43 | { | 43 | { |
44 | Q_OBJECT | 44 | Q_OBJECT |
45 | public: | 45 | public: |
46 | DesktopApplication( int& argc, char **argv, Type t ); | 46 | DesktopApplication( int& argc, char **argv, Type t ); |
47 | ~DesktopApplication(); | 47 | ~DesktopApplication(); |
48 | 48 | ||
49 | static void switchLCD ( bool on ); // only for togglePower in Desktop | 49 | static void switchLCD ( bool on ); // only for togglePower in Desktop |
50 | 50 | ||
51 | signals: | 51 | signals: |
52 | void home(); | 52 | void menu(); |
53 | void datebook(); | 53 | void home(); |
54 | void contacts(); | 54 | void datebook(); |
55 | void launch(); | 55 | void contacts(); |
56 | void email(); | 56 | void launch(); |
57 | void backlight(); | 57 | void email(); |
58 | void power(); | 58 | void backlight(); |
59 | void symbol(); | 59 | void power(); |
60 | void numLockStateToggle(); | 60 | void symbol(); |
61 | void capsLockStateToggle(); | 61 | void numLockStateToggle(); |
62 | void prepareForRestart(); | 62 | void capsLockStateToggle(); |
63 | void prepareForRestart(); | ||
63 | 64 | ||
64 | protected: | 65 | protected: |
65 | #ifdef Q_WS_QWS | 66 | #ifdef Q_WS_QWS |
66 | 67 | ||
67 | bool qwsEventFilter( QWSEvent * ); | 68 | bool qwsEventFilter( QWSEvent * ); |
68 | #endif | 69 | #endif |
69 | 70 | ||
70 | void shutdown(); | 71 | void shutdown(); |
71 | void restart(); | 72 | void restart(); |
72 | 73 | ||
73 | public slots: | 74 | public slots: |
74 | virtual void desktopMessage ( const QCString &msg, const QByteArray &data ); | 75 | virtual void desktopMessage ( const QCString &msg, const QByteArray &data ); |
75 | virtual void systemMessage ( const QCString &msg, const QByteArray &data ); | 76 | virtual void systemMessage ( const QCString &msg, const QByteArray &data ); |
76 | 77 | ||
77 | protected slots: | 78 | protected slots: |
78 | void shutdown( ShutdownImpl::Type ); | 79 | void shutdown( ShutdownImpl::Type ); |
79 | void psTimeout(); | 80 | void psTimeout(); |
80 | void sendCard(); | 81 | void sendCard(); |
81 | private: | 82 | private: |
82 | DesktopPowerAlerter *pa; | 83 | DesktopPowerAlerter *pa; |
83 | PowerStatus *ps; | 84 | PowerStatus *ps; |
84 | QTimer *cardSendTimer; | 85 | QTimer *cardSendTimer; |
85 | QCopChannel *channel; | 86 | QCopChannel *channel; |
86 | QPEScreenSaver *m_screensaver; | 87 | QPEScreenSaver *m_screensaver; |
87 | }; | 88 | }; |
88 | 89 | ||
89 | 90 | ||
90 | class Desktop : public QWidget | 91 | class Desktop : public QWidget |
91 | { | 92 | { |
92 | Q_OBJECT | 93 | Q_OBJECT |
93 | public: | 94 | public: |
94 | Desktop(); | 95 | Desktop(); |
95 | ~Desktop(); | 96 | ~Desktop(); |
96 | 97 | ||
97 | static bool screenLocked(); | 98 | static bool screenLocked(); |
98 | 99 | ||
99 | void show(); | 100 | void show(); |
100 | void checkMemory(); | 101 | void checkMemory(); |
101 | 102 | ||
102 | void keyClick(); | 103 | void keyClick(); |
103 | void screenClick(); | 104 | void screenClick(); |
104 | static void soundAlarm(); | 105 | static void soundAlarm(); |
105 | 106 | ||
106 | public slots: | 107 | public slots: |
107 | void raiseDatebook(); | 108 | void raiseDatebook(); |
108 | void raiseContacts(); | 109 | void raiseContacts(); |
109 | void raiseMenu(); | 110 | void raiseMenu(); |
110 | void raiseLauncher(); | 111 | void raiseLauncher(); |
111 | void raiseEmail(); | 112 | void raiseEmail(); |
112 | void execAutoStart(); | 113 | void execAutoStart(); |
113 | void togglePower(); | 114 | void togglePower(); |
114 | void toggleLight(); | 115 | void toggleLight(); |
115 | void toggleNumLockState(); | 116 | void toggleNumLockState(); |
116 | void toggleCapsLockState(); | 117 | void toggleCapsLockState(); |
117 | void toggleSymbolInput(); | 118 | void toggleSymbolInput(); |
118 | void terminateServers(); | 119 | void terminateServers(); |
119 | void rereadVolumes(); | 120 | void rereadVolumes(); |
120 | 121 | ||
121 | void home ( ); | 122 | void home ( ); |
122 | 123 | ||
123 | protected: | 124 | protected: |
124 | void executeOrModify( const QString& appLnkFile ); | 125 | void executeOrModify( const QString& appLnkFile ); |
125 | void styleChange( QStyle & ); | 126 | void styleChange( QStyle & ); |
126 | void timerEvent( QTimerEvent *e ); | 127 | void timerEvent( QTimerEvent *e ); |
127 | 128 | ||
128 | QWidget *bg; | 129 | QWidget *bg; |
129 | Launcher *launcher; | 130 | Launcher *launcher; |
130 | TaskBar *tb; | 131 | TaskBar *tb; |
131 | 132 | ||
132 | private: | 133 | private: |
133 | void startTransferServer(); | 134 | void startTransferServer(); |
134 | bool recoverMemory(); | 135 | bool recoverMemory(); |
135 | 136 | ||
136 | QCopBridge *qcopBridge; | 137 | QCopBridge *qcopBridge; |
137 | TransferServer *transferServer; | 138 | TransferServer *transferServer; |
138 | PackageSlave *packageSlave; | 139 | PackageSlave *packageSlave; |
139 | 140 | ||
140 | QDateTime suspendTime; | 141 | QDateTime suspendTime; |
141 | bool keyclick, touchclick, alarmsound; | 142 | bool keyclick, touchclick, alarmsound; |
142 | }; | 143 | }; |
143 | 144 | ||
144 | 145 | ||
145 | #endif // __DESKTOP_H__ | 146 | #endif // __DESKTOP_H__ |
146 | 147 | ||