summaryrefslogtreecommitdiff
path: root/core/launcher/desktop.h
authorkergoth <kergoth>2002-01-25 22:14:26 (UTC)
committer kergoth <kergoth>2002-01-25 22:14:26 (UTC)
commit15318cad33835e4e2dc620d033e43cd930676cdd (patch) (unidiff)
treec2fa0399a2c47fda8e2cd0092c73a809d17f68eb /core/launcher/desktop.h
downloadopie-15318cad33835e4e2dc620d033e43cd930676cdd.zip
opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.gz
opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.bz2
Initial revision
Diffstat (limited to 'core/launcher/desktop.h') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/desktop.h129
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
31class Background;
32class Launcher;
33class TaskBar;
34class PowerStatus;
35class QCopBridge;
36class TransferServer;
37class DesktopPowerAlerter;
38class PackageSlave;
39
40class DesktopApplication : public QPEApplication
41{
42 Q_OBJECT
43public:
44 DesktopApplication( int& argc, char **argv, Type t );
45 ~DesktopApplication();
46signals:
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
59protected:
60#ifdef Q_WS_QWS
61 bool qwsEventFilter( QWSEvent * );
62#endif
63 void shutdown();
64 void restart();
65
66protected slots:
67 void shutdown(ShutdownImpl::Type);
68 void psTimeout();
69 void sendCard();
70private:
71 DesktopPowerAlerter *pa;
72 PowerStatus *ps;
73 QTimer *cardSendTimer;
74};
75
76
77class Desktop : public QWidget {
78 Q_OBJECT
79public:
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
92public 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
106protected:
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
116private:
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