⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qglobal.h

📁 奇趣公司比较新的qt/emd版本
💻 H
📖 第 1 页 / 共 5 页
字号:
#     define QT_FASTCALL#  endif#else#  define QT_FASTCALL#endiftypedef int QNoImplicitBoolCast;#if defined(QT_ARCH_ARM) || (defined(QT_ARCH_MIPS) && !defined(Q_OS_IRIX))#define QT_NO_FPU#endif#if defined(QT_COORD_TYPE)typedef QT_COORD_TYPE qreal;#elif defined(QT_NO_FPU)typedef float qreal;#elsetypedef double qreal;#endif/*   Utility macros and inline functions*/template <typename T>inline T qAbs(const T &t) { return t >= 0 ? t : -t; }inline int qRound(qreal d){ return d >= 0.0 ? int(d + 0.5) : int(d - int(d-1) + 0.5) + int(d-1); }inline qint64 qRound64(qreal d){ return d >= 0.0 ? qint64(d + 0.5) : qint64(d - qint64(d-1) + 0.5) + qint64(d-1); }template <typename T>inline const T &qMin(const T &a, const T &b) { if (a < b) return a; return b; }template <typename T>inline const T &qMax(const T &a, const T &b) { if (a < b) return b; return a; }template <typename T>inline const T &qBound(const T &min, const T &val, const T &max){ return qMax(min, qMin(max, val)); }#ifdef QT3_SUPPORTtypedef qint8 Q_INT8;typedef quint8 Q_UINT8;typedef qint16 Q_INT16;typedef quint16 Q_UINT16;typedef qint32 Q_INT32;typedef quint32 Q_UINT32;typedef qint64 Q_INT64;typedef quint64 Q_UINT64;typedef qint64 Q_LLONG;typedef quint64 Q_ULLONG;#if defined(Q_OS_WIN64)typedef __int64 Q_LONG;             /* word up to 64 bit signed */typedef unsigned __int64 Q_ULONG;   /* word up to 64 bit unsigned */#elsetypedef long Q_LONG;                /* word up to 64 bit signed */typedef unsigned long Q_ULONG;      /* word up to 64 bit unsigned */#endif#  define QABS(a) qAbs(a)#  define QMAX(a, b) qMax((a), (b))#  define QMIN(a, b) qMin((a), (b))#endif/*   Data stream functions are provided by many classes (defined in qdatastream.h)*/class QDataStream;#ifdef Q_OS_DARWIN#  ifdef MAC_OS_X_VERSION_MIN_REQUIRED#    undef MAC_OS_X_VERSION_MIN_REQUIRED#  endif#  define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_3#  include <AvailabilityMacros.h>#  if !defined(MAC_OS_X_VERSION_10_3)#     define MAC_OS_X_VERSION_10_3 MAC_OS_X_VERSION_10_2 + 1#  endif#  if !defined(MAC_OS_X_VERSION_10_4)#       define MAC_OS_X_VERSION_10_4 MAC_OS_X_VERSION_10_3 + 1#  endif#  if !defined(MAC_OS_X_VERSION_10_5)#       define MAC_OS_X_VERSION_10_5 MAC_OS_X_VERSION_10_4 + 1#  endif#  if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5)#    error "This version of Mac OS X is unsupported"#  endif#endif#ifndef QT_BUILD_KEY#define QT_BUILD_KEY "unspecified"#endif#if defined(Q_WS_MAC)#  ifndef QMAC_QMENUBAR_NO_EVENT#    define QMAC_QMENUBAR_NO_EVENT#  endif#endif#if !defined(Q_WS_QWS) && !defined(QT_NO_COP)#  define QT_NO_COP#endif# include <QtCore/qfeatures.h>#ifndef Q_DECL_EXPORT#  ifdef Q_OS_WIN#    define Q_DECL_EXPORT __declspec(dllexport)#  elif defined(QT_VISIBILITY_AVAILABLE)#    define Q_DECL_EXPORT __attribute__((visibility("default")))#  endif#  ifndef Q_DECL_EXPORT#    define Q_DECL_EXPORT#  endif#endif#ifndef Q_DECL_IMPORT#  if defined(Q_OS_WIN)#    define Q_DECL_IMPORT __declspec(dllimport)#  else#    define Q_DECL_IMPORT#  endif#endif/*   Create Qt DLL if QT_DLL is defined (Windows only)*/#if defined(Q_OS_WIN)#  if defined(QT_NODLL)#    undef QT_MAKEDLL#    undef QT_DLL#  elif defined(QT_MAKEDLL)        /* create a Qt DLL library */#    if defined(QT_DLL)#      undef QT_DLL#    endif#    if defined(QT_BUILD_CORE_LIB)#      define Q_CORE_EXPORT Q_DECL_EXPORT#    else#      define Q_CORE_EXPORT Q_DECL_IMPORT#    endif#    if defined(QT_BUILD_GUI_LIB)#      define Q_GUI_EXPORT Q_DECL_EXPORT#    else#      define Q_GUI_EXPORT Q_DECL_IMPORT#    endif#    if defined(QT_BUILD_SQL_LIB)#      define Q_SQL_EXPORT Q_DECL_EXPORT#    else#      define Q_SQL_EXPORT Q_DECL_IMPORT#    endif#    if defined(QT_BUILD_NETWORK_LIB)#      define Q_NETWORK_EXPORT Q_DECL_EXPORT#    else#      define Q_NETWORK_EXPORT Q_DECL_IMPORT#    endif#    if defined(QT_BUILD_SVG_LIB)#      define Q_SVG_EXPORT Q_DECL_EXPORT#    else#      define Q_SVG_EXPORT Q_DECL_IMPORT#    endif#    if defined(QT_BUILD_OPENGL_LIB)#      define Q_OPENGL_EXPORT Q_DECL_EXPORT#    else#      define Q_OPENGL_EXPORT Q_DECL_IMPORT#    endif#    if defined(QT_BUILD_XML_LIB)#      define Q_XML_EXPORT Q_DECL_EXPORT#    else#      define Q_XML_EXPORT Q_DECL_IMPORT#    endif#    if defined(QT_BUILD_SCRIPT_LIB)#      define Q_SCRIPT_EXPORT Q_DECL_EXPORT#    else#      define Q_SCRIPT_EXPORT Q_DECL_IMPORT#    endif#    if defined(QT_BUILD_CANVAS_LIB)#      define Q_CANVAS_EXPORT Q_DECL_EXPORT#    else#      define Q_CANVAS_EXPORT Q_DECL_IMPORT#    endif#    if defined(QT_BUILD_COMPAT_LIB)#      define Q_COMPAT_EXPORT Q_DECL_EXPORT#    else#      define Q_COMPAT_EXPORT Q_DECL_IMPORT#    endif#    define Q_TEMPLATEDLL#  elif defined(QT_DLL) /* use a Qt DLL library */#    define Q_CORE_EXPORT Q_DECL_IMPORT#    define Q_GUI_EXPORT Q_DECL_IMPORT#    define Q_SQL_EXPORT Q_DECL_IMPORT#    define Q_NETWORK_EXPORT Q_DECL_IMPORT#    define Q_SVG_EXPORT Q_DECL_IMPORT#    define Q_CANVAS_EXPORT Q_DECL_IMPORT#    define Q_OPENGL_EXPORT Q_DECL_IMPORT#    define Q_XML_EXPORT Q_DECL_IMPORT#    define Q_SCRIPT_EXPORT Q_DECL_IMPORT#    define Q_COMPAT_EXPORT Q_DECL_IMPORT#    define Q_TEMPLATEDLL#  endif#  define Q_NO_DECLARED_NOT_DEFINED#else#  if defined(Q_OS_LINUX) && defined(Q_CC_BOR)#    define Q_TEMPLATEDLL#    define Q_NO_DECLARED_NOT_DEFINED#  endif#  undef QT_MAKEDLL /* ignore these for other platforms */#  undef QT_DLL#endif#if !defined(Q_CORE_EXPORT)#  if defined(QT_SHARED)#    define Q_CORE_EXPORT Q_DECL_EXPORT#    define Q_GUI_EXPORT Q_DECL_EXPORT#    define Q_SQL_EXPORT Q_DECL_EXPORT#    define Q_NETWORK_EXPORT Q_DECL_EXPORT#    define Q_SVG_EXPORT Q_DECL_EXPORT#    define Q_OPENGL_EXPORT Q_DECL_EXPORT#    define Q_XML_EXPORT Q_DECL_EXPORT#    define Q_SCRIPT_EXPORT Q_DECL_EXPORT#    define Q_COMPAT_EXPORT Q_DECL_EXPORT#  else#    define Q_CORE_EXPORT#    define Q_GUI_EXPORT#    define Q_SQL_EXPORT#    define Q_NETWORK_EXPORT#    define Q_SVG_EXPORT#    define Q_OPENGL_EXPORT#    define Q_XML_EXPORT#    define Q_SCRIPT_EXPORT#    define Q_COMPAT_EXPORT#  endif#endif// Functions marked as Q_GUI_EXPORT_INLINE were exported and inlined by mistake.// Compilers like MinGW complain that the import attribute is ignored.#if defined(Q_CC_MINGW)#    if defined(QT_BUILD_CORE_LIB)#      define Q_CORE_EXPORT_INLINE Q_CORE_EXPORT inline#    else#      define Q_CORE_EXPORT_INLINE inline#    endif#    if defined(QT_BUILD_GUI_LIB)#      define Q_GUI_EXPORT_INLINE Q_GUI_EXPORT inline#    else#      define Q_GUI_EXPORT_INLINE inline#    endif#else#    define Q_CORE_EXPORT_INLINE Q_CORE_EXPORT inline#    define Q_GUI_EXPORT_INLINE Q_GUI_EXPORT inline#endif/*   No, this is not an evil backdoor. QT_BUILD_INTERNAL just exports more symbols   for Trolltech's internal unit tests. If you want slower loading times and more   symbols that can vanish from version to version, feel free to define QT_BUILD_INTERNAL.*/#if defined(QT_BUILD_INTERNAL) && defined(Q_OS_WIN) && defined(QT_MAKEDLL)#    define Q_AUTOTEST_EXPORT Q_DECL_EXPORT#elif defined(QT_BUILD_INTERNAL) && defined(Q_OS_WIN) && defined(QT_DLL)#    define Q_AUTOTEST_EXPORT Q_DECL_IMPORT#elif defined(QT_BUILD_INTERNAL) && !defined(Q_OS_WIN) && defined(QT_SHARED)#    define Q_AUTOTEST_EXPORT Q_DECL_EXPORT#else#    define Q_AUTOTEST_EXPORT#endif/*   System information*/class QString;class Q_CORE_EXPORT QSysInfo {public:    enum Sizes {        WordSize = (sizeof(void *)<<3)    };#if defined(QT_BUILD_QMAKE)    enum Endian {        BigEndian,        LittleEndian    };    /* needed to bootstrap qmake */    static const int ByteOrder;#elif defined(Q_BYTE_ORDER)    enum Endian {        BigEndian,        LittleEndian#  ifdef qdoc        , ByteOrder = <platform-dependent>#  elif Q_BYTE_ORDER == Q_BIG_ENDIAN        , ByteOrder = BigEndian#  elif Q_BYTE_ORDER == Q_LITTLE_ENDIAN        , ByteOrder = LittleEndian#  else#    error "Undefined byte order"#  endif    };#else#  error "Qt not configured correctly, please run configure"#endif#ifdef Q_WS_WIN    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_NT_based = 0x00f0,        WV_CE       = 0x0100,        WV_CENET    = 0x0200,        WV_CE_based = 0x0f00    };    static const WinVersion WindowsVersion;#endif#ifdef Q_OS_MAC    enum MacVersion {        MV_Unknown = 0x0000,        /* version */        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,        /* codenames */        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    };    static const MacVersion MacintoshVersion;#endif};Q_CORE_EXPORT const char *qVersion();Q_CORE_EXPORT bool qSharedBuild();#if defined(Q_OS_MAC)inline int qMacVersion() { return QSysInfo::MacintoshVersion; }#endif#ifdef QT3_SUPPORTinline QT3_SUPPORT bool qSysInfo(int *wordSize, bool *bigEndian){    *wordSize = QSysInfo::WordSize;    *bigEndian = (QSysInfo::ByteOrder == QSysInfo::BigEndian);    return true;}#endif#if defined(Q_WS_WIN)#if defined(QT3_SUPPORT)inline QT3_SUPPORT bool qt_winUnicode() { return !(QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based); }inline QT3_SUPPORT int qWinVersion() { return QSysInfo::WindowsVersion; }#endif#ifdef Q_OS_TEMP#define QT_WA(uni, ansi) uni#define QT_WA_INLINE(uni, ansi) (uni)#elif defined(UNICODE)#define QT_WA(uni, ansi) if (!(QSysInfo::WindowsVersion& QSysInfo::WV_DOS_based)) { uni } else { ansi }#define QT_WA_INLINE(uni, ansi) (!(QSysInfo::WindowsVersion& QSysInfo::WV_DOS_based) ? uni : ansi)#else#define QT_WA(uni, ansi) ansi#define QT_WA_INLINE(uni, ansi) ansi#endif#endif /* Q_WS_WIN */#ifndef Q_OUTOFLINE_TEMPLATE#  define Q_OUTOFLINE_TEMPLATE#endif#ifndef Q_INLINE_TEMPLATE#  define Q_INLINE_TEMPLATE inline#endif#ifndef Q_TYPENAME#  define Q_TYPENAME typename#endif/*   Avoid "unused parameter" warnings*/#if defined(Q_CC_INTEL) && !defined(Q_OS_WIN)template <typename T>inline void qUnused(T &x) { (void)x; }#  define Q_UNUSED(x) qUnused(x);#else#  define Q_UNUSED(x) (void)x;#endif/*   Debugging and error handling*/#if !defined(QT_NO_DEBUG) && !defined(QT_DEBUG)#  define QT_DEBUG

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -