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

Opie::Core::Internal::Zaurus Class Reference

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

Inheritance diagram for Opie::Core::Internal::Zaurus:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual bool setDisplayBrightness (int b)
virtual bool setDisplayStatus (bool on)
virtual int displayBrightnessResolution () const
virtual void playAlarmSound ()
virtual void playKeySound ()
virtual void playTouchSound ()
virtual QValueList< OLedledList () const
virtual QValueList< OLedStateledStateList (OLed led) const
virtual OLedState ledState (OLed led) const
virtual bool setLedState (OLed led, OLedState st)
virtual bool hasHingeSensor () const
virtual OHingeStatus readHingeSensor () const
virtual Transformation rotation () const
virtual ODirection direction () const
virtual bool suspend ()

Protected Slots

void hingeSensorTriggered ()
void systemMessage (const QCString &msg, const QByteArray &)

Protected Member Functions

virtual void init (const QString &)
virtual void initButtons ()
void initHingeSensor ()
virtual void buzzer (int snd)
virtual bool filter (int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat)

Protected Attributes

QString m_backlightdev
OLedState m_leds [1]
bool m_embedix
QFile m_hinge

Member Function Documentation

void Zaurus::buzzer int  snd  )  [protected, virtual]
 

Definition at line 347 of file odevice_zaurus.cpp.

References Opie::Core::ODevice::changeMixerForAlarm(), Opie::Core::ODevice::d, Sound::isFinished(), Opie::Core::ODeviceData::m_model, Opie::Core::Model_Zaurus_SL5000, Opie::Core::Model_Zaurus_SL5500, Sound::play(), SHARP_BUZ_KEYSOUND, SHARP_BUZ_SCHEDULE_ALARM, SHARP_BUZ_TOUCHSOUND, SHARP_BUZZER_MAKESOUND, and snd.

Referenced by playAlarmSound(), playKeySound(), and playTouchSound().

ODirection Zaurus::direction  )  const [virtual]
 

Returns:
the current rotation direction

Reimplemented from Opie::Core::ODevice.

Definition at line 609 of file odevice_zaurus.cpp.

References Opie::Core::CASE_PORTRAIT, Opie::Core::CASE_UNKNOWN, Opie::Core::CCW, Opie::Core::CW, Opie::Core::ODevice::d, Opie::Core::ODeviceData::m_direction, Opie::Core::ODeviceData::m_model, Opie::Core::Model_Zaurus_SL5000, Opie::Core::Model_Zaurus_SL5500, Opie::Core::Model_Zaurus_SL6000, Opie::Core::Model_Zaurus_SLA300, Opie::Core::Model_Zaurus_SLB600, Opie::Core::Model_Zaurus_SLC1000, Opie::Core::Model_Zaurus_SLC3000, Opie::Core::Model_Zaurus_SLC3100, Opie::Core::Model_Zaurus_SLC7x0, and readHingeSensor().

Referenced by init().

int Zaurus::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 469 of file odevice_zaurus.cpp.

References buf, m_backlightdev, m_embedix, SHARP_FL_IOCTL_DEVICE, and SHARP_FL_IOCTL_GET_STEP.

Referenced by setDisplayBrightness().

bool Zaurus::filter int  unicode,
int  keycode,
int  modifiers,
bool  isPress,
bool  autoRepeat
[protected, virtual]
 

Reimplemented from QWSServer::KeyboardFilter.

Definition at line 749 of file odevice_zaurus.cpp.

References hasHingeSensor(), Rot90, rotation(), and QWSServer::sendKeyEvent().

bool Zaurus::hasHingeSensor  )  const [virtual]
 

Returns:
if the device has a hinge sensor

Reimplemented from Opie::Core::ODevice.

Definition at line 636 of file odevice_zaurus.cpp.

References Opie::Core::ODevice::d, Opie::Core::ODeviceData::m_model, Opie::Core::Model_Zaurus_SLC1000, Opie::Core::Model_Zaurus_SLC3000, Opie::Core::Model_Zaurus_SLC3100, and Opie::Core::Model_Zaurus_SLC7x0.

Referenced by filter().

void Zaurus::hingeSensorTriggered  )  [protected, slot]
 

Definition at line 721 of file odevice_zaurus.cpp.

References Opie::Core::CASE_UNKNOWN, input_event::code, EV_SW, QFile::handle(), m_hinge, qDebug(), readHingeSensor(), QCopChannel::send(), input_event::type, and input_event::value.

Referenced by initHingeSensor().

void Zaurus::init const QString  )  [protected, virtual]
 

Reimplemented from Opie::Core::ODevice.

Definition at line 158 of file odevice_zaurus.cpp.

