CopperSpice API
1.9.2
|
QSysInfo provides information about the computer where the application is running. More...
Public Types | |
enum | Endian |
enum | MacVersion |
enum | Sizes |
enum | WinVersion |
Static Public Methods | |
static QString | macEdition (MacVersion macVersion) |
static QString | machineHostName () |
static QSysInfo::MacVersion | macVersion () |
static QString | windowsEdition (WinVersion winVersion) |
static WinVersion | windowsVersion () |
Static Public Members | |
static const MacVersion | MacintoshVersion |
static const WinVersion | WindowsVersion |
The QSysInfo class provides operating system information about the computer where the application is running.
This class contains values which are only defined on specific platforms. The preprocessor symbols Q_OS_WIN and Q_OS_DARWIN can be used to test if the application was compiled for a operating system running Windows or Mac OS X.
enum QSysInfo::Endian |
This enum can be used to determine the byte order of memory on the target system.
Constant | Value | Description |
---|---|---|
QSysInfo::BigEndian | 0 | Big-endian byte order (also called Network byte order) |
QSysInfo::LittleEndian | 1 | Little-endian byte order |
QSysInfo::ByteOrder | 0 or 1 | Equal to BigEndian or LittleEndian, depends on the CPU byte order |
enum QSysInfo::MacVersion |
This enum provides symbolic names for the various versions of the Mac OS X operating system. The QSysInfo::MacintoshVersion variable gives the version of the system on which the application is running.
Constant | Value | Description |
---|---|---|
QSysInfo::MV_Unknown | 0x0000 | Unknown platform |
QSysInfo::MV_10_11 | 0x0001 | OS X 10.11 |
QSysInfo::MV_10_12 | 0x0002 | OS X 10.12 |
QSysInfo::MV_10_13 | 0x0003 | OS X 10.13 |
QSysInfo::MV_10_14 | 0x0004 | OS X 10.14 |
QSysInfo::MV_10_15 | 0x0005 | OS X 10.15 |
QSysInfo::MV_10_16 | 0x0006 | OS X 10.16 |
QSysInfo::MV_11 | 0x0006 | OS X 11 |
QSysInfo::MV_12 | 0x0007 | OS X 12 |
QSysInfo::MV_13 | 0x0008 | OS X 13 |
QSysInfo::MV_14 | 0x0009 | OS X 14 |
QSysInfo::MV_ELCAPITAN | MV_10_11 | OS X 10.11 |
QSysInfo::MV_SIERRA | MV_10_12 | OS X 10.12 |
QSysInfo::MV_HIGHSIERRA | MV_10_13 | OS X 10.13 |
QSysInfo::MV_MOJAVE | MV_10_14 | OS X 10.14 |
QSysInfo::MV_CATALINA | MV_10_15 | OS X 10.15 |
QSysInfo::MV_BIGSUR | MV_11 | OS X 11 |
QSysInfo::MV_MONTEREY | MV_12 | OS X 12 |
QSysInfo::MV_VENTURA | MV_13 | OS X 13 |
QSysInfo::MV_SONOMA | MV_14 | OS X 14 |
enum QSysInfo::Sizes |
This enum provides platform specific information about the sizes of data structures used by the underlying architecture.
Constant | Value | Description |
---|---|---|
QSysInfo::WordSize | sizeof(void *) * 8 | Size in bits of a pointer for the platform on which the application is compiled (32 or 64). |
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 running.
Constant | Value | Description |
---|---|---|
QSysInfo::WV_NT | 0x0010 | Windows NT |
QSysInfo::WV_2000 | 0x0020 | Windows 2000 |
QSysInfo::WV_XP | 0x0030 | Windows XP |
QSysInfo::WV_2003 | 0x0040 | Windows Server 2003, Windows Server 2003 R2, Home Server |
QSysInfo::WV_VISTA | 0x0080 | Windows Vista, Windows Server 2008 |
QSysInfo::WV_WINDOWS7 | 0x0090 | Windows 7, Windows Server 2008 R2 |
QSysInfo::WV_WINDOWS8 | 0x00a0 | Windows 8 |
QSysInfo::WV_WINDOWS8_1 | 0x00b0 | Windows 8.1 |
QSysInfo::WV_WINDOWS10 | 0x00c0 | Windows 10.0 |
QSysInfo::WV_WINDOWS11 | 0x00d0 | Windows 11.0 |
Alternatively use the following macros which correspond directly to the Windows operating system version number.
Constant | Value | Description |
---|---|---|
QSysInfo::WV_4_0 | WV_NT | Corresponds to Windows NT |
QSysInfo::WV_5_0 | WV_2000 | Corresponds to Windows 2000 |
QSysInfo::WV_5_1 | WV_XP | Corresponds to Windows XP |
QSysInfo::WV_5_2 | WV_2003 | Corresponds to Windows Server 2003, Windows Server 2003 R2, Home Server |
QSysInfo::WV_6_0 | WV_VISTA | Corresponds to Windows Vista, Windows Server 2008 |
QSysInfo::WV_6_1 | WV_WINDOWS7 | Corresponds to Windows 7, Windows Server 2008 R2 |
QSysInfo::WV_6_2 | WV_WINDOWS8 | Corresponds to Windows 8 |
QSysInfo::WV_6_3 | WV_WINDOWS8_1 | Corresponds to Windows 8.1 |
QSysInfo::WV_10_0 | WV_WINDOWS10 | Corresponds to Windows 10.0 |
QSysInfo::WV_11_0 | WV_WINDOWS11 | Corresponds to Windows 11.0 |
|
static |
Returns the name of the Mac OS X operating system which corresponds to the macVersion (Mac OS X only).
|
static |
Returns the host name for the computer where the application is running. The host name is not guaranteed to be globally unique, especially if they were configured automatically. Equivalent to calling QHostInfo::localHostName().
This method does not guarantee the returned host name is a Fully Qualified Domain Name (FQDN). If this is required use QHostInfo to resolve the FQDN.
|
static |
Returns the version of Mac OS X on which the application is running. Returns MV_None if the operating system is not a version of Darwin (Mac OS X only).
|
static |
Returns the name of the Windows operating system which corresponds to the winVersion (Windows only).
|
static |
Returns the version of the Windows operating system on which the application is running (Windows only).
|
static |
This variable holds the version of the Macintosh operating system on which the application is running (Mac OS X only).
|
static |
This variable holds the version of the Windows operating system on which the application is running (Windows only).