-rw-r--r-- | core/launcher/desktop.h | 129 |
1 files changed, 129 insertions, 0 deletions
diff --git a/core/launcher/desktop.h b/core/launcher/desktop.h new file mode 100644 index 0000000..dfdbeab --- a/dev/null +++ b/core/launcher/desktop.h | |||
@@ -0,0 +1,129 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Qtopia Environment. | ||
5 | ** | ||
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 | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
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. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | |||
21 | #ifndef __DESKTOP_H__ | ||
22 | #define __DESKTOP_H__ | ||
23 | |||
24 | |||
25 | #include "shutdownimpl.h" | ||
26 | |||
27 | #include <qpe/qpeapplication.h> | ||
28 | |||
29 | #include <qwidget.h> | ||
30 | |||
31 | class Background; | ||
32 | class Launcher; | ||
33 | class TaskBar; | ||
34 | class PowerStatus; | ||
35 | class QCopBridge; | ||
36 | class TransferServer; | ||
37 | class DesktopPowerAlerter; | ||
38 | class PackageSlave; | ||
39 | |||
40 | class DesktopApplication : public QPEApplication | ||
41 | { | ||
42 | Q_OBJECT | ||
43 | public: | ||
44 | DesktopApplication( int& argc, char **argv, Type t ); | ||
45 | ~DesktopApplication(); | ||
46 | signals: | ||
47 | void home(); | ||
48 | void datebook(); | ||
49 | void contacts(); | ||
50 | void launch(); | ||
51 | void email(); | ||
52 | void backlight(); | ||
53 | void power(); | ||
54 | void symbol(); | ||
55 | void numLockStateToggle(); | ||
56 | void capsLockStateToggle(); | ||
57 | void prepareForRestart(); | ||
58 | |||
59 | protected: | ||
60 | #ifdef Q_WS_QWS | ||
61 | bool qwsEventFilter( QWSEvent * ); | ||
62 | #endif | ||
63 | void shutdown(); | ||
64 | void restart(); | ||
65 | |||
66 | protected slots: | ||
67 | void shutdown(ShutdownImpl::Type); | ||
68 | void psTimeout(); | ||
69 | void sendCard(); | ||
70 | private: | ||
71 | DesktopPowerAlerter *pa; | ||
72 | PowerStatus *ps; | ||
73 | QTimer *cardSendTimer; | ||
74 | }; | ||
75 | |||
76 | |||
77 | class Desktop : public QWidget { | ||
78 | Q_OBJECT | ||
79 | public: | ||
80 | Desktop(); | ||
81 | ~Desktop(); | ||
82 | |||
83 | static bool screenLocked(); | ||
84 | |||
85 | void show(); | ||
86 | void checkMemory(); | ||
87 | |||
88 | void keyClick(); | ||
89 | void screenClick(); | ||
90 | static void soundAlarm(); | ||
91 | |||
92 | public slots: | ||
93 | void raiseDatebook(); | ||
94 | void raiseContacts(); | ||
95 | void raiseMenu(); | ||
96 | void raiseLauncher(); | ||
97 | void raiseEmail(); | ||
98 | void togglePower(); | ||
99 | void toggleLight(); | ||
100 | void toggleNumLockState(); | ||
101 | void toggleCapsLockState(); | ||
102 | void toggleSymbolInput(); | ||
103 | void terminateServers(); | ||
104 | void rereadVolumes(); | ||
105 | |||
106 | protected: | ||
107 | void executeOrModify(const QString& appLnkFile); | ||
108 | void styleChange( QStyle & ); | ||
109 | void timerEvent( QTimerEvent *e ); | ||
110 | bool eventFilter( QObject *, QEvent * ); | ||
111 | |||
112 | QWidget *bg; | ||
113 | Launcher *launcher; | ||
114 | TaskBar *tb; | ||
115 | |||
116 | private: | ||
117 | void startTransferServer(); | ||
118 | bool recoverMemory(); | ||
119 | |||
120 | QCopBridge *qcopBridge; | ||
121 | TransferServer *transferServer; | ||
122 | PackageSlave *packageSlave; | ||
123 | |||
124 | bool keyclick,touchclick; | ||
125 | }; | ||
126 | |||
127 | |||
128 | #endif // __DESKTOP_H__ | ||
129 | |||