References QString::contains(), Opie::Core::ODevice::d, direction(), f, QString::find(), initHingeSensor(), IO_ReadOnly, Opie::Core::Led_Off, loc, m_backlightdev, Opie::Core::ODeviceData::m_direction, m_embedix, m_leds, Opie::Core::ODeviceData::m_model, Opie::Core::ODeviceData::m_modelstr, Opie::Core::ODeviceData::m_qteDriver, Opie::Core::ODeviceData::m_rotation, Opie::Core::ODeviceData::m_system, Opie::Core::ODeviceData::m_systemstr, Opie::Core::ODeviceData::m_sysverstr, Opie::Core::ODeviceData::m_vendor, Opie::Core::ODeviceData::m_vendorstr, QString::mid(), Opie::Core::ODevice::model(), Opie::Core::Model_Zaurus_SL5000, Opie::Core::Model_Zaurus_SL5500, Opie::Core::Model_Zaurus_SL6000, Opie::Core::Model_Zaurus_SLA300, Opie::Core::Model_Zaurus_SLB600, Opie::Core::Model_Zaurus_SLC1000, Opie::Core::Model_Zaurus_SLC3000, Opie::Core::Model_Zaurus_SLC3100, Opie::Core::Model_Zaurus_SLC7x0, QFile::open(), qDebug(), QTextStream::readLine(), Rot0, Rot270, rotation(), Opie::Core::OAbstractMobileDevice::setAPMTimeOut(), QString::startsWith(), Opie::Core::System_OpenZaurus, Opie::Core::System_Zaurus, and Opie::Core::Vendor_Sharp.

void Zaurus::initButtons  )  [protected, virtual]
 

This method initialises the button mapping

Reimplemented from Opie::Core::ODevice.

Definition at line 292 of file odevice_zaurus.cpp.

References Opie::Core::ODevice::addPreHandler(), QValueList< T >::append(), ARRAY_SIZE, Opie::Core::Internal::z_button::code, Opie::Core::ODevice::d, Opie::Core::Internal::z_button::fheldaction, Opie::Core::Internal::z_button::fheldservice, Opie::Core::Internal::z_button::fpressedaction, Opie::Core::Internal::z_button::fpressedservice, i, Opie::Core::isQWS(), Opie::Core::OResource::loadPixmap(), Opie::Core::ODeviceData::m_buttons, Opie::Core::ODeviceData::m_model, Opie::Core::makeChannel(), Opie::Core::Model_Zaurus_SL6000, Opie::Core::Model_Zaurus_SLC1000, Opie::Core::Model_Zaurus_SLC3000, Opie::Core::Model_Zaurus_SLC3100, Opie::Core::Model_Zaurus_SLC7x0, Opie::Core::Internal::z_button::pix, qDebug(), Opie::Core::ODevice::reloadButtonMapping(), tr, and Opie::Core::Internal::z_button::utext.

void Zaurus::initHingeSensor  )  [protected]
 

Definition at line 704 of file odevice_zaurus.cpp.

References QFile::handle(), hingeSensorTriggered(), IO_ReadOnly, m_embedix, m_hinge, QFile::open(), qDebug(), qWarning(), and QFile::setName().

Referenced by init().

QValueList< OLed > Zaurus::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 411 of file odevice_zaurus.cpp.

References Opie::Core::Led_Mail.

OLedState Zaurus::ledState OLed  which  )  const [virtual]
 

Returns:
the state for a given OLed

Reimplemented from Opie::Core::ODevice.

Definition at line 427 of file odevice_zaurus.cpp.

References Opie::Core::Led_Mail, Opie::Core::Led_Off, and m_leds.

QValueList< OLedState > Zaurus::ledStateList OLed  l  )  const [virtual]
 

This does return the state of the LEDs

Reimplemented from Opie::Core::ODevice.

Definition at line 418 of file odevice_zaurus.cpp.

References Opie::Core::Led_BlinkSlow, Opie::Core::Led_Mail, Opie::Core::Led_Off, and Opie::Core::Led_On.

void Zaurus::playAlarmSound  )  [virtual]
 

This plays an alarm sound

Reimplemented from Opie::Core::ODevice.

Definition at line 395 of file odevice_zaurus.cpp.

References buzzer(), and SHARP_BUZ_SCHEDULE_ALARM.

void Zaurus::playKeySound  )  [virtual]
 

This plays a key sound

Reimplemented from Opie::Core::ODevice.

Definition at line 405 of file odevice_zaurus.cpp.

References buzzer(), and SHARP_BUZ_KEYSOUND.

void Zaurus::playTouchSound  )  [virtual]
 

This plays a touch sound

Reimplemented from Opie::Core::ODevice.

Definition at line 400 of file odevice_zaurus.cpp.

