summaryrefslogtreecommitdiff
path: root/libopie/odevice.cpp
Unidiff
Diffstat (limited to 'libopie/odevice.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/odevice.cpp108
1 files changed, 102 insertions, 6 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 9b2a954..8f954b1 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -55,3 +55,3 @@ class ODeviceData {
55public: 55public:
56 bool m_qwsserver; 56 bool m_qwsserver : 1;
57 57
@@ -272,2 +272,5 @@ void ODevice::init ( )
272 272
273/**
274 * This method initialises the button mapping
275 */
273void ODevice::initButtons ( ) 276void ODevice::initButtons ( )
@@ -315,3 +318,13 @@ bool ODevice::setSoftSuspend ( bool /*soft*/ )
315 318
316 319/**
320 * This method will try to suspend the device
321 * It only works if the user is the QWS Server and the apm application
322 * is installed.
323 * It tries to suspend and then waits some time cause some distributions
324 * do have asynchronus apm implementations.
325 * This method will either fail and return false or it'll suspend the
326 * device and return once the device got woken up
327 *
328 * @return if the device got suspended
329 */
317bool ODevice::suspend ( ) 330bool ODevice::suspend ( )
@@ -356,3 +369,5 @@ bool ODevice::suspend ( )
356 369
357 370/**
371 * This sets the display on or off
372 */
358bool ODevice::setDisplayStatus ( bool on ) 373bool ODevice::setDisplayStatus ( bool on )
@@ -372,4 +387,9 @@ bool ODevice::setDisplayStatus ( bool on )
372 387
373bool ODevice::setDisplayBrightness ( int ) 388/**
389 * This sets the display brightness
390 * @return success or failure
391 */
392bool ODevice::setDisplayBrightness ( int p)
374{ 393{
394 Q_UNUSED( p )
375 return false; 395 return false;
@@ -382,2 +402,6 @@ int ODevice::displayBrightnessResolution ( ) const
382 402
403/**
404 * This returns the vendor as string
405 * @return Vendor as QString
406 */
383QString ODevice::vendorString ( ) const 407QString ODevice::vendorString ( ) const
@@ -387,2 +411,6 @@ QString ODevice::vendorString ( ) const
387 411
412/**
413 * This returns the vendor as one of the values of OVendor
414 * @return OVendor
415 */
388OVendor ODevice::vendor ( ) const 416OVendor ODevice::vendor ( ) const
@@ -392,2 +420,6 @@ OVendor ODevice::vendor ( ) const
392 420
421/**
422 * This returns the model as a string
423 * @return A string representing the model
424 */
393QString ODevice::modelString ( ) const 425QString ODevice::modelString ( ) const
@@ -397,2 +429,5 @@ QString ODevice::modelString ( ) const
397 429
430/**
431 * This does return the OModel used
432 */
398OModel ODevice::model ( ) const 433OModel ODevice::model ( ) const
@@ -402,2 +437,5 @@ OModel ODevice::model ( ) const
402 437
438/**
439 * This does return the systen name
440 */
403QString ODevice::systemString ( ) const 441QString ODevice::systemString ( ) const
@@ -407,2 +445,5 @@ QString ODevice::systemString ( ) const
407 445
446/**
447 * Return System as OSystem value
448 */
408OSystem ODevice::system ( ) const 449OSystem ODevice::system ( ) const
@@ -412,2 +453,5 @@ OSystem ODevice::system ( ) const
412 453
454/**
455 * @return the version string of the base system
456 */
413QString ODevice::systemVersionString ( ) const 457QString ODevice::systemVersionString ( ) const
@@ -417,2 +461,5 @@ QString ODevice::systemVersionString ( ) const
417 461
462/**
463 * @return the current Transformation
464 */
418Transformation ODevice::rotation ( ) const 465Transformation ODevice::rotation ( ) const
@@ -422,2 +469,5 @@ Transformation ODevice::rotation ( ) const
422 469
470/**
471 * This plays an alarmSound
472 */
423void ODevice::alarmSound ( ) 473void ODevice::alarmSound ( )
@@ -432,2 +482,5 @@ void ODevice::alarmSound ( )
432 482
483/**
484 * This plays a key sound
485 */
433void ODevice::keySound ( ) 486void ODevice::keySound ( )
@@ -442,2 +495,5 @@ void ODevice::keySound ( )
442 495
496/**
497 * This plays a touch sound
498 */
443void ODevice::touchSound ( ) 499void ODevice::touchSound ( )
@@ -453,3 +509,7 @@ void ODevice::touchSound ( )
453 509
454 510/**
511 * This method will return a list of leds
512 * available on this device
513 * @return a list of LEDs.
514 */
455QValueList <OLed> ODevice::ledList ( ) const 515QValueList <OLed> ODevice::ledList ( ) const
@@ -459,2 +519,5 @@ QValueList <OLed> ODevice::ledList ( ) const
459 519
520/**
521 * This does return the state of the LEDs
522 */
460QValueList <OLedState> ODevice::ledStateList ( OLed /*which*/ ) const 523QValueList <OLedState> ODevice::ledStateList ( OLed /*which*/ ) const
@@ -464,2 +527,5 @@ QValueList <OLedState> ODevice::ledStateList ( OLed /*which*/ ) const
464 527
528/**
529 * @return the state for a given OLed
530 */
465OLedState ODevice::ledState ( OLed /*which*/ ) const 531OLedState ODevice::ledState ( OLed /*which*/ ) const
@@ -469,4 +535,12 @@ OLedState ODevice::ledState ( OLed /*which*/ ) const
469 535
470bool ODevice::setLedState ( OLed /*which*/, OLedState /*st*/ ) 536/**
537 * Set the state for a LED
538 * @param which Which OLed to use
539 * @param st The state to set
540 * @return success or failure
541 */
542bool ODevice::setLedState ( OLed which, OLedState st )
471{ 543{
544 Q_UNUSED( which )
545 Q_UNUSED( st )
472 return false; 546 return false;
@@ -474,2 +548,5 @@ bool ODevice::setLedState ( OLed /*which*/, OLedState /*st*/ )
474 548
549/**
550 * @return if the device has a light sensor
551 */
475bool ODevice::hasLightSensor ( ) const 552bool ODevice::hasLightSensor ( ) const
@@ -479,2 +556,5 @@ bool ODevice::hasLightSensor ( ) const
479 556
557/**
558 * @return a value from the light senso
559 */
480int ODevice::readLightSensor ( ) 560int ODevice::readLightSensor ( )
@@ -484,2 +564,5 @@ int ODevice::readLightSensor ( )
484 564
565/**
566 * @return the light sensor resolution whatever that is ;)
567 */
485int ODevice::lightSensorResolution ( ) const 568int ODevice::lightSensorResolution ( ) const
@@ -489,2 +572,5 @@ int ODevice::lightSensorResolution ( ) const
489 572
573/**
574 * @return a list of hardware buttons
575 */
490const QValueList <ODeviceButton> &ODevice::buttons ( ) 576const QValueList <ODeviceButton> &ODevice::buttons ( )
@@ -496,2 +582,5 @@ const QValueList <ODeviceButton> &ODevice::buttons ( )
496 582
583/**
584 * @return The amount of time that would count as a hold
585 */
497uint ODevice::buttonHoldTime ( ) const 586uint ODevice::buttonHoldTime ( ) const
@@ -501,2 +590,9 @@ uint ODevice::buttonHoldTime ( ) const
501 590
591/**
592 * This method return a ODeviceButton for a key code
593 * or 0 if no special hardware button is available for the device
594 *
595 * @return The devicebutton or 0l
596 * @see ODeviceButton
597 */
502const ODeviceButton *ODevice::buttonForKeycode ( ushort code ) 598const ODeviceButton *ODevice::buttonForKeycode ( ushort code )