author | sandman <sandman> | 2002-06-18 12:49:05 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-06-18 12:49:05 (UTC) |
commit | c739f74f910b24884279d34836c1f78a97a7e7ae (patch) (unidiff) | |
tree | 432c379c30469e2be9117b4895b345e4947e688a | |
parent | 61e2f9e5eb634b17ef480d79bdbcbc3a715990cb (diff) | |
download | opie-c739f74f910b24884279d34836c1f78a97a7e7ae.zip opie-c739f74f910b24884279d34836c1f78a97a7e7ae.tar.gz opie-c739f74f910b24884279d34836c1f78a97a7e7ae.tar.bz2 |
Replaced OHwInfo with ODevice and ported from custom-*.h #defines to
ODevice methods
-rw-r--r-- | core/launcher/desktop.cpp | 36 | ||||
-rw-r--r-- | core/launcher/main.cpp | 11 | ||||
-rw-r--r-- | core/launcher/taskbar.cpp | 7 | ||||
-rw-r--r-- | core/launcher/taskbar.h | 4 |
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 | |||
@@ -43,6 +43,8 @@ | |||
43 | #include <qpe/custom.h> | 43 | #include <qpe/custom.h> |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | #include <opie/odevice.h> | ||
47 | |||
46 | #include <qgfx_qws.h> | 48 | #include <qgfx_qws.h> |
47 | #include <qmainwindow.h> | 49 | #include <qmainwindow.h> |
48 | #include <qmessagebox.h> | 50 | #include <qmessagebox.h> |
@@ -267,7 +269,7 @@ bool DesktopApplication::qwsEventFilter( QWSEvent *e ) | |||
267 | if ( ke->simpleData.keycode == Key_CapsLock ) { | 269 | if ( ke->simpleData.keycode == Key_CapsLock ) { |
268 | if ( press ) emit capsLockStateToggle(); | 270 | if ( press ) emit capsLockStateToggle(); |
269 | } | 271 | } |
270 | if ( press ) | 272 | if (( press && !autoRepeat ) || ( !press && autoRepeat )) |
271 | qpedesktop->keyClick(); | 273 | qpedesktop->keyClick(); |
272 | } else { | 274 | } else { |
273 | if ( e->type == QWSEvent::Mouse ) { | 275 | if ( e->type == QWSEvent::Mouse ) { |
@@ -327,10 +329,6 @@ void DesktopApplication::sendCard() | |||
327 | QPE_MEMALERTER_IMPL | 329 | QPE_MEMALERTER_IMPL |
328 | #endif | 330 | #endif |
329 | 331 | ||
330 | #if defined(CUSTOM_SOUND_IMPL) | ||
331 | CUSTOM_SOUND_IMPL | ||
332 | #endif | ||
333 | |||
334 | //=========================================================================== | 332 | //=========================================================================== |
335 | 333 | ||
336 | Desktop::Desktop() : | 334 | Desktop::Desktop() : |
@@ -339,10 +337,6 @@ Desktop::Desktop() : | |||
339 | transferServer( 0 ), | 337 | transferServer( 0 ), |
340 | packageSlave( 0 ) | 338 | packageSlave( 0 ) |
341 | { | 339 | { |
342 | #ifdef CUSTOM_SOUND_INIT | ||
343 | CUSTOM_SOUND_INIT; | ||
344 | #endif | ||
345 | |||
346 | qpedesktop = this; | 340 | qpedesktop = this; |
347 | 341 | ||
348 | // bg = new Info( this ); | 342 | // bg = new Info( this ); |
@@ -756,41 +750,35 @@ void Desktop::rereadVolumes() | |||
756 | 750 | ||
757 | void Desktop::keyClick() | 751 | void Desktop::keyClick() |
758 | { | 752 | { |
759 | #ifdef CUSTOM_SOUND_KEYCLICK | ||
760 | if ( keyclick ) | 753 | if ( keyclick ) |
761 | CUSTOM_SOUND_KEYCLICK; | 754 | ODevice::inst ( )-> keySound ( ); |
762 | #endif | ||
763 | } | 755 | } |
764 | 756 | ||
765 | void Desktop::screenClick() | 757 | void Desktop::screenClick() |
766 | { | 758 | { |
767 | #ifdef CUSTOM_SOUND_TOUCH | ||
768 | if ( touchclick ) | 759 | if ( touchclick ) |
769 | CUSTOM_SOUND_TOUCH; | 760 | ODevice::inst ( )-> touchSound ( ); |
770 | #endif | ||
771 | } | 761 | } |
772 | 762 | ||
773 | void Desktop::soundAlarm() | 763 | void Desktop::soundAlarm() |
774 | { | 764 | { |
775 | #ifdef CUSTOM_SOUND_ALARM | ||
776 | if (qpedesktop->alarmsound) | 765 | if (qpedesktop->alarmsound) |
777 | CUSTOM_SOUND_ALARM; | 766 | ODevice::inst ( )-> alarmSound ( ); |
778 | #endif | ||
779 | } | 767 | } |
780 | 768 | ||
781 | bool Desktop::eventFilter( QObject *w, QEvent *ev ) | 769 | bool Desktop::eventFilter( QObject *, QEvent *ev ) |
782 | { | 770 | { |
783 | if ( ev->type() == QEvent::KeyPress ) { | 771 | if ( ev->type() == QEvent::KeyPress ) { |
784 | QKeyEvent *ke = (QKeyEvent *)ev; | 772 | QKeyEvent *ke = (QKeyEvent *)ev; |
785 | if ( ke->key() == Qt::Key_F11 ) { // menu key | 773 | if ( ke->key() == Qt::Key_F11 ) { // menu key |
786 | QWidget *active = qApp->activeWindow(); | 774 | QWidget *active = qApp->activeWindow(); |
787 | if ( active && active->isPopup() ) { | 775 | |
776 | if ( active && active-> isPopup ( )) | ||
788 | active->close(); | 777 | active->close(); |
789 | } | 778 | |
790 | raiseMenu(); | 779 | raiseMenu(); |
791 | return TRUE; | 780 | return true; |
792 | } | 781 | } |
793 | } | 782 | } |
794 | return FALSE; | 783 | return false; |
795 | } | 784 | } |
796 | |||
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 | |||
@@ -29,13 +29,13 @@ | |||
29 | #include <qpe/custom.h> | 29 | #include <qpe/custom.h> |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #include <opie/odevice.h> | ||
33 | |||
32 | #include <qfile.h> | 34 | #include <qfile.h> |
33 | #include <qwindowsystem_qws.h> | 35 | #include <qwindowsystem_qws.h> |
34 | #include <qpe/qcopenvelope_qws.h> | 36 | #include <qpe/qcopenvelope_qws.h> |
35 | #include <qpe/alarmserver.h> | 37 | #include <qpe/alarmserver.h> |
36 | 38 | ||
37 | #include <opie/ohwinfo.h> | ||
38 | |||
39 | #include <stdlib.h> | 39 | #include <stdlib.h> |
40 | #include <stdio.h> | 40 | #include <stdio.h> |
41 | #include <signal.h> | 41 | #include <signal.h> |
@@ -193,7 +193,7 @@ public: | |||
193 | { | 193 | { |
194 | bool doinst = false; | 194 | bool doinst = false; |
195 | 195 | ||
196 | m_model = OHwInfo::inst ( )-> model ( ); | 196 | m_model = ODevice::inst ( )-> model ( ); |
197 | m_power_timer = 0; | 197 | m_power_timer = 0; |
198 | 198 | ||
199 | switch ( m_model ) { | 199 | switch ( m_model ) { |
@@ -208,7 +208,7 @@ public: | |||
208 | QWSServer::setKeyboardFilter ( this ); | 208 | QWSServer::setKeyboardFilter ( this ); |
209 | } | 209 | } |
210 | 210 | ||
211 | virtual bool filter ( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ) | 211 | virtual bool filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat ) |
212 | { | 212 | { |
213 | bool kill = false; | 213 | bool kill = false; |
214 | 214 | ||
@@ -267,8 +267,7 @@ public: | |||
267 | } | 267 | } |
268 | 268 | ||
269 | private: | 269 | private: |
270 | OHwModel m_model; | 270 | OModel m_model; |
271 | bool m_power_press; | ||
272 | int m_power_timer; | 271 | int m_power_timer; |
273 | }; | 272 | }; |
274 | 273 | ||
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 | |||
@@ -37,6 +37,8 @@ | |||
37 | #include <qpe/custom.h> | 37 | #include <qpe/custom.h> |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #include <opie/odevice.h> | ||
41 | |||
40 | #include <qlabel.h> | 42 | #include <qlabel.h> |
41 | #include <qlayout.h> | 43 | #include <qlayout.h> |
42 | #include <qtimer.h> | 44 | #include <qtimer.h> |
@@ -269,13 +271,12 @@ void TaskBar::receive( const QCString &msg, const QByteArray &data ) | |||
269 | } else if ( msg == "soundAlarm()" ) { | 271 | } else if ( msg == "soundAlarm()" ) { |
270 | Desktop::soundAlarm(); | 272 | Desktop::soundAlarm(); |
271 | } | 273 | } |
272 | #ifdef CUSTOM_LEDS | ||
273 | else if ( msg == "setLed(int,bool)" ) { | 274 | else if ( msg == "setLed(int,bool)" ) { |
274 | int led, status; | 275 | int led, status; |
275 | stream >> led >> status; | 276 | stream >> led >> status; |
276 | CUSTOM_LEDS( led, status ); | 277 | |
278 | ODevice::inst ( )-> setLed ( led, status ? OLED_BlinkSlow : OLED_Off ); | ||
277 | } | 279 | } |
278 | #endif | ||
279 | } | 280 | } |
280 | 281 | ||
281 | QWidget *TaskBar::calibrate(bool) | 282 | QWidget *TaskBar::calibrate(bool) |
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 | |||
@@ -21,10 +21,6 @@ | |||
21 | #ifndef __TASKBAR_H__ | 21 | #ifndef __TASKBAR_H__ |
22 | #define __TASKBAR_H__ | 22 | #define __TASKBAR_H__ |
23 | 23 | ||
24 | #if defined( QT_QWS_CUSTOM ) || defined( QT_QWS_IPAQ ) | ||
25 | #include <qpe/custom.h> | ||
26 | #endif | ||
27 | |||
28 | #include <qhbox.h> | 24 | #include <qhbox.h> |
29 | 25 | ||
30 | class QLabel; | 26 | class QLabel; |