MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

QSystemDisplayInfo Class Reference

The QSystemDisplayInfo class provides access to display information from the system. More...

 #include <QSystemDisplayInfo>

Inherits: QObject.

This class was introduced in Qt Mobility 1.0.

Public Types

enum BacklightState { BacklightStateUnknown, BacklightStateOff, BacklightStateDimmed, BacklightStateOn }
enum DisplayOrientation { Unknown, Landscape, Portrait, InvertedLandscape, InvertedPortrait }

Public Functions

QSystemDisplayInfo ( QObject * parent = 0 )
~QSystemDisplayInfo ()
QSystemDisplayInfo::BacklightState backlightStatus ( int screen )
float contrast ( int screen )
int getDPIHeight ( int screen )
int getDPIWidth ( int screen )
QSystemDisplayInfo::DisplayOrientation orientation ( int screen )
int physicalHeight ( int screen )
int physicalWidth ( int screen )
  • 29 public functions inherited from QObject

Signals

void orientationChanged ( QSystemDisplayInfo::DisplayOrientation orientation )

Static Public Members

int colorDepth ( int screenNumber )
int displayBrightness ( int screenNumber )
  • 4 static public members inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 7 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The QSystemDisplayInfo class provides access to display information from the system.

Warning: This class can only be used from the main thread, since it has been implemented using GUI functionality.

Member Type Documentation

enum QSystemDisplayInfo::BacklightState

This enum describes the state of the Backlight.

Constant Value Description
QSystemDisplayInfo::BacklightStateUnknown -1 Error, no, or unknown Backlight state.
QSystemDisplayInfo::BacklightStateOff 0 Backlight is turned off.
QSystemDisplayInfo::BacklightStateDimmed 1 Backlight has been dimmed.
QSystemDisplayInfo::BacklightStateOn 2 Backlight is on.

enum QSystemDisplayInfo::DisplayOrientation

This enum describes the orientation of the default window.

Constant Value Description
QSystemDisplayInfo::Unknown 0 Unknown orientation or error.
QSystemDisplayInfo::Landscape 1 Landscape is wider than high.
QSystemDisplayInfo::Portrait 2 Portrait is higher than wide.
QSystemDisplayInfo::InvertedLandscape 3 Landscape that is inverted.
QSystemDisplayInfo::InvertedPortrait 4 Portrait that is inverted.

Member Function Documentation

QSystemDisplayInfo::QSystemDisplayInfo ( QObject * parent = 0 )

Constructs a QSystemDisplayInfo object with the given parent.

QSystemDisplayInfo::~QSystemDisplayInfo ()

Destroys the QSystemDisplayInfo object.

QSystemDisplayInfo::BacklightState QSystemDisplayInfo::backlightStatus ( int screen )

Returns whether the QSystemDisplayInfo::BacklightState for the screen screen.

This function was introduced in Qt Mobility 1.2.

int QSystemDisplayInfo::colorDepth ( int screenNumber ) [static]

Returns the color depth of the screen with the index screenNumber, in bits per pixel. -1 is returned if not available or on error.

This function was introduced in Qt Mobility 1.0.

See also QDesktopWidget::screenCount().

float QSystemDisplayInfo::contrast ( int screen )

Returns the current contrast of the screen screen, from 0 to 1. -1 is returned if not available or on error.

This function was introduced in Qt Mobility 1.2.

See also QDesktopWidget::screenCount().

int QSystemDisplayInfo::displayBrightness ( int screenNumber ) [static]

Returns the display brightness of the screen with index screenNumber, in 1 - 100 scale. -1 is returned if not available or on error.

This function was introduced in Qt Mobility 1.0.

See also QDesktopWidget::screenCount().

int QSystemDisplayInfo::getDPIHeight ( int screen )

Returns the dpi (Dot Per Inch) of the height os screen. -1 is returned if not available or on error.

This function was introduced in Qt Mobility 1.2.

See also QDesktopWidget::screenCount().

int QSystemDisplayInfo::getDPIWidth ( int screen )

Returns the current dots per inch (DPI) for the width of screen. -1 is returned if not available or on error.

This function was introduced in Qt Mobility 1.2.

See also QDesktopWidget::screenCount().

QSystemDisplayInfo::DisplayOrientation QSystemDisplayInfo::orientation ( int screen )

Returns the orientation of the UI QDesktopWidget for screen.

This function was introduced in Qt Mobility 1.2.

See also QDesktopWidget::screenCount().

void QSystemDisplayInfo::orientationChanged ( QSystemDisplayInfo::DisplayOrientation orientation ) [signal]

This signal is emitted when QDesktopWidget's orientation has changed to orientation.

int QSystemDisplayInfo::physicalHeight ( int screen )

Returns the physical height of the screen in millimeters. -1 is returned if not available or on error.

This function was introduced in Qt Mobility 1.2.

See also QDesktopWidget::screenCount().

int QSystemDisplayInfo::physicalWidth ( int screen )

Returns the physical width of screen in millimeters. -1 is returned if not available or on error.

This function was introduced in Qt Mobility 1.2.

See also QDesktopWidget::screenCount().