Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Opie::Core::Internal::SIMpad Class Reference

#include </home/clem/local/src/opie/libopie2/opiecore/device/odevice_simpad.h>

Inheritance diagram for Opie::Core::Internal::SIMpad:

Inheritance graph
[legend]
Collaboration diagram for Opie::Core::Internal::SIMpad:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual bool suspend ()
virtual bool setDisplayStatus (bool on)
virtual bool setDisplayBrightness (int b)
virtual int displayBrightnessResolution () const
virtual void playAlarmSound ()
virtual QValueList< OLedledList () const
virtual QValueList< OLedStateledStateList (OLed led) const
virtual OLedState ledState (OLed led) const
virtual bool setLedState (OLed led, OLedState st)

Protected Member Functions

virtual void init (const QString &)
virtual void initButtons ()
virtual void timerEvent (QTimerEvent *te)

Protected Attributes

int m_power_timer
OLedState m_leds [2]

Static Private Member Functions

static void updateAllWidgets ()

Member Function Documentation

int Opie::Core::Internal::SIMpad::displayBrightnessResolution  )  const [virtual]
 

Returns:
the number of steppings on the brightness slider in the Light-'n-Power settings. Values smaller than zero and bigger than 255 do not make sense.
See also:
QSlider::setLineStep

QSlider::setPageStep

Reimplemented from Opie::Core::ODevice.

Definition at line 376 of file odevice_simpad.cpp.

void Opie::Core::Internal::SIMpad::init const QString  )  [protected, virtual]
 

Reimplemented from Opie::Core::ODevice.

Definition at line 132 of file odevice_simpad.cpp.

References Opie::Core::CCW, Opie::ODevice::d, Opie::Core::Led_Off, Opie::Core::ODeviceData::m_direction, Opie::Core::ODeviceData::m_holdtime, SIMpad::m_leds, Opie::Core::ODeviceData::m_model, Opie::Core::ODeviceData::m_modelstr, SIMpad::m_power_timer, Opie::Core::ODeviceData::m_rotation, Opie::Core::ODeviceData::m_vendor, Opie::Core::ODeviceData::m_vendorstr, Opie::Core::Model_SIMpad_SL4, Rot0, and Opie::Core::Vendor_SIEMENS.

void Opie::Core::Internal::SIMpad::initButtons  )  [protected, virtual]
 

This method initialises the button mapping

Reimplemented from Opie::Core::ODevice.

Definition at line 160 of file odevice_simpad.cpp.

References QValueList< T >::append(), s_button::code, Opie::ODevice::d, s_button::fheldaction, s_button::fheldservice, s_button::fpressedaction, s_button::fpressedservice, i, Resource::loadPixmap(), Opie::Core::ODeviceData::m_buttons, Opie::Core::ODeviceData::m_model, Opie::Core::makeChannel(), s_button::model, s_button::pix, Opie::ODevice::reloadButtonMapping(), Opie::Core::Internal::simpad_buttons, size, tr, and s_button::utext.

QValueList< OLed > Opie::Core::Internal::SIMpad::ledList  )  const [virtual]
 

This method will return a list of leds available on this device

Returns:
a list of LEDs.

Reimplemented from Opie::Core::ODevice.

Definition at line 266 of file odevice_simpad.cpp.

References Opie::Core::Led_Power.

OLedState Opie::Core::Internal::SIMpad::ledState OLed  l  )  const [virtual]
 

Returns:
the state for a given OLed

Reimplemented from Opie::Core::ODevice.

Definition at line 285 of file odevice_simpad.cpp.

References Opie::Core::Led_Off, Opie::Core::Led_Power, and SIMpad::m_leds.

QValueList< OLedState > Opie::Core::Internal::SIMpad::ledStateList OLed  l  )  const [virtual]
 

This does return the state of the LEDs

Reimplemented from Opie::Core::ODevice.

Definition at line 274 of file odevice_simpad.cpp.

References Opie::Core::Led_Off, Opie::Core::Led_On, and Opie::Core::Led_Power.

void Opie::Core::Internal::SIMpad::playAlarmSound  )  [virtual]
 

This plays an alarm sound

Reimplemented from Opie::Core::ODevice.

Definition at line 317 of file odevice_simpad.cpp.

References Sound::isFinished(), and snd.

bool Opie::Core::Internal::SIMpad::setDisplayBrightness int  bright  )  [virtual]
 

This sets the display brightness

Parameters:
b The brightness to be set on a scale from 0 to 255
Returns:
success or failure

Reimplemented from Opie::Core::ODevice.

Definition at line 356 of file odevice_simpad.cpp.

References QFile::encodeName(), QCString::length(), QString::number(), qDebug(), SIMPAD_BACKLIGHT_CONTROL, str, and write().

bool Opie::Core::Internal::SIMpad::setDisplayStatus bool  on  )  [virtual]
 

This sets the display on or off

Reimplemented from Opie::Core::OAbstractMobileDevice.

Definition at line 348 of file odevice_simpad.cpp.

References qDebug(), Opie::Core::Internal::setCS3Bit(), and SIMPAD_DISPLAY_ON.

bool Opie::Core::Internal::SIMpad::setLedState OLed  l,
OLedState  st
[virtual]
 

Set the state for a LED

Parameters:
which Which OLed to use
st The state to set
Returns:
success or failure

Reimplemented from Opie::Core::ODevice.

Definition at line 297 of file odevice_simpad.cpp.

References Opie::Core::Led_On, Opie::Core::Led_Power, SIMpad::m_leds, Opie::Core::Internal::setCS3Bit(), and SIMPAD_LED2_ON.

bool Opie::Core::Internal::SIMpad::suspend  )  [virtual]
 

This method will try to suspend the device It only works if the user is the QWS Server and the apm application is installed. It tries to suspend and then waits some time cause some distributions do have asynchronus apm implementations. This method will either fail and return false or it'll suspend the device and return once the device got woken up

Returns:
if the device got suspended

Reimplemented from Opie::Core::OAbstractMobileDevice.

Definition at line 331 of file odevice_simpad.cpp.

References Opie::Core::isQWS().

void Opie::Core::Internal::SIMpad::timerEvent QTimerEvent *  te  )  [protected, virtual]
 

Definition at line 308 of file odevice_simpad.cpp.

References Opie::Core::HardKey_Backlight, SIMpad::m_power_timer, and QWSServer::sendKeyEvent().

void Opie::Core::Internal::SIMpad::updateAllWidgets  )  [static, private]
 

Definition at line 386 of file odevice_simpad.cpp.

References list, and wid.


Member Data Documentation

OLedState Opie::Core::Internal::SIMpad::m_leds[2] [protected]
 

Definition at line 67 of file odevice_simpad.h.

int Opie::Core::Internal::SIMpad::m_power_timer [protected]
 

Definition at line 65 of file odevice_simpad.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 18:01:05 2005 for OPIE by  doxygen 1.4.2