References buzzer(), and SHARP_BUZ_TOUCHSOUND.

OHingeStatus Zaurus::readHingeSensor  )  const [virtual]
 

Returns:
a value from the hinge sensor

Reimplemented from Opie::Core::ODevice.

Definition at line 644 of file odevice_zaurus.cpp.

References Opie::Core::CASE_CLOSED, Opie::Core::CASE_LANDSCAPE, Opie::Core::CASE_PORTRAIT, Opie::Core::CASE_UNKNOWN, Opie::Core::OInputSystem::instance(), Opie::Core::OInputDevice::isHeld(), m_embedix, qDebug(), qWarning(), SHARP_IOCTL_GET_ROTATION, Switch0, and Switch1.

Referenced by direction(), hingeSensorTriggered(), and rotation().

Transformation Zaurus::rotation  )  const [virtual]
 

Returns:
the current Transformation

Reimplemented from Opie::Core::ODevice.

Definition at line 557 of file odevice_zaurus.cpp.

References Opie::Core::CASE_PORTRAIT, Opie::Core::CASE_UNKNOWN, Opie::Core::ODevice::d, m_embedix, Opie::Core::ODeviceData::m_model, Opie::Core::ODeviceData::m_rotation, Opie::Core::Model_Zaurus_SL5000, Opie::Core::Model_Zaurus_SL5500, Opie::Core::Model_Zaurus_SL6000, Opie::Core::Model_Zaurus_SLA300, Opie::Core::Model_Zaurus_SLB600, Opie::Core::Model_Zaurus_SLC1000, Opie::Core::Model_Zaurus_SLC3000, Opie::Core::Model_Zaurus_SLC3100, Opie::Core::Model_Zaurus_SLC7x0, qDebug(), readHingeSensor(), Rot0, Rot270, and Rot90.

Referenced by filter(), and init().

bool Zaurus::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 495 of file odevice_zaurus.cpp.

References buf, displayBrightnessResolution(), len, m_backlightdev, m_embedix, SHARP_FL_IOCTL_DEVICE, SHARP_FL_IOCTL_STEP_CONTRAST, val, and write().

bool Zaurus::setDisplayStatus bool  on  )  [virtual]
 

This sets the display on or off

Reimplemented from Opie::Core::OAbstractMobileDevice.

Definition at line 529 of file odevice_zaurus.cpp.

References buf, FB_BLANK_POWERDOWN, FB_BLANK_UNBLANK, m_backlightdev, m_embedix, SHARP_FL_IOCTL_DEVICE, SHARP_FL_IOCTL_OFF, SHARP_FL_IOCTL_ON, and write().

bool Zaurus::setLedState OLed  which,
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 435 of file odevice_zaurus.cpp.

References Opie::Core::Led_BlinkSlow, Opie::Core::Led_Mail, LED_MAIL_NEWMAIL_EXISTS, LED_MAIL_NO_UNREAD_MAIL, LED_MAIL_UNREAD_MAIL_EX, Opie::Core::Led_Off, Opie::Core::Led_On, m_embedix, m_leds, qDebug(), SHARP_LED_MAIL_EXISTS, SHARP_LED_SETSTATUS, and sharp_led_status::status.

bool Zaurus::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 779 of file odevice_zaurus.cpp.

References Opie::Core::isQWS(), m_embedix, Opie::Core::OAbstractMobileDevice::m_timeOut, QCopChannel::send(), and Opie::Core::ODevice::system().

void Zaurus::systemMessage const QCString msg,
const QByteArray
[protected, slot]
 

Reimplemented from Opie::Core::ODevice.

Definition at line 737 of file odevice_zaurus.cpp.

References Opie::Core::ODevice::reloadButtonMapping().


Member Data Documentation

QString Opie::Core::Internal::Zaurus::m_backlightdev [protected]
 

Definition at line 136 of file odevice_zaurus.h.

Referenced by displayBrightnessResolution(), init(), setDisplayBrightness(), and setDisplayStatus().

bool Opie::Core::Internal::Zaurus::m_embedix [protected]
 

Definition at line 138 of file odevice_zaurus.h.

Referenced by displayBrightnessResolution(), init(), initHingeSensor(), readHingeSensor(), rotation(), setDisplayBrightness(), setDisplayStatus(), setLedState(), and suspend().

QFile Opie::Core::Internal::Zaurus::m_hinge [protected]
 

Definition at line 139 of file odevice_zaurus.h.

Referenced by hingeSensorTriggered(), and initHingeSensor().

OLedState Opie::Core::Internal::Zaurus::m_leds[1] [protected]
 

Definition at line 137 of file odevice_zaurus.h.

Referenced by init(), ledState(), and setLedState().


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