00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef QGLOBAL_H
00039 #define QGLOBAL_H
00040
00041 #define QT_VERSION_STR "3.3.2"
00042
00043
00044
00045 #define QT_VERSION 0x030302
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082 #if defined(__DARWIN_X11__)
00083 # define Q_OS_DARWIN
00084 #elif defined(__APPLE__) && defined(__GNUC__)
00085 # define Q_OS_MACX
00086 #elif defined(__MACOSX__)
00087 # define Q_OS_MACX
00088 #elif defined(macintosh)
00089 # define Q_OS_MAC9
00090 #elif defined(__CYGWIN__)
00091 # define Q_OS_CYGWIN
00092 #elif defined(MSDOS) || defined(_MSDOS)
00093 # define Q_OS_MSDOS
00094 #elif defined(__OS2__)
00095 # if defined(__EMX__)
00096 # define Q_OS_OS2EMX
00097 # else
00098 # define Q_OS_OS2
00099 # endif
00100 #elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))
00101 # define Q_OS_WIN32
00102 # define Q_OS_WIN64
00103 #elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__))
00104 # define Q_OS_WIN32
00105 #elif defined(__MWERKS__) && defined(__INTEL__)
00106 # define Q_OS_WIN32
00107 #elif defined(__sun) || defined(sun)
00108 # define Q_OS_SOLARIS
00109 #elif defined(hpux) || defined(__hpux)
00110 # define Q_OS_HPUX
00111 #elif defined(__ultrix) || defined(ultrix)
00112 # define Q_OS_ULTRIX
00113 #elif defined(sinix)
00114 # define Q_OS_RELIANT
00115 #elif defined(__linux__) || defined(__linux)
00116 # define Q_OS_LINUX
00117 #elif defined(__FreeBSD__) || defined(__DragonFly__)
00118 # define Q_OS_FREEBSD
00119 # define Q_OS_BSD4
00120 #elif defined(__NetBSD__)
00121 # define Q_OS_NETBSD
00122 # define Q_OS_BSD4
00123 #elif defined(__OpenBSD__)
00124 # define Q_OS_OPENBSD
00125 # define Q_OS_BSD4
00126 #elif defined(__bsdi__)
00127 # define Q_OS_BSDI
00128 # define Q_OS_BSD4
00129 #elif defined(__sgi)
00130 # define Q_OS_IRIX
00131 #elif defined(__osf__)
00132 # define Q_OS_OSF
00133 #elif defined(_AIX)
00134 # define Q_OS_AIX
00135 #elif defined(__Lynx__)
00136 # define Q_OS_LYNX
00137 #elif defined(__GNU_HURD__)
00138 # define Q_OS_HURD
00139 #elif defined(__DGUX__)
00140 # define Q_OS_DGUX
00141 #elif defined(__QNXNTO__)
00142 # define Q_OS_QNX6
00143 #elif defined(__QNX__)
00144 # define Q_OS_QNX
00145 #elif defined(_SEQUENT_)
00146 # define Q_OS_DYNIX
00147 #elif defined(_SCO_DS)
00148 # define Q_OS_SCO
00149 #elif defined(__USLC__)
00150 # define Q_OS_UNIXWARE
00151 # define Q_OS_UNIXWARE7
00152 #elif defined(__svr4__) && defined(i386)
00153 # define Q_OS_UNIXWARE
00154 # define Q_OS_UNIXWARE7
00155 #elif defined(__MAKEDEPEND__)
00156 #else
00157 # error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com"
00158 #endif
00159
00160 #if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
00161 # define Q_OS_WIN
00162 #endif
00163
00164 #if defined(Q_OS_MAC9) || defined(Q_OS_MACX)
00165 # define Q_OS_MAC
00166
00167
00168
00169
00170 #warning "evil hack here !! (se)"
00171 #define Q_OS_LINUX
00172 #undef Q_OS_MACX
00173 #undef Q_OS_MAC
00174 #endif
00175
00176 #if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN)
00177 # undef Q_OS_UNIX
00178 #elif !defined(Q_OS_UNIX)
00179 # define Q_OS_UNIX
00180 #endif
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213 #if defined(__DMC__) || defined(__SC__)
00214 # define Q_CC_SYM
00215
00216 # if defined(__SC__) && __SC__ < 0x750
00217 # define Q_NO_EXPLICIT_KEYWORD
00218 # endif
00219 # define Q_NO_USING_KEYWORD
00220 # if !defined(_CPPUNWIND)
00221 # define Q_NO_EXCEPTIONS
00222 # endif
00223
00224 #elif defined(applec)
00225 # define Q_CC_MPW
00226 # define Q_NO_BOOL_TYPE
00227 # define Q_NO_EXPLICIT_KEYWORD
00228 # define Q_NO_USING_KEYWORD
00229
00230 #elif defined(__MWERKS__)
00231 # define Q_CC_MWERKS
00232
00233 # define QMAC_PASCAL pascal
00234
00235 #elif defined(_MSC_VER)
00236 # define Q_CC_MSVC
00237
00238 # define Q_CANNOT_DELETE_CONSTANT
00239 # define Q_INLINE_TEMPLATES inline
00240
00241 # if _MSC_VER >= 1300
00242 # define Q_CC_MSVC_NET
00243 # if _MSC_VER < 1310 || defined(Q_OS_WIN64)
00244 # define Q_TYPENAME
00245 # endif
00246 # endif
00247
00248 # if defined(__INTEL_COMPILER)
00249 # define Q_CC_INTEL
00250 # if !defined(__EXCEPTIONS)
00251 # define Q_NO_EXCEPTIONS
00252 # endif
00253 # else
00254 # define Q_NO_USING_KEYWORD
00255 # endif
00256
00257 #elif defined(__BORLANDC__) || defined(__TURBOC__)
00258 # define Q_CC_BOR
00259 # if __BORLANDC__ < 0x502
00260 # define Q_NO_BOOL_TYPE
00261 # define Q_NO_EXPLICIT_KEYWORD
00262 # endif
00263 # define Q_NO_USING_KEYWORD
00264
00265 #elif defined(__WATCOMC__)
00266 # define Q_CC_WAT
00267 # if defined(Q_OS_QNX4)
00268
00269 # define Q_TYPENAME
00270 # define Q_NO_BOOL_TYPE
00271 # define Q_CANNOT_DELETE_CONSTANT
00272 # define mutable
00273
00274 # define Q_BROKEN_TEMPLATE_SPECIALIZATION
00275
00276 # define QT_NO_TEMPLATE_VARIANT
00277
00278
00279 # define Q_FULL_TEMPLATE_INSTANTIATION
00280
00281 # define Q_FULL_TEMPLATE_INSTANTIATION_MEMCMP
00282
00283 # define QT_QWS_NO_SHM
00284 # define QT_NO_QWS_MULTIPROCESS
00285 # define QT_NO_SQL
00286 # define QT_NO_QWS_CURSOR
00287 # endif
00288
00289 #elif defined(__GNUC__)
00290 # define Q_CC_GNU
00291 # define Q_C_CALLBACKS
00292 # if __GNUC__ == 2 && __GNUC_MINOR__ <= 7
00293 # define Q_FULL_TEMPLATE_INSTANTIATION
00294 # endif
00295
00296 # if __GNUC__ == 2 && __GNUC_MINOR__ <= 95
00297 # define Q_NO_USING_KEYWORD
00298 # endif
00299
00300 # if defined(Q_OS_HPUX) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1
00301 # define Q_WRONG_SB_CTYPE_MACROS
00302 # endif
00303
00304
00305
00306
00307
00308
00309 # if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
00310 # define Q_PACKED __attribute__ ((packed))
00311 # if __GNUC__ == 3 && __GNUC_MINOR__ >= 4
00312 # define Q_NO_PACKED_REFERENCE
00313 # endif
00314 # endif
00315 # if !defined(__EXCEPTIONS)
00316 # define Q_NO_EXCEPTIONS
00317 # endif
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341 #elif defined(__xlC__)
00342 # define Q_CC_XLC
00343 # define Q_FULL_TEMPLATE_INSTANTIATION
00344 # if __xlC__ < 0x400
00345 # define Q_NO_BOOL_TYPE
00346 # define Q_NO_EXPLICIT_KEYWORD
00347 # define Q_NO_USING_KEYWORD
00348 # define Q_TYPENAME
00349 # define Q_INLINE_TEMPLATES inline
00350 # define Q_BROKEN_TEMPLATE_SPECIALIZATION
00351 # define Q_CANNOT_DELETE_CONSTANT
00352 # endif
00353
00354
00355
00356
00357
00358
00359 #elif defined(__DECCXX) || defined(__DECC)
00360 # define Q_CC_DEC
00361
00362
00363 # if defined(__EDG__)
00364 # define Q_CC_EDG
00365 # endif
00366
00367
00368
00369 # if !defined(_BOOL_EXISTS)
00370 # define Q_NO_BOOL_TYPE
00371 # endif
00372
00373 # define Q_NO_USING_KEYWORD
00374
00375
00376 # if __DECCXX_VER < 60060000
00377 # define Q_TYPENAME
00378 # define Q_BROKEN_TEMPLATE_SPECIALIZATION
00379 # define Q_CANNOT_DELETE_CONSTANT
00380 # endif
00381
00382 # define Q_INLINE_TEMPLATES inline
00383
00384
00385
00386
00387 #elif defined(__EDG) || defined(__EDG__)
00388 # define Q_CC_EDG
00389
00390
00391
00392
00393
00394
00395
00396 # if !defined(_BOOL) && !defined(__BOOL_DEFINED)
00397 # define Q_NO_BOOL_TYPE
00398 # endif
00399
00400
00401 # if defined(__COMO__)
00402 # define Q_CC_COMEAU
00403 # define Q_C_CALLBACKS
00404
00405
00406
00407
00408
00409 # elif defined(__KCC)
00410 # define Q_CC_KAI
00411 # if !defined(_EXCEPTIONS)
00412 # define Q_NO_EXCEPTIONS
00413 # endif
00414 # define Q_NO_USING_KEYWORD
00415
00416
00417 # elif defined(__INTEL_COMPILER)
00418 # define Q_CC_INTEL
00419 # if !defined(__EXCEPTIONS)
00420 # define Q_NO_EXCEPTIONS
00421 # endif
00422
00423
00424 # elif defined(__PGI)
00425 # define Q_CC_PGI
00426 # if !defined(__EXCEPTIONS)
00427 # define Q_NO_EXCEPTIONS
00428 # endif
00429
00430
00431 # elif defined(__ghs)
00432 # define Q_CC_GHS
00433
00434
00435 # elif defined(__USLC__) && defined(__SCO_VERSION__)
00436 # define Q_CC_USLC
00437
00438 # if !defined(__SCO_VERSION__) || (__SCO_VERSION__ < 302200010)
00439 # define Q_INLINE_TEMPLATES inline
00440 # endif
00441 # define Q_NO_USING_KEYWORD
00442
00443
00444 # elif defined(CENTERLINE_CLPP) || defined(OBJECTCENTER)
00445 # define Q_CC_OC
00446 # define Q_NO_USING_KEYWORD
00447
00448
00449
00450 # elif defined(sinix)
00451 # define Q_CC_CDS
00452 # define Q_NO_USING_KEYWORD
00453 # if defined(__cplusplus) && (__cplusplus < 2)
00454 # define Q_NO_EXCEPTIONS
00455 # endif
00456
00457
00458
00459 # elif defined(__sgi)
00460 # define Q_CC_MIPS
00461 # if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32)
00462 # define Q_TYPENAME
00463 # define Q_BROKEN_TEMPLATE_SPECIALIZATION
00464 # define Q_NO_EXPLICIT_KEYWORD
00465 # define Q_INLINE_TEMPLATES inline
00466 # elif defined(_COMPILER_VERSION) && (_COMPILER_VERSION < 730)
00467 # define Q_TYPENAME
00468 # define Q_BROKEN_TEMPLATE_SPECIALIZATION
00469 # endif
00470 # define Q_NO_USING_KEYWORD
00471 # if defined(_COMPILER_VERSION) && (_COMPILER_VERSION >= 740)
00472 # pragma set woff 3624,3625, 3649
00473 # endif
00474 # endif
00475
00476
00477 #elif defined(__USLC__)
00478 # define Q_CC_USLC
00479 # define Q_TYPENAME
00480 # define Q_NO_BOOL_TYPE
00481 # define Q_NO_EXPLICIT_KEYWORD
00482 # define Q_NO_USING_KEYWORD
00483 # define Q_INLINE_TEMPLATES inline
00484
00485
00486 #elif defined(__HIGHC__)
00487 # define Q_CC_HIGHC
00488
00489 #elif defined(__SUNPRO_CC) || defined(__SUNPRO_C)
00490 # define Q_CC_SUN
00491
00492
00493
00494
00495 # if __SUNPRO_CC >= 0x500
00496 # if !defined(_BOOL)
00497 # define Q_NO_BOOL_TYPE
00498 # endif
00499 # if defined(__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT <= 4)
00500 # define Q_NO_USING_KEYWORD
00501 # endif
00502 # define Q_C_CALLBACKS
00503
00504 # else
00505 # define Q_NO_BOOL_TYPE
00506 # define Q_NO_EXPLICIT_KEYWORD
00507 # define Q_NO_USING_KEYWORD
00508 # endif
00509
00510
00511
00512 #elif defined(sinix)
00513 # define Q_CC_EDG
00514 # define Q_CC_CDS
00515 # if !defined(_BOOL)
00516 # define Q_NO_BOOL_TYPE
00517 # endif
00518 # define Q_BROKEN_TEMPLATE_SPECIALIZATION
00519
00520 #elif defined(Q_OS_HPUX)
00521
00522 # if defined(__HP_aCC) || __cplusplus >= 199707L
00523 # define Q_CC_HPACC
00524 # else
00525 # define Q_CC_HP
00526 # define Q_NO_BOOL_TYPE
00527 # define Q_FULL_TEMPLATE_INSTANTIATION
00528 # define Q_BROKEN_TEMPLATE_SPECIALIZATION
00529 # define Q_NO_EXPLICIT_KEYWORD
00530 # endif
00531 # define Q_NO_USING_KEYWORD
00532
00533 #else
00534 # error "Qt has not been tested with this compiler - talk to qt-bugs@trolltech.com"
00535 #endif
00536
00537 #ifndef Q_PACKED
00538 # define Q_PACKED
00539 #endif
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553
00554 #if defined(Q_OS_MAC9)
00555 # define Q_WS_MAC9
00556 #elif defined(Q_OS_MSDOS)
00557 # define Q_WS_WIN16
00558 # error "Qt requires Win32 and does not work with Windows 3.x"
00559 #elif defined(_WIN32_X11_)
00560 # define Q_WS_X11
00561 #elif defined(Q_OS_WIN32)
00562 # define Q_WS_WIN32
00563 # if defined(Q_OS_WIN64)
00564 # define Q_WS_WIN64
00565 # endif
00566 #elif defined(Q_OS_OS2)
00567 # define Q_WS_PM
00568 # error "Qt does not work with OS/2 Presentation Manager or Workplace Shell"
00569 #elif defined(Q_OS_UNIX)
00570 # if defined(QWS)
00571 # define Q_WS_QWS
00572 # define QT_NO_QWS_IM
00573 # elif defined(Q_OS_MACX)
00574 # define Q_WS_MACX
00575 # else
00576 # define Q_WS_X11
00577 # endif
00578 #endif
00579 #if defined(Q_OS_MAC) && !defined(QMAC_PASCAL)
00580 # define QMAC_PASCAL
00581 #endif
00582
00583 #if defined(Q_WS_WIN16) || defined(Q_WS_WIN32)
00584 # define Q_WS_WIN
00585 #endif
00586
00587 #if (defined(Q_WS_MAC9) || defined(Q_WS_MACX)) && !defined(Q_WS_QWS) && !defined(Q_WS_X11)
00588 # define Q_WS_MAC
00589 #endif
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599 #define Q_DISABLE_COPY
00600
00601 #if defined(__cplusplus)
00602
00603
00604
00605
00606
00607
00608 #if defined(Q_NO_BOOL_TYPE)
00609 #if defined(Q_CC_HP)
00610
00611 #define bool int
00612 #else
00613 typedef int bool;
00614 #endif
00615 #endif
00616
00617 typedef unsigned char uchar;
00618 typedef unsigned short ushort;
00619 typedef unsigned uint;
00620 typedef unsigned long ulong;
00621 typedef char *pchar;
00622 typedef uchar *puchar;
00623 typedef const char *pcchar;
00624
00625
00626
00627
00628
00629
00630 #ifndef TRUE
00631 const bool FALSE = 0;
00632 const bool TRUE = !0;
00633 #endif
00634 #if defined(__WATCOMC__)
00635 # if defined(Q_OS_QNX4)
00636 const bool false = FALSE;
00637 const bool true = TRUE;
00638 # endif
00639 #endif
00640
00641
00642
00643
00644
00645 #if 0 && defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET)
00646 # define for if(0){}else for
00647 #endif
00648
00649
00650
00651
00652
00653 #if !defined(Q_NO_EXPLICIT_KEYWORD)
00654 # define Q_EXPLICIT explicit
00655 #else
00656 # define Q_EXPLICIT
00657 #endif
00658
00659
00660
00661
00662
00663
00664 #if defined(Q_CC_MSVC)
00665 # define QT_STATIC_CONST static
00666 # define QT_STATIC_CONST_IMPL
00667 #else
00668 # define QT_STATIC_CONST static const
00669 # define QT_STATIC_CONST_IMPL const
00670 #endif
00671
00672
00673
00674
00675
00676
00677 #define QMAX(a, b) ((b) < (a) ? (a) : (b))
00678 #define QMIN(a, b) ((a) < (b) ? (a) : (b))
00679 #define QABS(a) ((a) >= 0 ? (a) : -(a))
00680
00681 inline int qRound( double d )
00682 {
00683 return d >= 0.0 ? int(d + 0.5) : int( d - ((int)d-1) + 0.5 ) + ((int)d-1);
00684 }
00685
00686
00687
00688
00689
00690
00691 #if !defined(QT_CLEAN_NAMESPACE)
00692
00693 typedef signed char INT8;
00694 typedef unsigned char UINT8;
00695 typedef short INT16;
00696 typedef unsigned short UINT16;
00697 typedef int INT32;
00698 typedef unsigned int UINT32;
00699 #endif
00700
00701 typedef signed char Q_INT8;
00702 typedef unsigned char Q_UINT8;
00703 typedef short Q_INT16;
00704 typedef unsigned short Q_UINT16;
00705 typedef int Q_INT32;
00706 typedef unsigned int Q_UINT32;
00707 #if defined(Q_OS_WIN64)
00708 typedef __int64 Q_LONG;
00709 typedef unsigned __int64 Q_ULONG;
00710 #else
00711 typedef long Q_LONG;
00712 typedef unsigned long Q_ULONG;
00713 #endif
00714 #if defined(Q_OS_WIN) && !defined(Q_CC_GNU)
00715 # define Q_INT64_C(c) c ## i64 // signed 64 bit constant
00716 # define Q_UINT64_C(c) c ## ui64 // unsigned 64 bit constant
00717 typedef __int64 Q_INT64;
00718 typedef unsigned __int64 Q_UINT64;
00719 #else
00720 # define Q_INT64_C(c) c ## LL // signed 64 bit constant
00721 # define Q_UINT64_C(c) c ## ULL // unsigned 64 bit constant
00722 typedef long long Q_INT64;
00723 typedef unsigned long long Q_UINT64;
00724 #endif
00725 typedef Q_INT64 Q_LLONG;
00726 typedef Q_UINT64 Q_ULLONG;
00727
00728 #if defined(Q_OS_MACX) && !defined(QT_LARGEFILE_SUPPORT)
00729 # define QT_LARGEFILE_SUPPORT 64
00730 #endif
00731 #if defined(QT_LARGEFILE_SUPPORT)
00732 typedef Q_ULLONG QtOffset;
00733 #else
00734 typedef Q_ULONG QtOffset;
00735 #endif
00736
00737
00738
00739
00740
00741
00742 class QDataStream;
00743
00744
00745
00746
00747
00748
00749
00750
00751
00752
00753
00754 #if !defined(QT_MOC)
00755 #if defined(QCONFIG_LOCAL)
00756 #include "qconfig-local.h"
00757 #elif defined(QCONFIG_MINIMAL)
00758 #include "qconfig-minimal.h"
00759 #elif defined(QCONFIG_SMALL)
00760 #include "qconfig-small.h"
00761 #elif defined(QCONFIG_MEDIUM)
00762 #include "qconfig-medium.h"
00763 #elif defined(QCONFIG_LARGE)
00764 #include "qconfig-large.h"
00765 #else // everything...
00766 #include "qconfig.h"
00767 #endif
00768 #endif
00769
00770
00771 #ifndef QT_BUILD_KEY
00772 #define QT_BUILD_KEY "unspecified"
00773 #endif
00774
00775
00776 #include "qmodules.h"
00777 #ifndef QT_MODULE_DIALOGS
00778 # define QT_NO_DIALOG
00779 #endif
00780 #ifndef QT_MODULE_ICONVIEW
00781 # define QT_NO_ICONVIEW
00782 #endif
00783 #ifndef QT_MODULE_WORKSPACE
00784 # define QT_NO_WORKSPACE
00785 #endif
00786 #ifndef QT_MODULE_NETWORK
00787 #define QT_NO_NETWORK
00788 #endif
00789 #ifndef QT_MODULE_CANVAS
00790 # define QT_NO_CANVAS
00791 #endif
00792 #ifndef QT_MODULE_TABLE
00793 #define QT_NO_TABLE
00794 #endif
00795 #ifndef QT_MODULE_XML
00796 # define QT_NO_XML
00797 #endif
00798 #ifndef QT_MODULE_OPENGL
00799 # define QT_NO_OPENGL
00800 #endif
00801 #if !defined(QT_MODULE_SQL)
00802 # define QT_NO_SQL
00803 #endif
00804
00805 #if defined(Q_WS_MAC9)
00806
00807 # ifndef QMAC_QMENUBAR_NO_MERGE
00808 # define QMAC_QMENUBAR_NO_MERGE
00809 # endif
00810
00811 # ifndef QMAC_NO_QUARTZ
00812 # define QMAC_NO_QUARTZ
00813 # endif
00814 # ifndef QMAC_QMENUBAR_NO_EVENT
00815 # define QMAC_QMENUBAR_NO_EVENT
00816 # endif
00817 #endif
00818 #if defined(Q_WS_MACX) //for no nobody uses quartz, just putting in first level hooks
00819 # ifndef QMAC_NO_QUARTZ
00820 # define QMAC_NO_QUARTZ
00821 # endif
00822 # ifndef QMAC_QMENUBAR_NO_EVENT
00823 # define QMAC_QMENUBAR_NO_EVENT
00824 # endif
00825 #endif
00826
00827 #if !defined(Q_WS_QWS) && !defined(QT_NO_COP)
00828 # define QT_NO_COP
00829 #endif
00830
00831 #ifndef QT_H
00832 #include "qfeatures.h"
00833 #endif
00834
00835
00836
00837
00838
00839
00840
00841 #if defined(Q_OS_WIN)
00842 # if defined(QT_NODLL)
00843 # undef QT_MAKEDLL
00844 # undef QT_DLL
00845 # elif defined(QT_MAKEDLL)
00846 # if defined(QT_DLL)
00847 # undef QT_DLL
00848 # endif
00849 # define Q_EXPORT __declspec(dllexport)
00850 # define Q_TEMPLATEDLL
00851 # define Q_TEMPLATE_EXTERN
00852 # undef Q_DISABLE_COPY
00853 # elif defined(QT_DLL)
00854 # define Q_EXPORT __declspec(dllimport)
00855 # define Q_TEMPLATEDLL
00856 # ifndef Q_TEMPLATE_EXTERN
00857 # if defined(Q_CC_MSVC_NET)
00858 # define Q_TEMPLATE_EXTERN extern
00859 # else
00860 # define Q_TEMPLATE_EXTERN
00861 # endif
00862 # endif
00863 # undef Q_DISABLE_COPY
00864 # endif
00865 #elif defined(Q_OS_LINUX) && defined(Q_CC_BOR)
00866 # if defined(QT_SHARED)
00867 # define Q_EXPORT __declspec(dllexport)
00868 # define Q_TEMPLATEDLL
00869 # define Q_TEMPLATE_EXTERN
00870 # undef Q_DISABLE_COPY
00871 # else
00872 # define Q_TEMPLATEDLL
00873 # define Q_TEMPLATE_EXTERN
00874 # undef Q_DISABLE_COPY
00875 # endif
00876 #else
00877 # undef QT_MAKEDLL
00878 # undef QT_DLL
00879 #endif
00880
00881 #ifndef Q_EXPORT
00882 # define Q_EXPORT
00883 #endif
00884
00885
00886
00887
00888
00889
00890 #if defined(Q_WS_WIN)
00891 extern Q_EXPORT bool qt_winunicode;
00892 #endif
00893
00894
00895
00896
00897
00898
00899 Q_EXPORT const char *qVersion();
00900 Q_EXPORT bool qSysInfo( int *wordSize, bool *bigEndian );
00901 Q_EXPORT bool qSharedBuild();
00902 #if defined(Q_OS_MAC)
00903 int qMacVersion();
00904 #elif defined(Q_WS_WIN)
00905 Q_EXPORT int qWinVersion();
00906 #if defined(UNICODE)
00907 #define QT_WA( uni, ansi ) if ( qt_winunicode ) { uni } else { ansi }
00908 #define QT_WA_INLINE( uni, ansi ) ( qt_winunicode ? uni : ansi )
00909 #else
00910 #define QT_WA( uni, ansi ) ansi
00911 #define QT_WA_INLINE( uni, ansi ) ansi
00912 #endif
00913 #endif
00914
00915 #ifdef Q_OS_TEMP
00916 #ifdef QT_WA
00917 #undef QT_WA
00918 #undef QT_WA_INLINE
00919 #endif
00920 #define QT_WA( uni, ansi ) uni
00921 #define QT_WA_INLINE( uni, ansi ) ( uni )
00922 #endif
00923
00924 #ifndef Q_INLINE_TEMPLATES
00925 # define Q_INLINE_TEMPLATES
00926 #endif
00927
00928 #ifndef Q_TYPENAME
00929 # define Q_TYPENAME typename
00930 #endif
00931
00932
00933
00934
00935 #define Q_UNUSED(x) (void)x;
00936
00937
00938
00939
00940
00941 #if !defined(QT_NO_CHECK)
00942 # define QT_CHECK_STATE // check state of objects etc.
00943 # define QT_CHECK_RANGE // check range of indexes etc.
00944 # define QT_CHECK_NULL // check null pointers
00945 # define QT_CHECK_MATH // check math functions
00946 #endif
00947
00948 #if !defined(QT_NO_DEBUG) && !defined(QT_DEBUG)
00949 # define QT_DEBUG // display debug messages
00950 # if !defined(QT_NO_COMPAT) // compatibility with Qt 2
00951 # if !defined(NO_DEBUG) && !defined(DEBUG)
00952 # if !defined(Q_OS_MACX) // clash with MacOS X headers
00953 # define DEBUG
00954 # endif
00955 # endif
00956 # endif
00957 #endif
00958
00959
00960 Q_EXPORT void qDebug( const char *, ... )
00961 #if defined(Q_CC_GNU) && !defined(__INSURE__)
00962 __attribute__ ((format (printf, 1, 2)))
00963 #endif
00964 ;
00965
00966 Q_EXPORT void qWarning( const char *, ... )
00967 #if defined(Q_CC_GNU) && !defined(__INSURE__)
00968 __attribute__ ((format (printf, 1, 2)))
00969 #endif
00970 ;
00971
00972 Q_EXPORT void qFatal( const char *, ... )
00973 #if defined(Q_CC_GNU)
00974 __attribute__ ((format (printf, 1, 2)))
00975 #endif
00976 ;
00977
00978 Q_EXPORT void qSystemWarning( const char *, int code = -1 );
00979
00980 #if !defined(QT_CLEAN_NAMESPACE)
00981
00982 Q_EXPORT void debug( const char *, ... )
00983 #if defined(Q_CC_GNU) && !defined(__INSURE__)
00984 __attribute__ ((format (printf, 1, 2)))
00985 #endif
00986 ;
00987
00988 Q_EXPORT void warning( const char *, ... )
00989 #if defined(Q_CC_GNU) && !defined(__INSURE__)
00990 __attribute__ ((format (printf, 1, 2)))
00991 #endif
00992 ;
00993
00994 Q_EXPORT void fatal( const char *, ... )
00995 #if defined(Q_CC_GNU) && !defined(__INSURE__)
00996 __attribute__ ((format (printf, 1, 2)))
00997 #endif
00998 ;
00999
01000 #endif
01001
01002
01003 #if !defined(Q_ASSERT)
01004 # if defined(QT_CHECK_STATE)
01005 # if defined(QT_FATAL_ASSERT)
01006 # define Q_ASSERT(x) ((x) ? (void)0 : qFatal("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__))
01007 # else
01008 # define Q_ASSERT(x) ((x) ? (void)0 : qWarning("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__))
01009 # endif
01010 # else
01011 # define Q_ASSERT(x)
01012 # endif
01013 #endif
01014
01015 #if !defined(QT_NO_COMPAT)
01016 # if !defined(ASSERT)
01017 # if !defined(Q_OS_TEMP)
01018 # define ASSERT(x) Q_ASSERT(x)
01019 # endif
01020 # endif
01021 #endif
01022
01023
01024 Q_EXPORT bool qt_check_pointer( bool c, const char *, int );
01025
01026 #if defined(QT_CHECK_NULL)
01027 # define Q_CHECK_PTR(p) (qt_check_pointer((p)==0,__FILE__,__LINE__))
01028 #else
01029 # define Q_CHECK_PTR(p)
01030 #endif
01031
01032 #if !defined(QT_NO_COMPAT)
01033 # if !defined(CHECK_PTR)
01034 # define CHECK_PTR(x) Q_CHECK_PTR(x)
01035 # endif
01036 #endif
01037
01038 enum QtMsgType { QtDebugMsg, QtWarningMsg, QtFatalMsg };
01039
01040 typedef void (*QtMsgHandler)(QtMsgType, const char *);
01041 Q_EXPORT QtMsgHandler qInstallMsgHandler( QtMsgHandler );
01042
01043 #if !defined(QT_NO_COMPAT) // compatibility with Qt 2
01044 typedef QtMsgHandler msg_handler;
01045 #endif // QT_NO_COMPAT
01046
01047 Q_EXPORT void qSuppressObsoleteWarnings( bool = TRUE );
01048
01049 Q_EXPORT void qObsolete( const char *obj, const char *oldfunc,
01050 const char *newfunc );
01051 Q_EXPORT void qObsolete( const char *obj, const char *oldfunc );
01052 Q_EXPORT void qObsolete( const char *message );
01053
01054
01055
01056
01057
01058
01059 Q_EXPORT const char *qInstallPath();
01060 Q_EXPORT const char *qInstallPathDocs();
01061 Q_EXPORT const char *qInstallPathHeaders();
01062 Q_EXPORT const char *qInstallPathLibs();
01063 Q_EXPORT const char *qInstallPathBins();
01064 Q_EXPORT const char *qInstallPathPlugins();
01065 Q_EXPORT const char *qInstallPathData();
01066 Q_EXPORT const char *qInstallPathTranslations();
01067 Q_EXPORT const char *qInstallPathSysconf();
01068
01069 #endif
01070
01071
01072
01073
01074
01075
01076
01077
01078
01079 #ifdef Q_FULL_TEMPLATE_INSTANTIATION
01080 # define Q_DUMMY_COMPARISON_OPERATOR(C) \
01081 bool operator==( const C& ) const { \
01082 qWarning( #C"::operator==( const "#C"& ) got called." ); \
01083 return FALSE; \
01084 }
01085 #else
01086 # define Q_DUMMY_COMPARISON_OPERATOR(C)
01087 #endif
01088
01089 #endif
01090
01091
01092
01093
01094
01095
01096
01097 #if !defined(QT_CC_WARNINGS)
01098 # define QT_NO_WARNINGS
01099 #endif
01100 #if defined(QT_NO_WARNINGS)
01101 # if defined(Q_CC_MSVC)
01102 # pragma warning(disable: 4244) // 'conversion' conversion from 'type1' to 'type2', possible loss of data
01103 # pragma warning(disable: 4275) // non - DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier'
01104 # pragma warning(disable: 4514) // unreferenced inline/local function has been removed
01105 # pragma warning(disable: 4800) // 'type' : forcing value to bool 'true' or 'false' (performance warning)
01106 # pragma warning(disable: 4097) // typedef-name 'identifier1' used as synonym for class-name 'identifier2'
01107 # pragma warning(disable: 4706) // assignment within conditional expression
01108 # pragma warning(disable: 4786) // truncating debug info after 255 characters
01109 # pragma warning(disable: 4660) // template-class specialization 'identifier' is already instantiated
01110 # pragma warning(disable: 4355) // 'this' : used in base member initializer list
01111 # pragma warning(disable: 4231) // nonstandard extension used : 'extern' before template explicit instantiation
01112 # pragma warning(disable: 4710) // function not inlined
01113 # elif defined(Q_CC_BOR)
01114 # pragma option -w-inl
01115 # pragma option -w-aus
01116 # pragma warn -inl
01117 # pragma warn -pia
01118 # pragma warn -ccc
01119 # pragma warn -rch
01120 # pragma warn -sig
01121 # endif
01122 #endif
01123