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

📄 qglobal.h

📁 QT 开发环境里面一个很重要的文件
💻 H
📖 第 1 页 / 共 4 页
字号:
#  else#    define Q_CC_HP#    define Q_NO_BOOL_TYPE#    define Q_FULL_TEMPLATE_INSTANTIATION#    define Q_BROKEN_TEMPLATE_SPECIALIZATION#    define Q_NO_EXPLICIT_KEYWORD#  endif#  define Q_NO_USING_KEYWORD /* ### check "using" status */#else#  error "Qt has not been tested with this compiler - talk to qt-bugs@trolltech.com"#endif#ifndef Q_PACKED#  define Q_PACKED#  undef Q_NO_PACKED_REFERENCE#endif#ifndef Q_CONSTRUCTOR_FUNCTION# define Q_CONSTRUCTOR_FUNCTION(AFUNC) \   static const int AFUNC ## __init_variable__ = AFUNC();#endif#ifndef Q_DESTRUCTOR_FUNCTION# define Q_DESTRUCTOR_FUNCTION(AFUNC) \    class AFUNC ## __dest_class__ { \    public: \       inline AFUNC ## __dest_class__() { } \       inline ~ AFUNC ## __dest_class__() { AFUNC(); } \    } AFUNC ## __dest_instance__;#endif#ifndef Q_REQUIRED_RESULT#  if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1))#    define Q_REQUIRED_RESULT __attribute__ ((warn_unused_result))#  else#    define Q_REQUIRED_RESULT#  endif#endif/*   The window system, must be one of: (Q_WS_x)     MACX     - Mac OS X     MAC9     - Mac OS 9     QWS      - Qtopia Core     WIN32    - Windows     X11      - X Window System     PM       - unsupported     WIN16    - unsupported*/#if defined(Q_OS_MSDOS)#  define Q_WS_WIN16#  error "Qt requires Win32 and does not work with Windows 3.x"#elif defined(_WIN32_X11_)#  define Q_WS_X11#elif defined(Q_OS_WIN32)#  define Q_WS_WIN32#  if defined(Q_OS_WIN64)#    define Q_WS_WIN64#  endif#elif defined(Q_OS_OS2)#  define Q_WS_PM#  error "Qt does not work with OS/2 Presentation Manager or Workplace Shell"#elif defined(Q_OS_UNIX)#  if defined(Q_OS_DARWIN) && !defined(__USE_WS_X11__)#    define Q_WS_MAC#    define Q_WS_MACX#  elif !defined(Q_WS_QWS)#    define Q_WS_X11#  endif#endif#if defined(Q_WS_WIN16) || defined(Q_WS_WIN32)#  define Q_WS_WIN#endif/*   Size-dependent types (architechture-dependent byte order)   Make sure to update QMetaType when changing these typedefs*/typedef signed char qint8;         /* 8 bit signed */typedef unsigned char quint8;      /* 8 bit unsigned */typedef short qint16;              /* 16 bit signed */typedef unsigned short quint16;    /* 16 bit unsigned */typedef int qint32;                /* 32 bit signed */typedef unsigned int quint32;      /* 32 bit unsigned */#if defined(Q_OS_WIN) && !defined(Q_CC_GNU)#  define Q_INT64_C(c) c ## i64    /* signed 64 bit constant */#  define Q_UINT64_C(c) c ## ui64   /* unsigned 64 bit constant */typedef __int64 qint64;            /* 64 bit signed */typedef unsigned __int64 quint64;  /* 64 bit unsigned */#else#  define Q_INT64_C(c) static_cast<long long>(c ## LL)     /* signed 64 bit constant */#  define Q_UINT64_C(c) static_cast<unsigned long long>(c ## ULL) /* unsigned 64 bit constant */typedef long long qint64;           /* 64 bit signed */typedef unsigned long long quint64; /* 64 bit unsigned */#endiftypedef qint64 qlonglong;typedef quint64 qulonglong;#if defined(Q_OS_WIN64) || defined(Q_WS_MAC64)# define QT_POINTER_SIZE 8#elif defined(Q_OS_WIN32)# define QT_POINTER_SIZE 4#endif#define Q_INIT_RESOURCE(name) \    do { extern int qInitResources_ ## name ();       \        qInitResources_ ## name (); } while (0)#define Q_CLEANUP_RESOURCE(name) \    do { extern int qCleanupResources_ ## name ();    \        qCleanupResources_ ## name (); } while (0)#if defined(__cplusplus)/*  quintptr and qptrdiff is guaranteed to be the same size as a pointer, i.e.      sizeof(void *) == sizeof(quintptr)      && sizeof(void *) == sizeof(qptrdiff)*/template <int> class QUintForSize    { private: typedef void    Type; };template <>    class QUintForSize<4> { public:  typedef quint32 Type; };template <>    class QUintForSize<8> { public:  typedef quint64 Type; };template <typename T> class QUintForType : public QUintForSize<sizeof(T)> { };typedef QUintForType<void *>::Type quintptr;template <int> class QIntForSize    { private: typedef void   Type; };template <>    class QIntForSize<4> { public:  typedef qint32 Type; };template <>    class QIntForSize<8> { public:  typedef qint64 Type; };template <typename T> class QIntForType : public QIntForSize<sizeof(T)> { };typedef QIntForType<void *>::Type qptrdiff;/*   Useful type definitions for Qt*/typedef unsigned char uchar;typedef unsigned short ushort;typedef unsigned int uint;typedef unsigned long ulong;#if defined(Q_NO_BOOL_TYPE)#error "Compiler doesn't support the bool type"#endif/*   Constant bool values*/#ifndef QT_LSB /* the LSB defines TRUE and FALSE for us */#  ifndef TRUE#   define TRUE true#   define FALSE false#  endif#endif#if defined(Q_OS_MAC) && !defined(Q_CC_INTEL)#define QT_BEGIN_HEADER extern "C++" {#define QT_END_HEADER }#else#define QT_BEGIN_HEADER#define QT_END_HEADER#endifQT_BEGIN_HEADER/*   Proper for-scoping in VC++6 and MIPSpro CC*/#ifndef QT_NO_KEYWORDS#  if (defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET) && !defined(Q_CC_INTEL)) || defined(Q_CC_MIPS)#    define for if(0){}else for#  endif#endif/*   Workaround for static const members on MSVC++.*/#if defined(Q_CC_MSVC)#  define QT_STATIC_CONST static#  define QT_STATIC_CONST_IMPL#else#  define QT_STATIC_CONST static const#  define QT_STATIC_CONST_IMPL const#endif/*   Warnings and errors when using deprecated methods*/#if defined(Q_MOC_RUN)#  define Q_DECL_DEPRECATED Q_DECL_DEPRECATED#elif defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && (__GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2))#  define Q_DECL_DEPRECATED __attribute__ ((__deprecated__))#elif defined(Q_CC_MSVC) && (_MSC_VER >= 1300)#  define Q_DECL_DEPRECATED __declspec(deprecated)#  if defined (Q_CC_INTEL)#    define Q_DECL_VARIABLE_DEPRECATED#  else#  endif#else#  define Q_DECL_DEPRECATED#endif#ifndef Q_DECL_VARIABLE_DEPRECATED#  define Q_DECL_VARIABLE_DEPRECATED Q_DECL_DEPRECATED#endif#ifndef Q_DECL_CONSTRUCTOR_DEPRECATED#  if defined(Q_MOC_RUN)#    define Q_DECL_CONSTRUCTOR_DEPRECATED Q_DECL_CONSTRUCTOR_DEPRECATED#  elif defined(Q_NO_DEPRECATED_CONSTRUCTORS)#    define Q_DECL_CONSTRUCTOR_DEPRECATED#  else#    define Q_DECL_CONSTRUCTOR_DEPRECATED Q_DECL_DEPRECATED#  endif#endif#if defined(QT_NO_DEPRECATED)/* disable Qt3 support as well */#  undef QT3_SUPPORT_WARNINGS#  undef QT3_SUPPORT#  undef QT_DEPRECATED#  undef QT_DEPRECATED_VARIABLE#  undef QT_DEPRECATED_CONSTRUCTOR#elif defined(QT_DEPRECATED_WARNINGS)/* enable Qt3 support warnings as well */#  undef QT3_SUPPORT_WARNINGS#  define QT3_SUPPORT_WARNINGS#  undef QT_DEPRECATED#  define QT_DEPRECATED Q_DECL_DEPRECATED#  undef QT_DEPRECATED_VARIABLE#  define QT_DEPRECATED_VARIABLE Q_DECL_VARIABLE_DEPRECATED#  undef QT_DEPRECATED_CONSTRUCTOR#  define QT_DEPRECATED_CONSTRUCTOR explicit Q_DECL_CONSTRUCTOR_DEPRECATED#else#  undef QT_DEPRECATED#  define QT_DEPRECATED#  undef QT_DEPRECATED_VARIABLE#  define QT_DEPRECATED_VARIABLE#  undef QT_DEPRECATED_CONSTRUCTOR#  define QT_DEPRECATED_CONSTRUCTOR#endif#if defined(QT3_SUPPORT_WARNINGS)#  if !defined(QT_COMPAT_WARNINGS) /* also enable compat */#    define QT_COMPAT_WARNINGS#  endif#  undef QT3_SUPPORT#  define QT3_SUPPORT Q_DECL_DEPRECATED#  undef QT3_SUPPORT_VARIABLE#  define QT3_SUPPORT_VARIABLE Q_DECL_VARIABLE_DEPRECATED#  undef QT3_SUPPORT_CONSTRUCTOR#  define QT3_SUPPORT_CONSTRUCTOR explicit Q_DECL_CONSTRUCTOR_DEPRECATED#elif defined(QT3_SUPPORT) /* define back to nothing */#  if !defined(QT_COMPAT) /* also enable qt3 support */#    define QT_COMPAT#  endif#  undef QT3_SUPPORT#  define QT3_SUPPORT#  undef QT3_SUPPORT_VARIABLE#  define QT3_SUPPORT_VARIABLE#  undef QT3_SUPPORT_CONSTRUCTOR#  define QT3_SUPPORT_CONSTRUCTOR explicit#endif/* moc compats (signals/slots) */#ifndef QT_MOC_COMPAT#  if defined(QT3_SUPPORT)#    define QT_MOC_COMPAT QT3_SUPPORT#  else#    define QT_MOC_COMPAT#  endif#else#  undef QT_MOC_COMPAT#  define QT_MOC_COMPAT#endif#if 0 /* #ifdef QT_ASCII_CAST_WARNINGS */#  define QT_ASCII_CAST_WARN Q_DECL_DEPRECATED#  if defined(Q_CC_GNU) && __GNUC__ < 4     /* gcc < 4 doesn't like Q_DECL_DEPRECATED in front of constructors */#    define QT_ASCII_CAST_WARN_CONSTRUCTOR#  else#    define QT_ASCII_CAST_WARN_CONSTRUCTOR Q_DECL_CONSTRUCTOR_DEPRECATED#  endif#else#  define QT_ASCII_CAST_WARN#  define QT_ASCII_CAST_WARN_CONSTRUCTOR#endif#ifdef __i386__#  if defined(Q_CC_GNU)#if !defined(Q_CC_INTEL) && ((100*(__GNUC__ - 0) + 10*(__GNUC_MINOR__ - 0) + __GNUC_PATCHLEVEL__) >= 332)#    define QT_FASTCALL __attribute__((regparm(3)))#else#    define QT_FASTCALL#endif#  elif defined(Q_CC_MSVC)#    define QT_FASTCALL __fastcall#  else#     define QT_FASTCALL#  endif#else#  define QT_FASTCALL#endiftypedef int QNoImplicitBoolCast;#if defined(QT_COORD_TYPE)typedef QT_COORD_TYPE qreal;#elif defined(__arm__)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)#       warning "Support for this version of Mac OS X is still preliminary"#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#  ifdef 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

⌨️ 快捷键说明

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