-rw-r--r-- | core/launcher/desktop.h | 133 |
1 files changed, 71 insertions, 62 deletions
diff --git a/core/launcher/desktop.h b/core/launcher/desktop.h index 9bc4be9..b9ff39f 100644 --- a/core/launcher/desktop.h +++ b/core/launcher/desktop.h | |||
@@ -38,96 +38,105 @@ class TransferServer; | |||
38 | class DesktopPowerAlerter; | 38 | class DesktopPowerAlerter; |
39 | class PackageSlave; | 39 | class PackageSlave; |
40 | class QPEScreenSaver; | ||
40 | 41 | ||
41 | class DesktopApplication : public QPEApplication | 42 | class DesktopApplication : public QPEApplication |
42 | { | 43 | { |
43 | Q_OBJECT | 44 | Q_OBJECT |
44 | public: | 45 | public: |
45 | DesktopApplication( int& argc, char **argv, Type t ); | 46 | DesktopApplication( int& argc, char **argv, Type t ); |
46 | ~DesktopApplication(); | 47 | ~DesktopApplication(); |
48 | |||
49 | static void switchLCD ( bool on ); // only for togglePower in Desktop | ||
50 | |||
47 | signals: | 51 | signals: |
48 | void home(); | 52 | void home(); |
49 | void datebook(); | 53 | void datebook(); |
50 | void contacts(); | 54 | void contacts(); |
51 | void launch(); | 55 | void launch(); |
52 | void email(); | 56 | void email(); |
53 | void backlight(); | 57 | void backlight(); |
54 | void power(); | 58 | void power(); |
55 | void symbol(); | 59 | void symbol(); |
56 | void numLockStateToggle(); | 60 | void numLockStateToggle(); |
57 | void capsLockStateToggle(); | 61 | void capsLockStateToggle(); |
58 | void prepareForRestart(); | 62 | void prepareForRestart(); |
59 | 63 | ||
60 | protected: | 64 | protected: |
61 | #ifdef Q_WS_QWS | 65 | #ifdef Q_WS_QWS |
62 | bool qwsEventFilter( QWSEvent * ); | 66 | |
67 | bool qwsEventFilter( QWSEvent * ); | ||
63 | #endif | 68 | #endif |
64 | void shutdown(); | 69 | |
65 | void restart(); | 70 | void shutdown(); |
71 | void restart(); | ||
66 | 72 | ||
67 | public slots: | 73 | public slots: |
68 | void receive( const QCString &msg, const QByteArray &data ); | 74 | virtual void desktopMessage ( const QCString &msg, const QByteArray &data ); |
75 | virtual void systemMessage ( const QCString &msg, const QByteArray &data ); | ||
69 | 76 | ||
70 | protected slots: | 77 | protected slots: |
71 | void shutdown(ShutdownImpl::Type); | 78 | void shutdown( ShutdownImpl::Type ); |
72 | void psTimeout(); | 79 | void psTimeout(); |
73 | void sendCard(); | 80 | void sendCard(); |
74 | private: | 81 | private: |
75 | DesktopPowerAlerter *pa; | 82 | DesktopPowerAlerter *pa; |
76 | PowerStatus *ps; | 83 | PowerStatus *ps; |
77 | QTimer *cardSendTimer; | 84 | QTimer *cardSendTimer; |
78 | QCopChannel *channel; | 85 | QCopChannel *channel; |
86 | QPEScreenSaver *m_screensaver; | ||
79 | }; | 87 | }; |
80 | 88 | ||
81 | 89 | ||
82 | class Desktop : public QWidget { | 90 | class Desktop : public QWidget |
83 | Q_OBJECT | 91 | { |
92 | Q_OBJECT | ||
84 | public: | 93 | public: |
85 | Desktop(); | 94 | Desktop(); |
86 | ~Desktop(); | 95 | ~Desktop(); |
87 | 96 | ||
88 | static bool screenLocked(); | 97 | static bool screenLocked(); |
89 | 98 | ||
90 | void show(); | 99 | void show(); |
91 | void checkMemory(); | 100 | void checkMemory(); |
92 | 101 | ||
93 | void keyClick(); | 102 | void keyClick(); |
94 | void screenClick(); | 103 | void screenClick(); |
95 | static void soundAlarm(); | 104 | static void soundAlarm(); |
96 | 105 | ||
97 | public slots: | 106 | public slots: |
98 | void raiseDatebook(); | 107 | void raiseDatebook(); |
99 | void raiseContacts(); | 108 | void raiseContacts(); |
100 | void raiseMenu(); | 109 | void raiseMenu(); |
101 | void raiseLauncher(); | 110 | void raiseLauncher(); |
102 | void raiseEmail(); | 111 | void raiseEmail(); |
103 | void execAutoStart(); | 112 | void execAutoStart(); |
104 | void togglePower(); | 113 | void togglePower(); |
105 | void toggleLight(); | 114 | void toggleLight(); |
106 | void toggleNumLockState(); | 115 | void toggleNumLockState(); |
107 | void toggleCapsLockState(); | 116 | void toggleCapsLockState(); |
108 | void toggleSymbolInput(); | 117 | void toggleSymbolInput(); |
109 | void terminateServers(); | 118 | void terminateServers(); |
110 | void rereadVolumes(); | 119 | void rereadVolumes(); |
111 | 120 | ||
112 | protected: | 121 | protected: |
113 | void executeOrModify(const QString& appLnkFile); | 122 | void executeOrModify( const QString& appLnkFile ); |
114 | void styleChange( QStyle & ); | 123 | void styleChange( QStyle & ); |
115 | void timerEvent( QTimerEvent *e ); | 124 | void timerEvent( QTimerEvent *e ); |
116 | bool eventFilter( QObject *, QEvent * ); | 125 | bool eventFilter( QObject *, QEvent * ); |
117 | 126 | ||
118 | QWidget *bg; | 127 | QWidget *bg; |
119 | Launcher *launcher; | 128 | Launcher *launcher; |
120 | TaskBar *tb; | 129 | TaskBar *tb; |
121 | 130 | ||
122 | private: | 131 | private: |
123 | void startTransferServer(); | 132 | void startTransferServer(); |
124 | bool recoverMemory(); | 133 | bool recoverMemory(); |
125 | 134 | ||
126 | QCopBridge *qcopBridge; | 135 | QCopBridge *qcopBridge; |
127 | TransferServer *transferServer; | 136 | TransferServer *transferServer; |
128 | PackageSlave *packageSlave; | 137 | PackageSlave *packageSlave; |
129 | 138 | ||
130 | QDateTime suspendTime; | 139 | QDateTime suspendTime; |
131 | bool keyclick,touchclick,alarmsound; | 140 | bool keyclick, touchclick, alarmsound; |
132 | }; | 141 | }; |
133 | 142 | ||