summaryrefslogtreecommitdiff
path: root/core
authorzecke <zecke>2004-11-03 22:35:36 (UTC)
committer zecke <zecke>2004-11-03 22:35:36 (UTC)
commit9a753348fd31dfb5309408c469cce8ea5eadf8ea (patch) (unidiff)
tree4945b66e2ff79c5961f29b53906edff644ad6f5e /core
parentda3c9206558e9b03be2270ab5e9b3406d9c3cad8 (diff)
downloadopie-9a753348fd31dfb5309408c469cce8ea5eadf8ea.zip
opie-9a753348fd31dfb5309408c469cce8ea5eadf8ea.tar.gz
opie-9a753348fd31dfb5309408c469cce8ea5eadf8ea.tar.bz2
Switch to OApplication
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/serverapp.cpp2
-rw-r--r--core/launcher/serverapp.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/core/launcher/serverapp.cpp b/core/launcher/serverapp.cpp
index be6b972..75d4ac1 100644
--- a/core/launcher/serverapp.cpp
+++ b/core/launcher/serverapp.cpp
@@ -275,49 +275,49 @@ QPE_MEMALERTER_IMPL
275bool ServerApplication::doRestart = FALSE; 275bool ServerApplication::doRestart = FALSE;
276bool ServerApplication::allowRestart = TRUE; 276bool ServerApplication::allowRestart = TRUE;
277bool ServerApplication::ms_is_starting = TRUE; 277bool ServerApplication::ms_is_starting = TRUE;
278 278
279void ServerApplication::switchLCD( bool on ) 279void ServerApplication::switchLCD( bool on )
280{ 280{
281 if ( !qApp ) 281 if ( !qApp )
282 return; 282 return;
283 283
284 ServerApplication *dapp = ServerApplication::me() ; 284 ServerApplication *dapp = ServerApplication::me() ;
285 285
286 if ( !dapp-> m_screensaver ) 286 if ( !dapp-> m_screensaver )
287 return; 287 return;
288 288
289 if ( on ) { 289 if ( on ) {
290 dapp-> m_screensaver-> setDisplayState ( true ); 290 dapp-> m_screensaver-> setDisplayState ( true );
291 dapp-> m_screensaver-> setBacklight ( -3 ); 291 dapp-> m_screensaver-> setBacklight ( -3 );
292 } else 292 } else
293 dapp-> m_screensaver-> setDisplayState ( false ); 293 dapp-> m_screensaver-> setDisplayState ( false );
294 294
295 295
296} 296}
297 297
298ServerApplication::ServerApplication( int& argc, char **argv, Type t ) 298ServerApplication::ServerApplication( int& argc, char **argv, Type t )
299 : QPEApplication( argc, argv, t ) 299 : Opie::Core::OApplication( argc, argv, t )
300{ 300{
301 ms_is_starting = true; 301 ms_is_starting = true;
302 302
303 // We know we'll have lots of cached pixmaps due to App/DocLnks 303 // We know we'll have lots of cached pixmaps due to App/DocLnks
304 QPixmapCache::setCacheLimit(512); 304 QPixmapCache::setCacheLimit(512);
305 305
306 m_ps = new PowerStatus; 306 m_ps = new PowerStatus;
307 m_ps_last = new PowerStatus; 307 m_ps_last = new PowerStatus;
308 pa = new DesktopPowerAlerter( 0 ); 308 pa = new DesktopPowerAlerter( 0 );
309 309
310 m_apm_timer = new QTimer( this ); 310 m_apm_timer = new QTimer( this );
311 connect(m_apm_timer, SIGNAL( timeout() ), 311 connect(m_apm_timer, SIGNAL( timeout() ),
312 this, SLOT( apmTimeout() ) ); 312 this, SLOT( apmTimeout() ) );
313 313
314 reloadPowerWarnSettings(); 314 reloadPowerWarnSettings();
315 315
316 QCopChannel *channel = new QCopChannel( "QPE/System", this ); 316 QCopChannel *channel = new QCopChannel( "QPE/System", this );
317 connect(channel, SIGNAL(received(const QCString&,const QByteArray&) ), 317 connect(channel, SIGNAL(received(const QCString&,const QByteArray&) ),
318 this, SLOT(systemMessage(const QCString&,const QByteArray&) ) ); 318 this, SLOT(systemMessage(const QCString&,const QByteArray&) ) );
319 319
320 channel = new QCopChannel("QPE/Launcher", this ); 320 channel = new QCopChannel("QPE/Launcher", this );
321 connect(channel, SIGNAL(received(const QCString&,const QByteArray&) ), 321 connect(channel, SIGNAL(received(const QCString&,const QByteArray&) ),
322 this, SLOT(launcherMessage(const QCString&,const QByteArray&) ) ); 322 this, SLOT(launcherMessage(const QCString&,const QByteArray&) ) );
323 323
diff --git a/core/launcher/serverapp.h b/core/launcher/serverapp.h
index 916d83c..27be28b 100644
--- a/core/launcher/serverapp.h
+++ b/core/launcher/serverapp.h
@@ -1,48 +1,48 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2003 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2003 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 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 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 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 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. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#ifndef SERVERAPP_H 21#ifndef SERVERAPP_H
22#define SERVERAPP_H 22#define SERVERAPP_H
23 23
24#include <qtopia/qpeapplication.h> 24#include <opie2/oapplication.h>
25 25
26#include <qwidget.h> 26#include <qwidget.h>
27#ifdef QWS 27#ifdef QWS
28#include <qwindowsystem_qws.h> 28#include <qwindowsystem_qws.h>
29#endif 29#endif
30 30
31#include "shutdownimpl.h" 31#include "shutdownimpl.h"
32 32
33class PowerStatus; 33class PowerStatus;
34class DesktopPowerAlerter; 34class DesktopPowerAlerter;
35 35
36class OpieScreenSaver; 36class OpieScreenSaver;
37namespace Opie { 37namespace Opie {
38namespace Core { 38namespace Core {
39 class ODeviceButton; 39 class ODeviceButton;
40} 40}
41} 41}
42 42
43struct QCopKeyRegister { 43struct QCopKeyRegister {
44 QCopKeyRegister(); 44 QCopKeyRegister();
45 QCopKeyRegister( int k, const QCString&, const QCString& ); 45 QCopKeyRegister( int k, const QCString&, const QCString& );
46 int keyCode()const; 46 int keyCode()const;
47 QCString channel()const; 47 QCString channel()const;
48 QCString message()const; 48 QCString message()const;
@@ -64,49 +64,49 @@ public:
64 bool checkButtonAction( bool, int, int, int ); 64 bool checkButtonAction( bool, int, int, int );
65 65
66 66
67 67
68protected: 68protected:
69 void timerEvent(QTimerEvent*); 69 void timerEvent(QTimerEvent*);
70 70
71signals: 71signals:
72 void launch(); 72 void launch();
73 void power(); 73 void power();
74 void backlight(); 74 void backlight();
75 void symbol(); 75 void symbol();
76 void numLockStateToggle(); 76 void numLockStateToggle();
77 void capsLockStateToggle(); 77 void capsLockStateToggle();
78 void activate(const Opie::Core::ODeviceButton*,bool); 78 void activate(const Opie::Core::ODeviceButton*,bool);
79 79
80 80
81private: 81private:
82 bool keyRegistered( int key ); 82 bool keyRegistered( int key );
83 int held_tid; 83 int held_tid;
84 const Opie::Core::ODeviceButton* heldButton; 84 const Opie::Core::ODeviceButton* heldButton;
85 KeyRegisterList m_keys; 85 KeyRegisterList m_keys;
86}; 86};
87 87
88class ServerApplication : public QPEApplication 88class ServerApplication : public Opie::Core::OApplication
89{ 89{
90 Q_OBJECT 90 Q_OBJECT
91public: 91public:
92 ServerApplication( int& argc, char **argv, Type t ); 92 ServerApplication( int& argc, char **argv, Type t );
93 ~ServerApplication(); 93 ~ServerApplication();
94 94
95 static bool doRestart; 95 static bool doRestart;
96 static bool allowRestart; 96 static bool allowRestart;
97 static bool screenLocked(); 97 static bool screenLocked();
98 static void login(bool at_poweron); 98 static void login(bool at_poweron);
99 99
100 static bool isStarting(); 100 static bool isStarting();
101 101
102 static void switchLCD ( bool on ); // only for togglePower in Desktop 102 static void switchLCD ( bool on ); // only for togglePower in Desktop
103 static void soundAlarm(); // only because QCop soundAlarm() is defined in QPE/TaskBar 103 static void soundAlarm(); // only because QCop soundAlarm() is defined in QPE/TaskBar
104 104
105 void restart(); 105 void restart();
106 int exec(); 106 int exec();
107 107
108signals: 108signals:
109 void menu(); 109 void menu();
110 void home(); 110 void home();
111 void launch(); 111 void launch();
112 void power(); 112 void power();