-rw-r--r-- | core/launcher/serverapp.cpp | 2 | ||||
-rw-r--r-- | core/launcher/serverapp.h | 4 |
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 @@ -251,97 +251,97 @@ bool KeyFilter::checkButtonAction(bool db, int keycode, int press, int autoRepe } if ( keycode == Key_NumLock ) if ( press ) emit numLockStateToggle(); if ( keycode == Key_CapsLock ) if ( press ) emit capsLockStateToggle(); if ( serverApp ) serverApp->keyClick(keycode,press,autoRepeat); return FALSE; } enum MemState { MemUnknown, MemVeryLow, MemLow, MemNormal } memstate=MemUnknown; #if defined(QPE_HAVE_MEMALERTER) QPE_MEMALERTER_IMPL #endif //--------------------------------------------------------------------------- bool ServerApplication::doRestart = FALSE; bool ServerApplication::allowRestart = TRUE; bool ServerApplication::ms_is_starting = TRUE; void ServerApplication::switchLCD( bool on ) { if ( !qApp ) return; ServerApplication *dapp = ServerApplication::me() ; if ( !dapp-> m_screensaver ) return; if ( on ) { dapp-> m_screensaver-> setDisplayState ( true ); dapp-> m_screensaver-> setBacklight ( -3 ); } else dapp-> m_screensaver-> setDisplayState ( false ); } ServerApplication::ServerApplication( int& argc, char **argv, Type t ) - : QPEApplication( argc, argv, t ) + : Opie::Core::OApplication( argc, argv, t ) { ms_is_starting = true; // We know we'll have lots of cached pixmaps due to App/DocLnks QPixmapCache::setCacheLimit(512); m_ps = new PowerStatus; m_ps_last = new PowerStatus; pa = new DesktopPowerAlerter( 0 ); m_apm_timer = new QTimer( this ); connect(m_apm_timer, SIGNAL( timeout() ), this, SLOT( apmTimeout() ) ); reloadPowerWarnSettings(); QCopChannel *channel = new QCopChannel( "QPE/System", this ); connect(channel, SIGNAL(received(const QCString&,const QByteArray&) ), this, SLOT(systemMessage(const QCString&,const QByteArray&) ) ); channel = new QCopChannel("QPE/Launcher", this ); connect(channel, SIGNAL(received(const QCString&,const QByteArray&) ), this, SLOT(launcherMessage(const QCString&,const QByteArray&) ) ); m_screensaver = new OpieScreenSaver(); m_screensaver->setInterval( -1 ); QWSServer::setScreenSaver( m_screensaver ); connect( qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( rereadVolumes() ) ); /* ### PluginLoader libqtopia SafeMode */ #if 0 if ( PluginLoader::inSafeMode() ) QTimer::singleShot(500, this, SLOT(showSafeMode()) ); QTimer::singleShot(20*1000, this, SLOT(clearSafeMode()) ); #endif kf = new KeyFilter(this); connect( kf, SIGNAL(launch()), this, SIGNAL(launch()) ); connect( kf, SIGNAL(power()), this, SIGNAL(power()) ); connect( kf, SIGNAL(backlight()), this, SIGNAL(backlight()) ); connect( kf, SIGNAL(symbol()), this, SIGNAL(symbol())); connect( kf, SIGNAL(numLockStateToggle()), this,SIGNAL(numLockStateToggle())); connect( kf, SIGNAL(capsLockStateToggle()), this,SIGNAL(capsLockStateToggle())); connect( kf, SIGNAL(activate(const Opie::Core::ODeviceButton*,bool)), 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,136 +1,136 @@ /********************************************************************** ** Copyright (C) 2000-2003 Trolltech AS. All rights reserved. ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #ifndef SERVERAPP_H #define SERVERAPP_H -#include <qtopia/qpeapplication.h> +#include <opie2/oapplication.h> #include <qwidget.h> #ifdef QWS #include <qwindowsystem_qws.h> #endif #include "shutdownimpl.h" class PowerStatus; class DesktopPowerAlerter; class OpieScreenSaver; namespace Opie { namespace Core { class ODeviceButton; } } struct QCopKeyRegister { QCopKeyRegister(); QCopKeyRegister( int k, const QCString&, const QCString& ); int keyCode()const; QCString channel()const; QCString message()const; inline bool send(); private: int m_keyCode; QCString m_channel, m_message; }; typedef QMap<int, QCopKeyRegister> KeyRegisterList; class KeyFilter : public QObject { Q_OBJECT public: KeyFilter(QObject* parent); void registerKey( const QCopKeyRegister& ); void unregisterKey( const QCopKeyRegister& ); bool checkButtonAction( bool, int, int, int ); protected: void timerEvent(QTimerEvent*); signals: void launch(); void power(); void backlight(); void symbol(); void numLockStateToggle(); void capsLockStateToggle(); void activate(const Opie::Core::ODeviceButton*,bool); private: bool keyRegistered( int key ); int held_tid; const Opie::Core::ODeviceButton* heldButton; KeyRegisterList m_keys; }; -class ServerApplication : public QPEApplication +class ServerApplication : public Opie::Core::OApplication { Q_OBJECT public: ServerApplication( int& argc, char **argv, Type t ); ~ServerApplication(); static bool doRestart; static bool allowRestart; static bool screenLocked(); static void login(bool at_poweron); static bool isStarting(); static void switchLCD ( bool on ); // only for togglePower in Desktop static void soundAlarm(); // only because QCop soundAlarm() is defined in QPE/TaskBar void restart(); int exec(); signals: void menu(); void home(); void launch(); void power(); void backlight(); void symbol(); void numLockStateToggle(); void capsLockStateToggle(); void prepareForRestart(); void activate(const Opie::Core::ODeviceButton*,bool); public slots: virtual void systemMessage( const QCString& msg, const QByteArray& ); virtual void launcherMessage( const QCString& msg, const QByteArray& ); void rereadVolumes(); protected: bool eventFilter( QObject*, QEvent* ); #ifdef Q_WS_QWS bool qwsEventFilter( QWSEvent * ); #endif void shutdown(); void checkMemory(); bool recoverMemory(); void keyClick(int keycode, bool press, bool repeat); void screenClick(bool press); protected slots: |