Qt:Документация 4.3.2/qsysinfo

Материал из Wiki.crossplatform.ru

Перейти к: навигация, поиск
40px Внимание: Актуальная версия перевода документации находится здесь

__NOTOC__

Image:qt-logo.png

Главная · Все классы · Основные классы · Классы по группам · Модули · Функции

Image:trolltech-logo.png

Содержание

[править] QSysInfo Class Reference
[модуль QtCore ]

The QSysInfo class provides information about the system. Далее...

 #include <QSysInfo>

[править] Открытые типы

  • enum Endian { BigEndian, LittleEndian, ByteOrder }
  • enum MacVersion { MV_9, MV_10_0, MV_10_1, MV_10_2, ..., MV_LEOPARD }
  • enum Sizes { WordSize }
  • enum WinVersion { WV_32s, WV_95, WV_98, WV_Me, ..., WV_CE_based }

[править] Статические открытые члены


[править] Подробное описание

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.


[править] Описание типов

[править]
enum QSysInfo::Endian

Константа Значение Описание
QSysInfo::BigEndian 0 Big-endian byte order (also called Network byte order)
QSysInfo::LittleEndian 1 Little-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.


Константа Значение Описание
QSysInfo::MV_9 0x0001 Mac OS 9 (unsupported)
QSysInfo::MV_10_0 0x0002 Mac OS X 10.0 (unsupported)
QSysInfo::MV_10_1 0x0003 Mac OS X 10.1 (unsupported)
QSysInfo::MV_10_2 0x0004 Mac OS X 10.2 (unsupported)
QSysInfo::MV_10_3 0x0005 Mac OS X 10.3
QSysInfo::MV_10_4 0x0006 Mac OS X 10.4
QSysInfo::MV_10_5 0x0007 Mac OS X 10.5
QSysInfo::MV_Unknown 0x0000 An unknown and currently unsupported platform
QSysInfo::MV_CHEETAH MV_10_0 Apple codename for MV_10_0
QSysInfo::MV_PUMA MV_10_1 Apple codename for MV_10_1
QSysInfo::MV_JAGUAR MV_10_2 Apple codename for MV_10_2
QSysInfo::MV_PANTHER MV_10_3 Apple codename for MV_10_3
QSysInfo::MV_TIGER MV_10_4 Apple codename for MV_10_4
QSysInfo::MV_LEOPARD MV_10_5 Apple codename for MV_10_5

See also WinVersion.

[править]
enum QSysInfo::Sizes

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


Константа Значение Описание
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::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:


Константа Значение Описание
QSysInfo::WV_32s 0x0001 Windows 3.1 with Win 32s
QSysInfo::WV_95 0x0002 Windows 95
QSysInfo::WV_98 0x0003 Windows 98
QSysInfo::WV_Me 0x0004 Windows Me

NT-based versions:


Константа Значение Описание
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
QSysInfo::WV_VISTA 0x0080 Windows Vista

CE-based versions:


Константа Значение Описание
QSysInfo::WV_CE 0x0100 Windows CE
QSysInfo::WV_CENET 0x0200 Windows CE .NET

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


Константа Значение Описание
QSysInfo::WV_DOS_based 0x000f MS-DOS-based version of Windows
QSysInfo::WV_NT_based 0x00f0 NT-based version of Windows
QSysInfo::WV_CE_based 0x0f00 CE-based version of Windows

See also MacVersion.


[править] 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).



Copyright © 2007 Trolltech Trademarks
Qt 4.3.2