Qt 4.8
Public Types | Static Public Functions | Static Public Variables | List of all members
QSysInfo Class Reference

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

#include <qglobal.h>

Public Types

enum  MacVersion {
  MV_Unknown = 0x0000, MV_9 = 0x0001, MV_10_0 = 0x0002, MV_10_1 = 0x0003,
  MV_10_2 = 0x0004, MV_10_3 = 0x0005, MV_10_4 = 0x0006, MV_10_5 = 0x0007,
  MV_10_6 = 0x0008, MV_10_7 = 0x0009, MV_10_8 = 0x000A, MV_10_9 = 0x000B,
  MV_CHEETAH = MV_10_0, MV_PUMA = MV_10_1, MV_JAGUAR = MV_10_2, MV_PANTHER = MV_10_3,
  MV_TIGER = MV_10_4, MV_LEOPARD = MV_10_5, MV_SNOWLEOPARD = MV_10_6, MV_LION = MV_10_7,
  MV_MOUNTAINLION = MV_10_8, MV_MAVERICKS = MV_10_9
}
 This enum provides symbolic names for the various versions of the OS X operating system. More...
 
enum  Sizes { WordSize = (sizeof(void *)<<3) }
 This enum provides platform-specific information about the sizes of data structures used by the underlying architecture. More...
 
enum  WinVersion {
  WV_32s = 0x0001, WV_95 = 0x0002, WV_98 = 0x0003, WV_Me = 0x0004,
  WV_DOS_based = 0x000f, WV_NT = 0x0010, WV_2000 = 0x0020, WV_XP = 0x0030,
  WV_2003 = 0x0040, WV_VISTA = 0x0080, WV_WINDOWS7 = 0x0090, WV_WINDOWS8 = 0x00a0,
  WV_WINDOWS8_1 = 0x00b0, WV_NT_based = 0x00f0, WV_4_0 = WV_NT, WV_5_0 = WV_2000,
  WV_5_1 = WV_XP, WV_5_2 = WV_2003, WV_6_0 = WV_VISTA, WV_6_1 = WV_WINDOWS7,
  WV_6_2 = WV_WINDOWS8, WV_6_3 = WV_WINDOWS8_1, WV_CE = 0x0100, WV_CENET = 0x0200,
  WV_CE_5 = 0x0300, WV_CE_6 = 0x0400, WV_CE_based = 0x0f00
}
 This enum provides symbolic names for the various versions of the Windows operating system. More...
 

Static Public Functions

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

Static Public Variables

static const MacVersion MacintoshVersion = macVersion()
 the version of the Macintosh operating system on which the application is run (Mac only). More...
 
static const WinVersion WindowsVersion
 the version of the Windows operating system on which the application is run (Windows only) More...
 

Detailed Description

The QSysInfo class provides information about the system.

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

Definition at line 1547 of file qglobal.h.

Enumerations

◆ MacVersion

This enum provides symbolic names for the various versions of the OS X operating system.

On OS X, the QSysInfo::MacintoshVersion variable gives the version of the system on which the application is run.

  • MV_9 Mac OS 9 (unsupported)
  • MV_10_0 Mac OS X 10.0 (unsupported)
  • MV_10_1 Mac OS X 10.1 (unsupported)
  • MV_10_2 Mac OS X 10.2 (unsupported)
  • MV_10_3 Mac OS X 10.3
  • MV_10_4 Mac OS X 10.4
  • MV_10_5 Mac OS X 10.5
  • MV_10_6 Mac OS X 10.6
  • MV_10_7 OS X 10.7
  • MV_10_8 OS X 10.8
  • MV_10_9 OS X 10.9
  • MV_Unknown An unknown and currently unsupported platform
  • MV_CHEETAH Apple codename for MV_10_0
  • MV_PUMA Apple codename for MV_10_1
  • MV_JAGUAR Apple codename for MV_10_2
  • MV_PANTHER Apple codename for MV_10_3
  • MV_TIGER Apple codename for MV_10_4
  • MV_LEOPARD Apple codename for MV_10_5
  • MV_SNOWLEOPARD Apple codename for MV_10_6
  • MV_LION Apple codename for MV_10_7
  • MV_MOUNTAINLION Apple codename for MV_10_8
  • MV_MAVERICKS Apple codename for MV_10_9
See also
WinVersion, SymbianVersion
Enumerator
MV_Unknown 
MV_9 
MV_10_0 
MV_10_1 
MV_10_2 
MV_10_3 
MV_10_4 
MV_10_5 
MV_10_6 
MV_10_7 
MV_10_8 
MV_10_9 
MV_CHEETAH 
MV_PUMA 
MV_JAGUAR 
MV_PANTHER 
MV_TIGER 
MV_LEOPARD 
MV_SNOWLEOPARD 
MV_LION 
MV_MOUNTAINLION 
MV_MAVERICKS 

Definition at line 1618 of file qglobal.h.

