MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

MeeGo::QmDisplayState Class Reference

QmDisplayState Provides information and actions on device display state. More...

Inheritance diagram for MeeGo::QmDisplayState:
Inheritance graph
[legend]
Collaboration diagram for MeeGo::QmDisplayState:
Collaboration graph
[legend]

List of all members.

Public Types

enum   DisplayState { Off = -1, Dimmed = 0, On = 1, Unknown }
 

Possible states for device display.

More...

Signals

void  displayStateChanged (MeeGo::QmDisplayState::DisplayState state)
  Sent when display state has changed.

Public Member Functions

  QmDisplayState (QObject *parent=0)
  ~QmDisplayState ()
DisplayState  get () const
  Gets the current display state.
bool  set (DisplayState state)
  Sets the current display state.
bool  setBlankingPause (void)
  Requests not to blank the display. Must be repeated every 60 seconds to renew request. Also prevents suspending.
bool  cancelBlankingPause (void)
  Cancels an earlier setBlankingPause() call.
int  getMaxDisplayBrightnessValue ()
  Gets the maximum brightness value that can be set.
int  getDisplayBrightnessValue ()
  Gets the current brightness values of the display.
int  getDisplayBlankTimeout ()
  Gets the current display blanking timeout in seconds.
int  getDisplayDimTimeout ()
  Gets the current display dim timeout in seconds.
bool  getBlankingWhenCharging ()
  Gets the blanking state when charging.
void  setDisplayBrightnessValue (int brightness)
  Sets the display brightness value.
void  setDisplayBlankTimeout (int timeout)
  Sets the display blanking timeout.
void  setDisplayDimTimeout (int timeout)
  Sets the display dimming timeout.
void  setBlankingWhenCharging (bool blanking)
  Sets if the screen should be blanked during charging.

Protected Member Functions

void  connectNotify (const char *signal)
void  disconnectNotify (const char *signal)

Properties

DisplayState  state

Detailed Description

QmDisplayState Provides information and actions on device display state.

Scope:
Nokia Meego

Member Enumeration Documentation

Possible states for device display.

Enumerator:
Off 

Display is off.

Dimmed 

Display is dimmed.

On 

Display is on.

Unknown 

Display state is unknown.


Constructor & Destructor Documentation

MeeGo::QmDisplayState::QmDisplayState ( QObject parent = 0  ) 

Constructor

Parameters:
parent  The parent object
MeeGo::QmDisplayState::~QmDisplayState (  ) 

Member Function Documentation

bool MeeGo::QmDisplayState::cancelBlankingPause ( void   ) 

Cancels an earlier setBlankingPause() call.

Returns:
False if a blanking pause cancellation could not be requested
void MeeGo::QmDisplayState::connectNotify ( const char *  signal  )  [protected, virtual]

Reimplemented from QObject.

void MeeGo::QmDisplayState::disconnectNotify ( const char *  signal  )  [protected, virtual]

Reimplemented from QObject.

void MeeGo::QmDisplayState::displayStateChanged ( MeeGo::QmDisplayState::DisplayState  state  )  [signal]

Sent when display state has changed.

Parameters:
state  Current display state
DisplayState MeeGo::QmDisplayState::get (  )  const

Gets the current display state.

Returns:
Current display state
bool MeeGo::QmDisplayState::getBlankingWhenCharging (  ) 

Gets the blanking state when charging.

Returns:
True if blanking is not inhibited during charging, false otherwise.
int MeeGo::QmDisplayState::getDisplayBlankTimeout (  ) 

Gets the current display blanking timeout in seconds.

Returns:
The current display blanking timeout in second. -1, in case of an error.
int MeeGo::QmDisplayState::getDisplayBrightnessValue (  ) 

Gets the current brightness values of the display.

Returns:
The current brightness values of the display. -1, in case of an error.
int MeeGo::QmDisplayState::getDisplayDimTimeout (  ) 

Gets the current display dim timeout in seconds.

Returns:
The current display dimming timeout in seconds. -1, in case of an error.
int MeeGo::QmDisplayState::getMaxDisplayBrightnessValue (  ) 

Gets the maximum brightness value that can be set.

Returns:
The maximum brightness value. -1 is returned in case of an error during retrieving value
bool MeeGo::QmDisplayState::set ( DisplayState  state  ) 

Sets the current display state.

Parameters:
state  Display state new set
Returns:
True if a valid display state was requested, false otherwise
bool MeeGo::QmDisplayState::setBlankingPause ( void   ) 

Requests not to blank the display. Must be repeated every 60 seconds to renew request. Also prevents suspending.

Returns:
False if a blanking pause could not be requested
void MeeGo::QmDisplayState::setBlankingWhenCharging ( bool  blanking  ) 

Sets if the screen should be blanked during charging.

Parameters:
blanking  True if screen should be blanked during charging, false otherwise
void MeeGo::QmDisplayState::setDisplayBlankTimeout ( int  timeout  ) 

Sets the display blanking timeout.

Parameters:
timeout  Timeout to set
void MeeGo::QmDisplayState::setDisplayBrightnessValue ( int  brightness  ) 

Sets the display brightness value.

Parameters:
brightness  New brightness value to set. Must be between 1 and getMaxDisplayBrightnessValue() .
void MeeGo::QmDisplayState::setDisplayDimTimeout ( int  timeout  ) 

Sets the display dimming timeout.

Parameters:
timeout  Timeout to set

Property Documentation

DisplayState MeeGo::QmDisplayState::state [read, write]

(C) 2009-2011 Nokia Corporation
LGPL Lesser General Public License
MeeGo 1.2 Harmattan API