summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/desktop.cpp36
-rw-r--r--core/launcher/main.cpp11
-rw-r--r--core/launcher/taskbar.cpp7
-rw-r--r--core/launcher/taskbar.h4
4 files changed, 21 insertions, 37 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
@@ -40,12 +40,14 @@
#include <qpe/global.h>
#if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ )
#include <qpe/custom.h>
#endif
+#include <opie/odevice.h>
+
#include <qgfx_qws.h>
#include <qmainwindow.h>
#include <qmessagebox.h>
#include <qtimer.h>
#include <qwindowsystem_qws.h>
@@ -264,13 +266,13 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e )
if ( ke->simpleData.keycode == Key_NumLock ) {
if ( press ) emit numLockStateToggle();
}
if ( ke->simpleData.keycode == Key_CapsLock ) {
if ( press ) emit capsLockStateToggle();
}
- if ( press )
+ if (( press && !autoRepeat ) || ( !press && autoRepeat ))
qpedesktop->keyClick();
} else {
if ( e->type == QWSEvent::Mouse ) {
QWSMouseEvent *me = (QWSMouseEvent *)e;
static bool up = TRUE;
if ( me->simpleData.state&LeftButton ) {
@@ -324,28 +326,20 @@ void DesktopApplication::sendCard()
}
#if defined(QPE_HAVE_MEMALERTER)
QPE_MEMALERTER_IMPL
#endif
-#if defined(CUSTOM_SOUND_IMPL)
-CUSTOM_SOUND_IMPL
-#endif
-
//===========================================================================
Desktop::Desktop() :
QWidget( 0, 0, WStyle_Tool | WStyle_Customize ),
qcopBridge( 0 ),
transferServer( 0 ),
packageSlave( 0 )
{
-#ifdef CUSTOM_SOUND_INIT
- CUSTOM_SOUND_INIT;
-#endif
-
qpedesktop = this;
// bg = new Info( this );
tb = new TaskBar;
launcher = new Launcher( 0, 0, WStyle_Customize | QWidget::WGroupLeader );
@@ -753,44 +747,38 @@ void Desktop::rereadVolumes()
// touchclick = cfg.readBoolEntry("Touch");
// keyclick = cfg.readBoolEntry("Key");
}
void Desktop::keyClick()
{
-#ifdef CUSTOM_SOUND_KEYCLICK
if ( keyclick )
- CUSTOM_SOUND_KEYCLICK;
-#endif
+ ODevice::inst ( )-> keySound ( );
}
void Desktop::screenClick()
{
-#ifdef CUSTOM_SOUND_TOUCH
if ( touchclick )
- CUSTOM_SOUND_TOUCH;
-#endif
+ ODevice::inst ( )-> touchSound ( );
}
void Desktop::soundAlarm()
{
-#ifdef CUSTOM_SOUND_ALARM
if (qpedesktop->alarmsound)
- CUSTOM_SOUND_ALARM;
-#endif
+ 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() ) {
+
+ if ( active && active-> isPopup ( ))
active->close();
- }
+
raiseMenu();
- return TRUE;
+ return true;
}
}
- return FALSE;
+ 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
@@ -26,19 +26,19 @@
#include <qpe/network.h>
#include <qpe/config.h>
#if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ )
#include <qpe/custom.h>
#endif
+#include <opie/odevice.h>
+
#include <qfile.h>
#include <qwindowsystem_qws.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/alarmserver.h>
-#include <opie/ohwinfo.h>
-
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#if defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_IPAQ) || defined(QT_QWS_EBX)
@@ -190,13 +190,13 @@ class ModelKeyFilter : public QObject, public QWSServer::KeyboardFilter
{
public:
ModelKeyFilter ( ) : QObject ( 0, "MODEL_KEY_FILTER" )
{
bool doinst = false;
- m_model = OHwInfo::inst ( )-> model ( );
+ m_model = ODevice::inst ( )-> model ( );
m_power_timer = 0;
switch ( m_model ) {
case OMODEL_iPAQ_H31xx:
case OMODEL_iPAQ_H36xx:
case OMODEL_iPAQ_H37xx:
@@ -205,13 +205,13 @@ public:
default : break;
}
if ( doinst )
QWSServer::setKeyboardFilter ( this );
}
- 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 )
{
bool kill = false;
// Rotate cursor keys 180°
switch ( m_model ) {
case OMODEL_iPAQ_H31xx:
@@ -264,14 +264,13 @@ public:
m_power_timer = 0;
QWSServer::sendKeyEvent ( -1, Key_F35, 0, true, false );
QWSServer::sendKeyEvent ( -1, Key_F35, 0, false, false );
}
private:
- OHwModel m_model;
- bool m_power_press;
+ OModel m_model;
int m_power_timer;
};
int initApplication( int argc, char ** argv )
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
@@ -34,12 +34,14 @@
#include <qpe/global.h>
#if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ )
#include <qpe/custom.h>
#endif
+#include <opie/odevice.h>
+
#include <qlabel.h>
#include <qlayout.h>
#include <qtimer.h>
#include <qwindowsystem_qws.h>
#include <qwidgetstack.h>
@@ -266,19 +268,18 @@ void TaskBar::receive( const QCString &msg, const QByteArray &data )
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 );
+
+ ODevice::inst ( )-> setLed ( led, status ? OLED_BlinkSlow : OLED_Off );
}
-#endif
}
QWidget *TaskBar::calibrate(bool)
{
#ifdef Q_WS_QWS
Calibrate *c = new Calibrate;
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
@@ -18,16 +18,12 @@
**
**********************************************************************/
#ifndef __TASKBAR_H__
#define __TASKBAR_H__
-#if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ )
-#include <qpe/custom.h>
-#endif
-
#include <qhbox.h>
class QLabel;
class QTimer;
class InputMethods;
class Wait;