1618  {
1619  MV_Unknown = 0x0000,
1620 
1621  /* version */
1622  MV_9 = 0x0001,
1623  MV_10_0 = 0x0002,
1624  MV_10_1 = 0x0003,
1625  MV_10_2 = 0x0004,
1626  MV_10_3 = 0x0005,
1627  MV_10_4 = 0x0006,
1628  MV_10_5 = 0x0007,
1629  MV_10_6 = 0x0008,
1630  MV_10_7 = 0x0009,
1631  MV_10_8 = 0x000A,
1632  MV_10_9 = 0x000B,
1633 
1634  /* codenames */
1635  MV_CHEETAH = MV_10_0,
1636  MV_PUMA = MV_10_1,
1637  MV_JAGUAR = MV_10_2,
1638  MV_PANTHER = MV_10_3,
1639  MV_TIGER = MV_10_4,
1640  MV_LEOPARD = MV_10_5,
1642  MV_LION = MV_10_7,
1645  };

◆ Sizes

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

  • WordSize The size in bits of a pointer for the platform on which the application is compiled (32 or 64).
Enumerator
WordSize 

Definition at line 1549 of file qglobal.h.

1549  {
1550  WordSize = (sizeof(void *)<<3)
1551  };

◆ 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:

  • WV_32s Windows 3.1 with Win 32s
  • WV_95 Windows 95
  • WV_98 Windows 98
  • WV_Me Windows Me

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

  • WV_NT Windows NT (operating system version 4.0)
  • WV_2000 Windows 2000 (operating system version 5.0)
  • WV_XP Windows XP (operating system version 5.1)
  • WV_2003 Windows Server 2003, Windows Server 2003 R2, Windows Home Server, Windows XP Professional x64 Edition (operating system version 5.2)
  • WV_VISTA Windows Vista, Windows Server 2008 (operating system version 6.0)
  • WV_WINDOWS7 Windows 7, Windows Server 2008 R2 (operating system version 6.1)
  • WV_WINDOWS8 Windows 8 (operating system version 6.2)
  • WV_WINDOWS8_1 Windows 8.1 (operating system version 6.3), introduced in Qt 4.8.6

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

  • WV_4_0 Operating system version 4.0, corresponds to Windows NT
  • WV_5_0 Operating system version 5.0, corresponds to Windows 2000
  • WV_5_1 Operating system version 5.1, corresponds to Windows XP
  • WV_5_2 Operating system version 5.2, corresponds to Windows Server 2003, Windows Server 2003 R2, Windows Home Server, and Windows XP Professional x64 Edition
  • WV_6_0 Operating system version 6.0, corresponds to Windows Vista and Windows Server 2008
  • WV_6_1 Operating system version 6.1, corresponds to Windows 7 and Windows Server 2008 R2
  • WV_6_2 Operating system version 6.2, corresponds to Windows 8
  • WV_6_3 Operating system version 6.3, corresponds to Windows 8.1, introduced in Qt 4.8.6

CE-based versions:

  • WV_CE Windows CE
  • WV_CENET Windows CE .NET
  • WV_CE_5 Windows CE 5.x
  • WV_CE_6 Windows CE 6.x

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

  • WV_DOS_based MS-DOS-based version of Windows
  • WV_NT_based NT-based version of Windows
  • WV_CE_based CE-based version of Windows
See also
MacVersion, SymbianVersion
Enumerator
WV_32s 
WV_95 
WV_98 
WV_Me 
WV_DOS_based 
WV_NT 
WV_2000 
WV_XP 
WV_2003 
WV_VISTA 
WV_WINDOWS7 
WV_WINDOWS8 
WV_WINDOWS8_1 
WV_NT_based 
WV_4_0 
WV_5_0 
WV_5_1 
WV_5_2 
WV_6_0 
WV_6_1 
WV_6_2 
WV_6_3 
WV_CE 
WV_CENET 
WV_CE_5 
WV_CE_6 
WV_CE_based 

Definition at line 1579 of file qglobal.h.

1579  {
1580  WV_32s = 0x0001,
1581  WV_95 = 0x0002,
1582  WV_98 = 0x0003,
1583  WV_Me = 0x0004,
1584  WV_DOS_based= 0x000f,
1585 
1586  /* codenames */
1587  WV_NT = 0x0010,
1588  WV_2000 = 0x0020,
1589  WV_XP = 0x0030,
1590  WV_2003 = 0x0040,
1591  WV_VISTA = 0x0080,
1592  WV_WINDOWS7 = 0x0090,
1593  WV_WINDOWS8 = 0x00a0,
1594  WV_WINDOWS8_1 = 0x00b0,
1595  WV_NT_based = 0x00f0,
1596 
1597  /* version numbers */
1598  WV_4_0 = WV_NT,
1599  WV_5_0 = WV_2000,
1600  WV_5_1 = WV_XP,
1601  WV_5_2 = WV_2003,
1602  WV_6_0 = WV_VISTA,
1603  WV_6_1 = WV_WINDOWS7,
1604  WV_6_2 = WV_WINDOWS8,
1606 
1607  WV_CE = 0x0100,
1608  WV_CENET = 0x0200,
1609  WV_CE_5 = 0x0300,
1610  WV_CE_6 = 0x0400,
1611  WV_CE_based = 0x0f00
1612  };

Functions

◆ windowsVersion()

QSysInfo::WindowsVersion QSysInfo::windowsVersion ( )
static

Properties

◆ MacintoshVersion

const QSysInfo::MacVersion QSysInfo::MacintoshVersion = macVersion()
static

◆ WindowsVersion

QSysInfo::WindowsVersion
static

The documentation for this class was generated from the following files: