-rw-r--r-- | core/launcher/desktop.h | 157 |
1 files changed, 0 insertions, 157 deletions
diff --git a/core/launcher/desktop.h b/core/launcher/desktop.h deleted file mode 100644 index 86d8aa8..0000000 --- a/core/launcher/desktop.h +++ b/dev/null | |||
@@ -1,157 +0,0 @@ | |||
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 | #include <opie/odevicebutton.h> | ||
29 | |||
30 | #include <qwidget.h> | ||
31 | #include <qdatetime.h> | ||
32 | |||
33 | class Background; | ||
34 | class Launcher; | ||
35 | class TaskBar; | ||
36 | class PowerStatus; | ||
37 | class QCopBridge; | ||
38 | class TransferServer; | ||
39 | class DesktopPowerAlerter; | ||
40 | class PackageSlave; | ||
41 | class OpieScreenSaver; | ||
42 | |||
43 | class DesktopApplication : public QPEApplication | ||
44 | { | ||
45 | Q_OBJECT | ||
46 | public: | ||
47 | DesktopApplication( int& argc, char **argv, Type t ); | ||
48 | ~DesktopApplication(); | ||
49 | |||
50 | static void switchLCD ( bool on ); // only for togglePower in Desktop | ||
51 | |||
52 | static void soundAlarm(); // only because QCop soundAlarm() is defined in QPE/TaskBar | ||
53 | |||
54 | signals: | ||
55 | void menu(); | ||
56 | void home(); | ||
57 | void launch(); | ||
58 | void backlight(); | ||
59 | void power(); | ||
60 | void symbol(); | ||
61 | void numLockStateToggle(); | ||
62 | void capsLockStateToggle(); | ||
63 | void prepareForRestart(); | ||
64 | |||
65 | protected: | ||
66 | #ifdef Q_WS_QWS | ||
67 | |||
68 | bool qwsEventFilter( QWSEvent * ); | ||
69 | #endif | ||
70 | |||
71 | void shutdown(); | ||
72 | void restart(); | ||
73 | |||
74 | public slots: | ||
75 | virtual void systemMessage ( const QCString &msg, const QByteArray &data ); | ||
76 | virtual void launcherMessage ( const QCString &msg, const QByteArray &data ); | ||
77 | void rereadVolumes(); | ||
78 | |||
79 | protected slots: | ||
80 | void shutdown ( ShutdownImpl::Type ); | ||
81 | void apmTimeout ( ); | ||
82 | void sendHeldAction ( ); | ||
83 | |||
84 | protected: | ||
85 | virtual bool eventFilter ( QObject *o, QEvent *e ); | ||
86 | bool checkButtonAction ( const Opie::ODeviceButton *db, int keycode, bool press, bool autoRepeat ); | ||
87 | |||
88 | private: | ||
89 | static DesktopApplication *me ( ); | ||
90 | |||
91 | private: | ||
92 | void reloadPowerWarnSettings(); | ||
93 | DesktopPowerAlerter *pa; | ||
94 | PowerStatus *m_ps, *m_ps_last; | ||
95 | QTimer *cardSendTimer; | ||
96 | QCopChannel *channel; | ||
97 | OpieScreenSaver *m_screensaver; | ||
98 | QTimer * m_apm_timer; | ||
99 | int m_powerVeryLow; | ||
100 | int m_powerCritical; | ||
101 | int m_currentPowerLevel; | ||
102 | |||
103 | const Opie::ODeviceButton *m_last_button; | ||
104 | QTimer *m_button_timer; | ||
105 | |||
106 | bool m_keyclick_sound : 1; | ||
107 | bool m_screentap_sound : 1; | ||
108 | bool m_alarm_sound : 1; | ||
109 | }; | ||
110 | |||
111 | |||
112 | class Desktop : public QWidget | ||
113 | { | ||
114 | Q_OBJECT | ||
115 | public: | ||
116 | Desktop(); | ||
117 | ~Desktop(); | ||
118 | |||
119 | static bool screenLocked(); | ||
120 | |||
121 | void show(); | ||
122 | void checkMemory(); | ||
123 | |||
124 | public slots: | ||
125 | void execAutoStart(); | ||
126 | void togglePower(); | ||
127 | void toggleLight(); | ||
128 | void toggleNumLockState(); | ||
129 | void toggleCapsLockState(); | ||
130 | void toggleSymbolInput(); | ||
131 | void terminateServers(); | ||
132 | |||
133 | protected: | ||
134 | void executeOrModify( const QString& appLnkFile ); | ||
135 | void styleChange( QStyle & ); | ||
136 | void timerEvent( QTimerEvent *e ); | ||
137 | virtual bool eventFilter( QObject *o, QEvent *ev ); | ||
138 | |||
139 | QWidget *bg; | ||
140 | Launcher *launcher; | ||
141 | TaskBar *tb; | ||
142 | |||
143 | private: | ||
144 | void layout(); | ||
145 | void startTransferServer(); | ||
146 | bool recoverMemory(); | ||
147 | |||
148 | QCopBridge *qcopBridge; | ||
149 | TransferServer *transferServer; | ||
150 | PackageSlave *packageSlave; | ||
151 | |||
152 | QDateTime suspendTime; | ||
153 | }; | ||
154 | |||
155 | |||
156 | #endif // __DESKTOP_H__ | ||
157 | |||