-rw-r--r-- | core/launcher/desktop.cpp | 58 | ||||
-rw-r--r-- | core/launcher/main.cpp | 13 | ||||
-rw-r--r-- | core/launcher/taskbar.cpp | 47 | ||||
-rw-r--r-- | core/launcher/taskbar.h | 4 |
4 files changed, 53 insertions, 69 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index ab4f14a..7662e48 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp @@ -45,2 +45,4 @@ +#include <opie/odevice.h> + #include <qgfx_qws.h> @@ -269,3 +271,3 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e ) } - if ( press ) + if (( press && !autoRepeat ) || ( !press && autoRepeat )) qpedesktop->keyClick(); @@ -329,6 +331,2 @@ QPE_MEMALERTER_IMPL -#if defined(CUSTOM_SOUND_IMPL) -CUSTOM_SOUND_IMPL -#endif - //=========================================================================== @@ -341,6 +339,2 @@ Desktop::Desktop() : { -#ifdef CUSTOM_SOUND_INIT - CUSTOM_SOUND_INIT; -#endif - qpedesktop = this; @@ -758,6 +752,4 @@ void Desktop::keyClick() { -#ifdef CUSTOM_SOUND_KEYCLICK - if ( keyclick ) - CUSTOM_SOUND_KEYCLICK; -#endif + if ( keyclick ) + ODevice::inst ( )-> keySound ( ); } @@ -766,6 +758,4 @@ void Desktop::screenClick() { -#ifdef CUSTOM_SOUND_TOUCH - if ( touchclick ) - CUSTOM_SOUND_TOUCH; -#endif + if ( touchclick ) + ODevice::inst ( )-> touchSound ( ); } @@ -774,23 +764,21 @@ void Desktop::soundAlarm() { -#ifdef CUSTOM_SOUND_ALARM - if (qpedesktop->alarmsound) - CUSTOM_SOUND_ALARM; -#endif + if ( qpedesktop-> alarmsound ) + ODevice::inst ( )-> alarmSound ( ); } -bool Desktop::eventFilter( QObject *w, QEvent *ev ) +bool Desktop::eventFilter( QObject *, QEvent *ev ) { - if ( ev->type() == QEvent::KeyPress ) { - QKeyEvent *ke = (QKeyEvent *)ev; - if ( ke->key() == Qt::Key_F11 ) { // menu key - QWidget *active = qApp->activeWindow(); - if ( active && active->isPopup() ) { - active->close(); - } - raiseMenu(); - return TRUE; - } - } - return FALSE; -} + if ( ev-> type ( ) == QEvent::KeyPress ) { + QKeyEvent *ke = (QKeyEvent *) ev; + if ( ke-> key ( ) == Qt::Key_F11 ) { // menu key + QWidget *active = qApp-> activeWindow ( ); + + if ( active && active-> isPopup ( )) + active->close(); + raiseMenu ( ); + return true; + } + } + return false; +} diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp index 347eee9..b3c331b 100644 --- a/core/launcher/main.cpp +++ b/core/launcher/main.cpp @@ -31,2 +31,4 @@ +#include <opie/odevice.h> + #include <qfile.h> @@ -36,4 +38,2 @@ -#include <opie/ohwinfo.h> - #include <stdlib.h> @@ -195,3 +195,3 @@ public: - m_model = OHwInfo::inst ( )-> model ( ); + m_model = ODevice::inst ( )-> model ( ); m_power_timer = 0; @@ -210,3 +210,3 @@ public: - virtual bool filter ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ) + virtual bool filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat ) { @@ -269,5 +269,4 @@ public: private: - OHwModel m_model; - bool m_power_press; - int m_power_timer; + OModel m_model; + int m_power_timer; }; diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp index 5e95c99..e38b9fe 100644 --- a/core/launcher/taskbar.cpp +++ b/core/launcher/taskbar.cpp @@ -39,2 +39,4 @@ +#include <opie/odevice.h> + #include <qlabel.h> @@ -255,25 +257,24 @@ void TaskBar::receive( const QCString &msg, const QByteArray &data ) { - QDataStream stream( data, IO_ReadOnly ); - if ( msg == "message(QString)" ) { - QString text; - stream >> text; - setStatusMessage( text ); - } else if ( msg == "hideInputMethod()" ) { - inputMethods->hideInputMethod(); - } else if ( msg == "showInputMethod()" ) { - inputMethods->showInputMethod(); - } else if ( msg == "reloadInputMethods()" ) { - inputMethods->loadInputMethods(); - } else if ( msg == "reloadApplets()" ) { - sysTray->loadApplets(); - } else if ( msg == "soundAlarm()" ) { - Desktop::soundAlarm(); - } -#ifdef CUSTOM_LEDS - else if ( msg == "setLed(int,bool)" ) { - int led, status; - stream >> led >> status; - CUSTOM_LEDS( led, status ); - } -#endif + QDataStream stream( data, IO_ReadOnly ); + if ( msg == "message(QString)" ) { + QString text; + stream >> text; + setStatusMessage( text ); + } else if ( msg == "hideInputMethod()" ) { + inputMethods->hideInputMethod(); + } else if ( msg == "showInputMethod()" ) { + inputMethods->showInputMethod(); + } else if ( msg == "reloadInputMethods()" ) { + inputMethods->loadInputMethods(); + } else if ( msg == "reloadApplets()" ) { + sysTray->loadApplets(); + } else if ( msg == "soundAlarm()" ) { + Desktop::soundAlarm(); + } + else if ( msg == "setLed(int,bool)" ) { + int led, status; + stream >> led >> status; + + ODevice::inst ( )-> setLed ( led, status ? OLED_BlinkSlow : OLED_Off ); + } } diff --git a/core/launcher/taskbar.h b/core/launcher/taskbar.h index 78c4722..40983af 100644 --- a/core/launcher/taskbar.h +++ b/core/launcher/taskbar.h @@ -23,6 +23,2 @@ -#if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ ) -#include <qpe/custom.h> -#endif - #include <qhbox.h> |