Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QSysInfo Class Reference

The QSysInfo class provides information about the system. More...

 #include <QSysInfo>

Public Types

enum Endian { BigEndian, LittleEndian, ByteOrder }
enum MacVersion { MV_9, MV_10_0, MV_10_1, MV_10_2, ..., MV_LION }
enum S60Version { SV_S60_3_1, SV_S60_3_2, SV_S60_5_0, SV_S60_5_1, ..., SV_S60_Unknown }
enum Sizes { WordSize }
enum SymbianVersion { SV_9_2, SV_9_3, SV_9_4, SV_SF_1, ..., SV_Unknown }
enum WinVersion { WV_32s, WV_95, WV_98, WV_Me, ..., WV_CE_based }

Static Public Members

const MacVersion MacintoshVersion
const WinVersion WindowsVersion
S60Version s60Version ()
SymbianVersion symbianVersion ()
WinVersion windowsVersion ()

Detailed Description

The QSysInfo class provides information about the system.

  • WordSize specifies the size of a pointer for the platform on which the application is compiled.
  • ByteOrder specifies whether the platform is big-endian or little-endian.
  • WindowsVersion specifies the version of the Windows operating system on which the application is run (Windows only)
  • MacintoshVersion specifies the version of the Macintosh operating system on which the application is run (Mac only).

Some constants are defined only on certain platforms. You can use the preprocessor symbols Q_WS_WIN and Q_WS_MAC to test that the application is compiled under Windows or Mac.

See also QLibraryInfo.

Member Type Documentation

enum QSysInfo::Endian

ConstantValueDescription
QSysInfo::BigEndian0Big-endian byte order (also called Network byte order)
QSysInfo::LittleEndian1Little-endian byte order
QSysInfo::ByteOrder<platform-dependent>Equals BigEndian or LittleEndian, depending on the platform's byte order.

enum QSysInfo::MacVersion

This enum provides symbolic names for the various versions of the Macintosh operating system. On Mac, the QSysInfo::MacintoshVersion variable gives the version of the system on which the application is run.

ConstantValueDescription
QSysInfo::MV_90x0001Mac OS 9 (unsupported)
QSysInfo::MV_10_00x0002Mac OS X 10.0 (unsupported)
QSysInfo::MV_10_10x0003Mac OS X 10.1 (unsupported)
QSysInfo::MV_10_20x0004Mac OS X 10.2 (unsupported)
QSysInfo::MV_10_30x0005Mac OS X 10.3
QSysInfo::MV_10_40x0006Mac OS X 10.4
QSysInfo::MV_10_50x0007Mac OS X 10.5
QSysInfo::MV_10_60x0008Mac OS X 10.6
QSysInfo::MV_10_70x0009Mac OS X 10.7
QSysInfo::MV_Unknown0x0000An unknown and currently unsupported platform
QSysInfo::MV_CHEETAHMV_10_0Apple codename for MV_10_0
QSysInfo::MV_PUMAMV_10_1Apple codename for MV_10_1
QSysInfo::MV_JAGUARMV_10_2Apple codename for MV_10_2
QSysInfo::MV_PANTHERMV_10_3Apple codename for MV_10_3
QSysInfo::MV_TIGERMV_10_4Apple codename for MV_10_4
QSysInfo::MV_LEOPARDMV_10_5Apple codename for MV_10_5
QSysInfo::MV_SNOWLEOPARDMV_10_6Apple codename for MV_10_6
QSysInfo::MV_LIONMV_10_7Apple codename for MV_10_7

See also WinVersion and SymbianVersion.

enum QSysInfo::S60Version

This enum provides symbolic names for the various versions of the S60 SDK. On S60, the QSysInfo::s60Version() function gives the version of the SDK on which the application is run.

ConstantValueDescription
QSysInfo::SV_S60_3_1SV_9_2S60 3rd Edition Feature Pack 1
QSysInfo::SV_S60_3_2SV_9_3S60 3rd Edition Feature Pack 2
QSysInfo::SV_S60_5_0SV_9_4S60 5th Edition
QSysInfo::SV_S60_5_1SV_SF_2This enum value is deprecated.
QSysInfo::SV_S60_5_2SV_SF_3Symbian^3 and Symbian Anna
QSysInfo::SV_S60_5_3SV_API_5_3Symbian/S60 API version 5.3 release
QSysInfo::SV_S60_5_4SV_API_5_4Symbian/S60 API version 5.4 release
QSysInfo::SV_S60_UnknownSV_UnknownAn unknown and currently unsupported platform

See also SymbianVersion, WinVersion, and MacVersion.

enum QSysInfo::Sizes

This enum provides platform-specific information about the sizes of data structures used by the underlying architecture.

