author | zecke <zecke> | 2004-02-07 18:51:44 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-02-07 18:51:44 (UTC) |
commit | e74082b93d1948385d8d32ed92e61396b74d72f1 (patch) (side-by-side diff) | |
tree | 72fa998043e8218412b593626093f62b629154cc | |
parent | a41eba9e8404fb6321097e86736e23fbce4ead7a (diff) | |
download | opie-e74082b93d1948385d8d32ed92e61396b74d72f1.zip opie-e74082b93d1948385d8d32ed92e61396b74d72f1.tar.gz opie-e74082b93d1948385d8d32ed92e61396b74d72f1.tar.bz2 |
Rename the rest bunch of functions <- fix compiling...
Readd the todo mark about constness initButtons is not const...
-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 8 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice.h | 12 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_ipaq.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_ipaq.h | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_simpad.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_simpad.h | 2 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.cpp | 6 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.h | 6 |
8 files changed, 21 insertions, 19 deletions
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index 6c8432f..72b9ac7 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp @@ -345,53 +345,53 @@ Transformation ODevice::rotation() const return d->m_rotation; } /** * @return the current rotation direction */ ODirection ODevice::direction() const { return d->m_direction; } /** -* This plays an alarmSound +* This plays an alarm sound */ -void ODevice::alarmSound() +void ODevice::playAlarmSound() { #ifndef QT_NO_SOUND static Sound snd ( "alarm" ); if ( snd. isFinished()) snd. play(); #endif } /** * This plays a key sound */ -void ODevice::keySound() +void ODevice::playKeySound() { #ifndef QT_NO_SOUND static Sound snd ( "keysound" ); if ( snd. isFinished()) snd. play(); #endif } /** * This plays a touch sound */ -void ODevice::touchSound() +void ODevice::playTouchSound() { #ifndef QT_NO_SOUND static Sound snd ( "touchsound" ); if ( snd. isFinished()) snd. play(); #endif } /** * This method will return a list of leds * available on this device diff --git a/libopie2/opiecore/device/odevice.h b/libopie2/opiecore/device/odevice.h index 8ae7ffa..791ccb3 100644 --- a/libopie2/opiecore/device/odevice.h +++ b/libopie2/opiecore/device/odevice.h @@ -216,51 +216,53 @@ public: virtual bool setDisplayBrightness ( int brightness ); virtual int displayBrightnessResolution() const; virtual bool setDisplayContrast ( int contrast ); virtual int displayContrastResolution() const; // don't add new virtual methods, use this: // /*virtual */ void boo(int i ) { return virtual_hook(1,&i); }; // and in your subclass do do overwrite // protected virtual int virtual_hook(int, void *) // which is defined below // input / output - //FIXME playAlarmSound and al might be better -zecke - virtual void alarmSound(); - virtual void keySound(); - virtual void touchSound(); + virtual void playAlarmSound(); + virtual void playKeySound(); + virtual void playTouchSound(); virtual QValueList <OLed> ledList() const; virtual QValueList <OLedState> ledStateList ( OLed led ) const; virtual OLedState ledState ( OLed led ) const; virtual bool setLedState ( OLed led, OLedState st ); virtual bool hasLightSensor() const; virtual int readLightSensor(); virtual int lightSensorResolution() const; virtual bool hasHingeSensor() const; virtual OHingeStatus readHingeSensor(); const QStrList &allowedCpuFrequencies() const; bool setCurrentCpuFrequency(uint index); /** * Returns the available buttons on this device. The number and location * of buttons will vary depending on the device. Button numbers will be assigned * by the device manufacturer and will be from most preferred button to least preffered * button. Note that this list only contains "user mappable" buttons. + * + * @todo Make method const and take care of calling initButtons or make that const too + * */ - const QValueList<ODeviceButton> &buttons() /* ### make const */; + const QValueList<ODeviceButton> &buttons(); /** * Returns the DeviceButton for the \a keyCode. If \a keyCode is not found, it * returns 0L */ const ODeviceButton *buttonForKeycode ( ushort keyCode ); /** * Reassigns the pressed action for \a button. To return to the factory * default pass an empty string as \a qcopMessage. */ void remapPressedAction ( int button, const OQCopMessage &qcopMessage ); diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp index d68bce1..d20ea4d 100644 --- a/libopie2/opiecore/device/odevice_ipaq.cpp +++ b/libopie2/opiecore/device/odevice_ipaq.cpp @@ -333,25 +333,25 @@ bool iPAQ::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, b return false; } void iPAQ::timerEvent ( QTimerEvent * ) { killTimer ( m_power_timer ); m_power_timer = 0; QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false ); QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false ); } -void iPAQ::alarmSound() +void iPAQ::playAlarmSound() { #ifndef QT_NO_SOUND static Sound snd ( "alarm" ); int fd; int vol; bool vol_reset = false; if (( fd = ::open ( "/dev/sound/mixer", O_RDWR )) >= 0 ) { if ( ::ioctl ( fd, MIXER_READ( 0 ), &vol ) >= 0 ) { Config cfg ( "qpe" ); cfg. setGroup ( "Volume" ); diff --git a/libopie2/opiecore/device/odevice_ipaq.h b/libopie2/opiecore/device/odevice_ipaq.h index baf7215..f512344 100644 --- a/libopie2/opiecore/device/odevice_ipaq.h +++ b/libopie2/opiecore/device/odevice_ipaq.h @@ -41,25 +41,25 @@ class iPAQ : public ODevice, public QWSServer::KeyboardFilter { protected: virtual void init(); virtual void initButtons(); public: virtual bool setSoftSuspend( bool soft ); virtual bool setDisplayBrightness( int b ); virtual int displayBrightnessResolution() const; - virtual void alarmSound(); + virtual void playAlarmSound(); virtual QValueList <OLed> ledList() const; virtual QValueList <OLedState> ledStateList( OLed led ) const; virtual OLedState ledState( OLed led ) const; virtual bool setLedState( OLed led, OLedState st ); virtual bool hasLightSensor() const; virtual int readLightSensor(); virtual int lightSensorResolution() const; protected: virtual bool filter( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ); diff --git a/libopie2/opiecore/device/odevice_simpad.cpp b/libopie2/opiecore/device/odevice_simpad.cpp index a2cd419..4397b78 100644 --- a/libopie2/opiecore/device/odevice_simpad.cpp +++ b/libopie2/opiecore/device/odevice_simpad.cpp @@ -272,25 +272,25 @@ bool SIMpad::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, return false; } void SIMpad::timerEvent ( QTimerEvent * ) { killTimer ( m_power_timer ); m_power_timer = 0; QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false ); QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false ); } -void SIMpad::alarmSound() +void SIMpad::playAlarmSound() { #ifndef QT_NO_SOUND static Sound snd ( "alarm" ); int fd; int vol; bool vol_reset = false; if (( fd = ::open ( "/dev/sound/mixer", O_RDWR )) >= 0 ) { if ( ::ioctl ( fd, MIXER_READ( 0 ), &vol ) >= 0 ) { Config cfg ( "qpe" ); cfg. setGroup ( "Volume" ); diff --git a/libopie2/opiecore/device/odevice_simpad.h b/libopie2/opiecore/device/odevice_simpad.h index 615effc..3287ee8 100644 --- a/libopie2/opiecore/device/odevice_simpad.h +++ b/libopie2/opiecore/device/odevice_simpad.h @@ -42,25 +42,25 @@ class SIMpad : public ODevice, public QWSServer::KeyboardFilter protected: virtual void init(); virtual void initButtons(); public: virtual bool setSoftSuspend( bool soft ); virtual bool suspend(); virtual bool setDisplayStatus( bool on ); virtual bool setDisplayBrightness( int b ); virtual int displayBrightnessResolution() const; - virtual void alarmSound(); + virtual void playAlarmSound(); virtual QValueList <OLed> ledList() const; virtual QValueList <OLedState> ledStateList( OLed led ) const; virtual OLedState ledState( OLed led ) const; virtual bool setLedState( OLed led, OLedState st ); protected: virtual bool filter( int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat ); virtual void timerEvent( QTimerEvent *te ); int m_power_timer; diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index 78bc62e..8bff770 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp @@ -390,35 +390,35 @@ void Zaurus::buzzer ( int sound ) int fd = ::open ( "/dev/sharp_buz", O_WRONLY|O_NONBLOCK ); if ( fd >= 0 ) { ::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound ); ::close ( fd ); } } #endif } -void Zaurus::alarmSound() +void Zaurus::playAlarmSound() { buzzer ( SHARP_BUZ_SCHEDULE_ALARM ); } -void Zaurus::touchSound() +void Zaurus::playTouchSound() { buzzer ( SHARP_BUZ_TOUCHSOUND ); } -void Zaurus::keySound() +void Zaurus::playKeySound() { buzzer ( SHARP_BUZ_KEYSOUND ); } QValueList <OLed> Zaurus::ledList() const { QValueList <OLed> vl; vl << Led_Mail; return vl; } diff --git a/libopie2/opiecore/device/odevice_zaurus.h b/libopie2/opiecore/device/odevice_zaurus.h index c07fe07..f5c5172 100644 --- a/libopie2/opiecore/device/odevice_zaurus.h +++ b/libopie2/opiecore/device/odevice_zaurus.h @@ -51,27 +51,27 @@ class Zaurus : public ODevice { protected: virtual void init(); virtual void initButtons(); public: virtual bool setSoftSuspend ( bool soft ); virtual bool setDisplayBrightness ( int b ); virtual int displayBrightnessResolution() const; - virtual void alarmSound(); - virtual void keySound(); - virtual void touchSound(); + virtual void playAlarmSound(); + virtual void playKeySound(); + virtual void playTouchSound(); virtual QValueList <OLed> ledList() const; virtual QValueList <OLedState> ledStateList ( OLed led ) const; virtual OLedState ledState( OLed led ) const; virtual bool setLedState( OLed led, OLedState st ); virtual bool hasHingeSensor() const; virtual OHingeStatus readHingeSensor(); virtual bool suspend(); virtual Transformation rotation() const; virtual ODirection direction() const; |