Home · All Classes · All Functions ·

QSystemInfo Class Reference

The QSystemInfo class provides access to various general information from the system. More...

    #include <QSystemInfo>

Inherits QObject.


Public Types

enum Feature { BluetoothFeature, CameraFeature, FmradioFeature, IrFeature, ..., HapticsFeature }
enum Version { Os, QtCore, Firmware }

Properties


Public Functions

QSystemInfo ( QObject * parent = 0 )
virtual ~QSystemInfo ()
bool hasFeatureSupported ( QSystemInfo::Feature feature )
QString version ( QSystemInfo::Version type, const QString & parameter = QString() )

Signals

void currentLanguageChanged ( const QString & lang )

Static Public Members

QStringList availableLanguages ()
QString currentCountryCode ()
QString currentLanguage ()

Additional Inherited Members


Detailed Description

The QSystemInfo class provides access to various general information from the system.

In the future, parts of the QtSystemInfo API may be moved and renamed into an existing Qt class that provides similiar functionality.

Class
QSystemInfo::currentLanguage
QSystemInfo::availableLanguages
QSystemInfo::currentCountryCode
QSystemDisplayInfo::displayBrightness
QSystemDisplayInfo::colorDepth
QSystemScreenSaver::screenSaverInhibited
QSystemScreenSaver::setScreenSaverInhibit

Platform notes Some functionality may or may not be supported on various platforms. Depending on if there is a reliable way to gather such information.


Member Type Documentation

enum QSystemInfo::Feature

This enum describes the features of the device or computer.

ConstantValueDescription
QSystemInfo::BluetoothFeature0Bluetooth feature available.
QSystemInfo::CameraFeature1Camera feature available.
QSystemInfo::FmradioFeature2FM Radio feature available.
QSystemInfo::IrFeature3Infrared feature available.
QSystemInfo::LedFeature4LED's feature available.
QSystemInfo::MemcardFeature5Memory card feature available.
QSystemInfo::UsbFeature6Universal System Bus (USB) feature available.
QSystemInfo::VibFeature7Vibration feature available.
QSystemInfo::WlanFeature8Wireless Local Area Network (WLAN) feature available.
QSystemInfo::SimFeature9Subscriber Identity Module (SIM) available.
QSystemInfo::LocationFeature10Global Positioning System (GPS) and/or other location feature available.
QSystemInfo::VideoOutFeature11Video out feature available.
QSystemInfo::HapticsFeature12Haptics feature available.

enum QSystemInfo::Version

This enum describes the version component.

ConstantValueDescription
QSystemInfo::Os1Operating system version / platform ID.
QSystemInfo::QtCore2Qt libs version.
QSystemInfo::Firmware3Version of (flashable) system as a whole.


Property Documentation

availableLanguages : const QStringList

This property holds list of available languages.

Returns a QStringList of available Qt language translations in 2 letter ISO 639-1 format. If the Qt translations cannot be found, returns the current system language.

Access functions:

QStringList availableLanguages ()

currentCountryCode : const QString

This property holds the current locale country code.

Returns the 2 letter ISO 3166-1 for the current country code.

Access functions:

QString currentCountryCode ()

currentLanguage : const QString

This property holds the current Language Returns the current language in 2 letter ISO 639-1 format.

Access functions:

QString currentLanguage ()

Member Function Documentation

QSystemInfo::QSystemInfo ( QObject * parent = 0 )

Constructs a QSystemInfo object with the given parent.

QSystemInfo::~QSystemInfo ()   [virtual]

Destroys the QSystemInfo object

void QSystemInfo::currentLanguageChanged ( const QString & lang )   [signal]

This signal is emitted whenever the current language changes, specified by lang, which is in 2 letter, ISO 639-1 specification form.

bool QSystemInfo::hasFeatureSupported ( QSystemInfo::Feature feature )

Returns true if the QSystemInfo::Feature feature is supported, otherwise false.

QString QSystemInfo::version ( QSystemInfo::Version type, const QString & parameter = QString() )

Returns the version of QSystemInfo::Version type, with optional platform dependent parameter as a string.

Version will be returned in "major.minor.build" form.

In case a particular version does not use the "build" part, it is set to 0. If a particular element is not available at all, an error "Not Installed" will be returned by the API.


Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Mobility Project 1.0.0