ConstantValueDescription
QSysInfo::WordSize( sizeof( void * ) <<3 )The size in bits of a pointer for the platform on which the application is compiled (32 or 64).

enum QSysInfo::SymbianVersion

This enum provides symbolic names for the various versions of the Symbian operating system. On Symbian, the QSysInfo::symbianVersion() function gives the version of the system on which the application is run.

ConstantValueDescription
QSysInfo::SV_9_210Symbian OS v9.2
QSysInfo::SV_9_320Symbian OS v9.3
QSysInfo::SV_9_430Symbian OS v9.4
QSysInfo::SV_SF_1SV_9_4S60 5th Edition (Symbian^1)
QSysInfo::SV_SF_240Symbian^2
QSysInfo::SV_SF_350Symbian^3 or Symbian Anna
QSysInfo::SV_SF_460This enum value is deprecated.
QSysInfo::SV_API_5_370Symbian/S60 API version 5.3 release
QSysInfo::SV_API_5_480Symbian/S60 API version 5.4 release
QSysInfo::SV_Unknown1000000An unknown and currently unsupported platform

See also S60Version, WinVersion, and MacVersion.

enum QSysInfo::WinVersion

This enum provides symbolic names for the various versions of the Windows operating system. On Windows, the QSysInfo::WindowsVersion variable gives the version of the system on which the application is run.

MS-DOS-based versions:

ConstantValueDescription
QSysInfo::WV_32s0x0001Windows 3.1 with Win 32s
QSysInfo::WV_950x0002Windows 95
QSysInfo::WV_980x0003Windows 98
QSysInfo::WV_Me0x0004Windows Me

NT-based versions (note that each operating system version is only represented once rather than each Windows edition):

ConstantValueDescription
QSysInfo::WV_NT0x0010Windows NT (operating system version 4.0)
QSysInfo::WV_20000x0020Windows 2000 (operating system version 5.0)
QSysInfo::WV_XP0x0030Windows XP (operating system version 5.1)
QSysInfo::WV_20030x0040Windows Server 2003, Windows Server 2003 R2, Windows Home Server, Windows XP Professional x64 Edition (operating system version 5.2)
QSysInfo::WV_VISTA0x0080Windows Vista, Windows Server 2008 (operating system version 6.0)
QSysInfo::WV_WINDOWS70x0090Windows 7, Windows Server 2008 R2 (operating system version 6.1)

Alternatively, you may use the following macros which correspond directly to the Windows operating system version number:

ConstantValueDescription
QSysInfo::WV_4_0WV_NTOperating system version 4.0, corresponds to Windows NT
QSysInfo::WV_5_0WV_2000Operating system version 5.0, corresponds to Windows 2000
QSysInfo::WV_5_1WV_XPOperating system version 5.1, corresponds to Windows XP
QSysInfo::WV_5_2WV_2003Operating system version 5.2, corresponds to Windows Server 2003, Windows Server 2003 R2, Windows Home Server, and Windows XP Professional x64 Edition
QSysInfo::WV_6_0WV_VISTAOperating system version 6.0, corresponds to Windows Vista and Windows Server 2008
QSysInfo::WV_6_1WV_WINDOWS7Operating system version 6.1, corresponds to Windows 7 and Windows Server 2008 R2

CE-based versions:

ConstantValueDescription
QSysInfo::WV_CE0x0100Windows CE
QSysInfo::WV_CENET0x0200Windows CE .NET
QSysInfo::WV_CE_50x0300Windows CE 5.x
QSysInfo::WV_CE_60x0400Windows CE 6.x

The following masks can be used for testing whether a Windows version is MS-DOS-based, NT-based, or CE-based:

ConstantValueDescription
QSysInfo::WV_DOS_based0x000fMS-DOS-based version of Windows
QSysInfo::WV_NT_based0x00f0NT-based version of Windows
QSysInfo::WV_CE_based0x0f00CE-based version of Windows

See also MacVersion and SymbianVersion.

Member Function Documentation

S60Version QSysInfo::s60Version () [static]

Returns the version of the S60 SDK system on which the application is run (S60 only).

This function was introduced in Qt 4.6.

SymbianVersion QSysInfo::symbianVersion () [static]

Returns the version of the Symbian operating system on which the application is run (Symbian only).

This function was introduced in Qt 4.6.

WinVersion QSysInfo::windowsVersion () [static]

Returns the version of the Windows operating system on which the application is run (Windows only).

This function was introduced in Qt 4.4.

Member Variable Documentation

const MacVersion QSysInfo::MacintoshVersion

This variable holds the version of the Macintosh operating system on which the application is run (Mac only).

const WinVersion QSysInfo::WindowsVersion

This variable holds the version of the Windows operating system on which the application is run (Windows only).

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 4.8
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web