summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-03-11 14:59:10 (UTC)
committer harlekin <harlekin>2002-03-11 14:59:10 (UTC)
commitfbc69c770602ee58e1b2d31a60d7743abb10cc2c (patch) (unidiff)
treea33b1c31b3baed2a1ce33601bc081813b34665dd
parentd9406acf405148290c11a49fc09f5ed6b1258843 (diff)
downloadopie-fbc69c770602ee58e1b2d31a60d7743abb10cc2c.zip
opie-fbc69c770602ee58e1b2d31a60d7743abb10cc2c.tar.gz
opie-fbc69c770602ee58e1b2d31a60d7743abb10cc2c.tar.bz2
added a QPE/Desktop 'suspend()' qcop channel
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 4587ec6..da535d9 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -162,25 +162,29 @@ void DesktopApplication::receive( const QCString &msg, const QByteArray &data )
162 QDataStream stream( data, IO_ReadOnly ); 162 QDataStream stream( data, IO_ReadOnly );
163 if (msg == "keyRegister(int key, QString channel, QString message)") 163 if (msg == "keyRegister(int key, QString channel, QString message)")
164 { 164 {
165 int k; 165 int k;
166 QString c, m; 166 QString c, m;
167 167
168 stream >> k; 168 stream >> k;
169 stream >> c; 169 stream >> c;
170 stream >> m; 170 stream >> m;
171 171
172 qWarning("KeyRegisterRecieved: %i, %s, %s", k, (const char*)c, (const char *)m); 172 qWarning("KeyRegisterRecieved: %i, %s, %s", k, (const char*)c, (const char *)m);
173 keyRegisterList.append(QCopKeyRegister(k,c,m)); 173 keyRegisterList.append(QCopKeyRegister(k,c,m));
174 } 174 }
175 else if (msg == "suspend()"){
176 emit power();
177 }
178
175} 179}
176 180
177enum MemState { Unknown, VeryLow, Low, Normal } memstate=Unknown; 181enum MemState { Unknown, VeryLow, Low, Normal } memstate=Unknown;
178 182
179#ifdef Q_WS_QWS 183#ifdef Q_WS_QWS
180bool DesktopApplication::qwsEventFilter( QWSEvent *e ) 184bool DesktopApplication::qwsEventFilter( QWSEvent *e )
181{ 185{
182 qpedesktop->checkMemory(); 186 qpedesktop->checkMemory();
183 187
184 if ( e->type == QWSEvent::Key ) { 188 if ( e->type == QWSEvent::Key ) {
185 QWSKeyEvent *ke = (QWSKeyEvent *)e; 189 QWSKeyEvent *ke = (QWSKeyEvent *)e;
186 if ( !loggedin && ke->simpleData.keycode != Key_F34 ) 190 if ( !loggedin && ke->simpleData.keycode != Key_F34 )