source: trunk/doc/html/qglobal-h.html

Last change on this file was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 34.6 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/include/qglobal.h:1 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>qglobal.h Include File</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { background: #ffffff; color: black; }
12--></style>
13</head>
14<body>
15
16<table border="0" cellpadding="0" cellspacing="0" width="100%">
17<tr bgcolor="#E5E5E5">
18<td valign=center>
19 <a href="index.html">
20<font color="#004faf">Home</font></a>
21 | <a href="classes.html">
22<font color="#004faf">All&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;Classes</font></a>
25 | <a href="annotated.html">
26<font color="#004faf">Annotated</font></a>
27 | <a href="groups.html">
28<font color="#004faf">Grouped&nbsp;Classes</font></a>
29 | <a href="functions.html">
30<font color="#004faf">Functions</font></a>
31</td>
32<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>qglobal.h</h1>
33
34<p>This is the verbatim text of the qglobal.h include file. It is provided only for illustration; the copyright remains with Trolltech.
35<hr>
36<pre>
37/****************************************************************************
38** $Id: qglobal-h.html 2051 2007-02-21 10:04:20Z chehrlic $
39**
40** Global type declarations and definitions
41**
42** Created : 920529
43**
44** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.
45**
46** This file is part of the tools module of the Qt GUI Toolkit.
47**
48** This file may be distributed under the terms of the Q Public License
49** as defined by Trolltech ASA of Norway and appearing in the file
50** LICENSE.QPL included in the packaging of this file.
51**
52** This file may be distributed and/or modified under the terms of the
53** GNU General Public License version 2 as published by the Free Software
54** Foundation and appearing in the file LICENSE.GPL included in the
55** packaging of this file.
56**
57** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
58** licenses may use this file in accordance with the Qt Commercial License
59** Agreement provided with the Software.
60**
61** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
62** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
63**
64** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
65** information about Qt Commercial License Agreements.
66** See http://www.trolltech.com/qpl/ for QPL licensing information.
67** See http://www.trolltech.com/gpl/ for GPL licensing information.
68**
69** Contact info@trolltech.com if any conditions of this licensing are
70** not clear to you.
71**
72**********************************************************************/
73
74#ifndef QGLOBAL_H
75#define QGLOBAL_H
76
77#define QT_VERSION_STR "3.3.8"
78/*
79 QT_VERSION is (major &lt;&lt; 16) + (minor &lt;&lt; 8) + patch.
80 */
81#define QT_VERSION 0x030308
82
83/*
84 The operating system, must be one of: (Q_OS_x)
85
86 MACX - Mac OS X
87 MAC9 - Mac OS 9
88 DARWIN - Darwin OS (Without Mac OS X)
89 MSDOS - MS-DOS and Windows
90 OS2 - OS/2
91 OS2EMX - XFree86 on OS/2 (not PM)
92 WIN32 - Win32 (Windows 95/98/ME and Windows NT/2000/XP)
93 CYGWIN - Cygwin
94 SOLARIS - Sun Solaris
95 HPUX - HP-UX
96 ULTRIX - DEC Ultrix
97 LINUX - Linux
98 FREEBSD - FreeBSD
99 NETBSD - NetBSD
100 OPENBSD - OpenBSD
101 BSDI - BSD/OS
102 IRIX - SGI Irix
103 OSF - HP Tru64 UNIX
104 SCO - SCO OpenServer 5
105 UNIXWARE - UnixWare 7, Open UNIX 8
106 AIX - AIX
107 HURD - GNU Hurd
108 DGUX - DG/UX
109 RELIANT - Reliant UNIX
110 DYNIX - DYNIX/ptx
111 QNX - QNX
112 QNX6 - QNX RTP 6.1
113 LYNX - LynxOS
114 BSD4 - Any BSD 4.4 system
115 UNIX - Any UNIX BSD/SYSV system
116*/
117
118#if defined(__DARWIN_X11__)
119# define Q_OS_DARWIN
120#elif defined(__APPLE__) &amp;&amp; (defined(__GNUC__) || defined(__xlC__))
121# define Q_OS_MACX
122#elif defined(__MACOSX__)
123# define Q_OS_MACX
124#elif defined(macintosh)
125# define Q_OS_MAC9
126#elif defined(__CYGWIN__)
127# define Q_OS_CYGWIN
128#elif defined(MSDOS) || defined(_MSDOS)
129# define Q_OS_MSDOS
130#elif defined(__OS2__)
131# if defined(__EMX__)
132# define Q_OS_OS2EMX
133# else
134# define Q_OS_OS2
135# endif
136#elif !defined(SAG_COM) &amp;&amp; (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))
137# define Q_OS_WIN32
138# define Q_OS_WIN64
139#elif !defined(SAG_COM) &amp;&amp; (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__))
140# define Q_OS_WIN32
141#elif defined(__MWERKS__) &amp;&amp; defined(__INTEL__)
142# define Q_OS_WIN32
143#elif defined(__sun) || defined(sun)
144# define Q_OS_SOLARIS
145#elif defined(hpux) || defined(__hpux)
146# define Q_OS_HPUX
147#elif defined(__ultrix) || defined(ultrix)
148# define Q_OS_ULTRIX
149#elif defined(sinix)
150# define Q_OS_RELIANT
151#elif defined(__linux__) || defined(__linux)
152# define Q_OS_LINUX
153#elif defined(__FreeBSD__) || defined(__DragonFly__)
154# define Q_OS_FREEBSD
155# define Q_OS_BSD4
156#elif defined(__NetBSD__)
157# define Q_OS_NETBSD
158# define Q_OS_BSD4
159#elif defined(__OpenBSD__)
160# define Q_OS_OPENBSD
161# define Q_OS_BSD4
162#elif defined(__bsdi__)
163# define Q_OS_BSDI
164# define Q_OS_BSD4
165#elif defined(__sgi)
166# define Q_OS_IRIX
167#elif defined(__osf__)
168# define Q_OS_OSF
169#elif defined(_AIX)
170# define Q_OS_AIX
171#elif defined(__Lynx__)
172# define Q_OS_LYNX
173#elif defined(__GNU_HURD__)
174# define Q_OS_HURD
175#elif defined(__DGUX__)
176# define Q_OS_DGUX
177#elif defined(__QNXNTO__)
178# define Q_OS_QNX6
179#elif defined(__QNX__)
180# define Q_OS_QNX
181#elif defined(_SEQUENT_)
182# define Q_OS_DYNIX
183#elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */
184# define Q_OS_SCO
185#elif defined(__USLC__) /* all SCO platforms + UDK or OUDK */
186# define Q_OS_UNIXWARE
187# define Q_OS_UNIXWARE7
188#elif defined(__svr4__) &amp;&amp; defined(i386) /* Open UNIX 8 + GCC */
189# define Q_OS_UNIXWARE
190# define Q_OS_UNIXWARE7
191#elif defined(__MAKEDEPEND__)
192#else
193# error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com"
194#endif
195
196#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
197# define Q_OS_WIN
198#endif
199
200#if defined(Q_OS_MAC9) || defined(Q_OS_MACX)
201# define Q_OS_MAC
202#endif
203
204#if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN)
205# undef Q_OS_UNIX
206#elif !defined(Q_OS_UNIX)
207# define Q_OS_UNIX
208#endif
209
210#if defined(Q_OS_MACX)
211# ifdef MAC_OS_X_VERSION_MIN_REQUIRED
212# undef MAC_OS_X_VERSION_MIN_REQUIRED
213# endif
214# define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_2
215# include &lt;AvailabilityMacros.h&gt;
216# if !defined(MAC_OS_X_VERSION_10_3)
217# define MAC_OS_X_VERSION_10_3 MAC_OS_X_VERSION_10_2 + 1
218# endif
219# if !defined(MAC_OS_X_VERSION_10_4)
220# define MAC_OS_X_VERSION_10_4 MAC_OS_X_VERSION_10_3 + 1
221# endif
222# if (MAC_OS_X_VERSION_MAX_ALLOWED &gt; MAC_OS_X_VERSION_10_4)
223# error "This version of Mac OS X is unsupported"
224# endif
225#endif
226
227
228/*
229 The compiler, must be one of: (Q_CC_x)
230
231 SYM - Symantec C++ for both PC and Macintosh
232 MPW - MPW C++
233 MWERKS - Metrowerks CodeWarrior
234 MSVC - Microsoft Visual C/C++, Intel C++ for Windows
235 BOR - Borland/Turbo C++
236 WAT - Watcom C++
237 GNU - GNU C++
238 COMEAU - Comeau C++
239 EDG - Edison Design Group C++
240 OC - CenterLine C++
241 SUN - Sun WorkShop, Forte Developer, or Sun ONE Studio C++
242 MIPS - MIPSpro C++
243 DEC - DEC C++
244 HP - HPUX C++
245 HPACC - HPUX ANSI C++
246 USLC - SCO OUDK, UDK, and UnixWare 2.X C++
247 CDS - Reliant C++
248 KAI - KAI C++
249 INTEL - Intel C++ for Linux, Intel C++ for Windows
250 HIGHC - MetaWare High C/C++
251 PGI - Portland Group C++
252 GHS - Green Hills Optimizing C++ Compilers
253
254 Should be sorted most to least authoritative.
255*/
256
257/* Symantec C++ is now Digital Mars */
258#if defined(__DMC__) || defined(__SC__)
259# define Q_CC_SYM
260/* "explicit" semantics implemented in 8.1e but keyword recognized since 7.5 */
261# if defined(__SC__) &amp;&amp; __SC__ &lt; 0x750
262# define Q_NO_EXPLICIT_KEYWORD
263# endif
264# define Q_NO_USING_KEYWORD
265# if !defined(_CPPUNWIND)
266# define Q_NO_EXCEPTIONS
267# endif
268
269#elif defined(applec)
270# define Q_CC_MPW
271# define Q_NO_BOOL_TYPE
272# define Q_NO_EXPLICIT_KEYWORD
273# define Q_NO_USING_KEYWORD
274
275#elif defined(__MWERKS__)
276# define Q_CC_MWERKS
277/* "explicit" recognized since 4.0d1 */
278# define QMAC_PASCAL pascal
279
280#elif defined(_MSC_VER)
281# define Q_CC_MSVC
282/* proper support of bool for _MSC_VER &gt;= 1100 */
283# define Q_CANNOT_DELETE_CONSTANT
284# define Q_INLINE_TEMPLATES inline
285/* Visual C++.Net issues for _MSC_VER &gt;= 1300 */
286# if _MSC_VER &gt;= 1300
287# define Q_CC_MSVC_NET
288# if _MSC_VER &lt; 1310 || (defined(Q_OS_WIN64) &amp;&amp; defined(_M_IA64))
289# define Q_TYPENAME
290# endif
291# endif
292/* Intel C++ disguising as Visual C++: the `using' keyword avoids warnings */
293# if defined(__INTEL_COMPILER)
294# define Q_CC_INTEL
295# if !defined(__EXCEPTIONS)
296# define Q_NO_EXCEPTIONS
297# endif
298# else
299# define Q_NO_USING_KEYWORD /* ### check "using" status */
300# endif
301
302#elif defined(__BORLANDC__) || defined(__TURBOC__)
303# define Q_CC_BOR
304# if __BORLANDC__ &lt; 0x502
305# define Q_NO_BOOL_TYPE
306# define Q_NO_EXPLICIT_KEYWORD
307# endif
308# define Q_NO_USING_KEYWORD /* ### check "using" status */
309
310#elif defined(__WATCOMC__)
311# define Q_CC_WAT
312# if defined(Q_OS_QNX4)
313/* compiler flags */
314# define Q_TYPENAME
315# define Q_NO_BOOL_TYPE
316# define Q_CANNOT_DELETE_CONSTANT
317# define mutable
318/* ??? */
319# define Q_BROKEN_TEMPLATE_SPECIALIZATION
320/* no template classes in QVariant */
321# define QT_NO_TEMPLATE_VARIANT
322/* Wcc does not fill in functions needed by valuelists, maps, and
323 valuestacks implicitly */
324# define Q_FULL_TEMPLATE_INSTANTIATION
325/* can we just compare the structures? */
326# define Q_FULL_TEMPLATE_INSTANTIATION_MEMCMP
327/* these are not useful to our customers */
328# define QT_QWS_NO_SHM
329# define QT_NO_QWS_MULTIPROCESS
330# define QT_NO_SQL
331# define QT_NO_QWS_CURSOR
332# endif
333
334#elif defined(__GNUC__)
335# define Q_CC_GNU
336# define Q_C_CALLBACKS
337# if __GNUC__ == 2 &amp;&amp; __GNUC_MINOR__ &lt;= 7
338# define Q_FULL_TEMPLATE_INSTANTIATION
339# endif
340/* GCC 2.95 knows "using" but does not support it correctly */
341# if __GNUC__ == 2 &amp;&amp; __GNUC_MINOR__ &lt;= 95
342# define Q_NO_USING_KEYWORD
343# endif
344/* GCC 3.1 and GCC 3.2 wrongly define _SB_CTYPE_MACROS on HP-UX */
345# if defined(Q_OS_HPUX) &amp;&amp; __GNUC__ == 3 &amp;&amp; __GNUC_MINOR__ &gt;= 1
346# define Q_WRONG_SB_CTYPE_MACROS
347# endif
348
349/* ARM gcc pads structs to 32 bits, even when they contain a single
350 char, or short. We tell gcc to pack QChars to 16 bits, to avoid
351 QString bloat. However, gcc 3.4 doesn't allow us to create references to
352 members of a packed struct. (Pointers are OK, because then you
353 supposedly know what you are doing.) */
354# if (defined(__arm__) || defined(__ARMEL__)) &amp;&amp; !defined(QT_MOC_CPP)
355# define Q_PACKED __attribute__ ((packed))
356# if __GNUC__ == 3 &amp;&amp; __GNUC_MINOR__ &gt;= 4
357# define Q_NO_PACKED_REFERENCE
358# endif
359# endif
360# if !defined(__EXCEPTIONS)
361# define Q_NO_EXCEPTIONS
362# endif
363
364/* IBM compiler versions are a bit messy. There are actually two products:
365 the C product, and the C++ product. The C++ compiler is always packaged
366 with the latest version of the C compiler. Version numbers do not always
367 match. This little table (I'm not sure it's accurate) should be helpful:
368
369 C++ product C product
370
371 C Set 3.1 C Compiler 3.0
372 ... ...
373 C++ Compiler 3.6.6 C Compiler 4.3
374 ... ...
375 Visual Age C++ 4.0 ...
376 ... ...
377 Visual Age C++ 5.0 C Compiler 5.0
378 ... ...
379 Visual Age C++ 6.0 C Compiler 6.0
380
381 Now:
382 __xlC__ is the version of the C compiler in hexadecimal notation
383 is only an approximation of the C++ compiler version
384 __IBMCPP__ is the version of the C++ compiler in decimal notation
385 but it is not defined on older compilers like C Set 3.1 */
386#elif defined(__xlC__)
387# define Q_CC_XLC
388# define Q_FULL_TEMPLATE_INSTANTIATION
389# if __xlC__ &lt; 0x400
390# define Q_NO_BOOL_TYPE
391# define Q_NO_EXPLICIT_KEYWORD
392# define Q_NO_USING_KEYWORD
393# define Q_TYPENAME
394# define Q_INLINE_TEMPLATES inline
395# define Q_BROKEN_TEMPLATE_SPECIALIZATION
396# define Q_CANNOT_DELETE_CONSTANT
397# endif
398
399/* Older versions of DEC C++ do not define __EDG__ or __EDG - observed
400 on DEC C++ V5.5-004. New versions do define __EDG__ - observed on
401 Compaq C++ V6.3-002.
402 This compiler is different enough from other EDG compilers to handle
403 it separately anyway. */
404#elif defined(__DECCXX) || defined(__DECC)
405# define Q_CC_DEC
406/* Compaq C++ V6 compilers are EDG-based but I'm not sure about older
407 DEC C++ V5 compilers. */
408# if defined(__EDG__)
409# define Q_CC_EDG
410# endif
411/* Compaq have disabled EDG's _BOOL macro and use _BOOL_EXISTS instead
412 - observed on Compaq C++ V6.3-002.
413 In any case versions prior to Compaq C++ V6.0-005 do not have bool. */
414# if !defined(_BOOL_EXISTS)
415# define Q_NO_BOOL_TYPE
416# endif
417/* Spurious (?) error messages observed on Compaq C++ V6.5-014. */
418# define Q_NO_USING_KEYWORD
419/* Apply to all versions prior to Compaq C++ V6.0-000 - observed on
420 DEC C++ V5.5-004. */
421# if __DECCXX_VER &lt; 60060000
422# define Q_TYPENAME
423# define Q_BROKEN_TEMPLATE_SPECIALIZATION
424# define Q_CANNOT_DELETE_CONSTANT
425# endif
426/* avoid undefined symbol problems with out-of-line template members */
427# define Q_INLINE_TEMPLATES inline
428
429/* Compilers with EDG front end are similar. To detect them we test:
430 __EDG documented by SGI, observed on MIPSpro 7.3.1.1 and KAI C++ 4.0b
431 __EDG__ documented in EDG online docs, observed on Compaq C++ V6.3-002 */
432#elif defined(__EDG) || defined(__EDG__)
433# define Q_CC_EDG
434/* From the EDG documentation (does not seem to apply to Compaq C++):
435 _BOOL
436 Defined in C++ mode when bool is a keyword. The name of this
437 predefined macro is specified by a configuration flag. _BOOL
438 is the default.
439 __BOOL_DEFINED
440 Defined in Microsoft C++ mode when bool is a keyword. */
441# if !defined(_BOOL) &amp;&amp; !defined(__BOOL_DEFINED)
442# define Q_NO_BOOL_TYPE
443# endif
444
445/* The Comeau compiler is based on EDG and does define __EDG__ */
446# if defined(__COMO__)
447# define Q_CC_COMEAU
448# define Q_C_CALLBACKS
449
450/* The `using' keyword was introduced to avoid KAI C++ warnings
451 but it's now causing KAI C++ errors instead. The standard is
452 unclear about the use of this keyword, and in practice every
453 compiler is using its own set of rules. Forget it. */
454# elif defined(__KCC)
455# define Q_CC_KAI
456# if !defined(_EXCEPTIONS)
457# define Q_NO_EXCEPTIONS
458# endif
459# define Q_NO_USING_KEYWORD
460
461/* Using the `using' keyword avoids Intel C++ for Linux warnings */
462# elif defined(__INTEL_COMPILER)
463# define Q_CC_INTEL
464# if !defined(__EXCEPTIONS)
465# define Q_NO_EXCEPTIONS
466# endif
467
468/* The Portland Group compiler is based on EDG and does define __EDG__ */
469# elif defined(__PGI)
470# define Q_CC_PGI
471# if !defined(__EXCEPTIONS)
472# define Q_NO_EXCEPTIONS
473# endif
474
475/* Never tested! */
476# elif defined(__ghs)
477# define Q_CC_GHS
478
479/* The UnixWare 7 UDK compiler is based on EDG and does define __EDG__ */
480# elif defined(__USLC__) &amp;&amp; defined(__SCO_VERSION__)
481# define Q_CC_USLC
482/* The latest UDK 7.1.1b does not need this, but previous versions do */
483# if !defined(__SCO_VERSION__) || (__SCO_VERSION__ &lt; 302200010)
484# define Q_INLINE_TEMPLATES inline
485# endif
486# define Q_NO_USING_KEYWORD /* ### check "using" status */
487
488/* Never tested! */
489# elif defined(CENTERLINE_CLPP) || defined(OBJECTCENTER)
490# define Q_CC_OC
491# define Q_NO_USING_KEYWORD
492
493/* CDS++ defines __EDG__ although this is not documented in the Reliant
494 documentation. It also follows conventions like _BOOL and this documented */
495# elif defined(sinix)
496# define Q_CC_CDS
497# define Q_NO_USING_KEYWORD
498# if defined(__cplusplus) &amp;&amp; (__cplusplus &lt; 2) /* Cfront C++ mode */
499# define Q_NO_EXCEPTIONS
500# endif
501
502/* The MIPSpro compiler in o32 mode is based on EDG but disables features
503 such as template specialization nevertheless */
504# elif defined(__sgi)
505# define Q_CC_MIPS
506# if defined(_MIPS_SIM) &amp;&amp; (_MIPS_SIM == _ABIO32) /* o32 ABI */
507# define Q_TYPENAME
508# define Q_BROKEN_TEMPLATE_SPECIALIZATION
509# define Q_NO_EXPLICIT_KEYWORD
510# define Q_INLINE_TEMPLATES inline
511# elif defined(_COMPILER_VERSION) &amp;&amp; (_COMPILER_VERSION &lt; 730) /* 7.2 */
512# define Q_TYPENAME
513# define Q_BROKEN_TEMPLATE_SPECIALIZATION
514# endif
515# define Q_NO_USING_KEYWORD /* ### check "using" status */
516# if defined(_COMPILER_VERSION) &amp;&amp; (_COMPILER_VERSION &gt;= 740)
517# pragma set woff 3624,3625, 3649 /* turn off some harmless warnings */
518# endif
519# endif
520
521/* The older UnixWare 2.X compiler? */
522#elif defined(__USLC__)
523# define Q_CC_USLC
524# define Q_TYPENAME
525# define Q_NO_BOOL_TYPE
526# define Q_NO_EXPLICIT_KEYWORD
527# define Q_NO_USING_KEYWORD
528# define Q_INLINE_TEMPLATES inline
529
530/* Never tested! */
531#elif defined(__HIGHC__)
532# define Q_CC_HIGHC
533
534#elif defined(__SUNPRO_CC) || defined(__SUNPRO_C)
535# define Q_CC_SUN
536/* 5.0 compiler or better
537 'bool' is enabled by default but can be disabled using -features=nobool
538 in which case _BOOL is not defined
539 this is the default in 4.2 compatibility mode triggered by -compat=4 */
540# if __SUNPRO_CC &gt;= 0x500
541# if !defined(_BOOL)
542# define Q_NO_BOOL_TYPE
543# endif
544# if defined(__SUNPRO_CC_COMPAT) &amp;&amp; (__SUNPRO_CC_COMPAT &lt;= 4)
545# define Q_NO_USING_KEYWORD
546# endif
547# define Q_C_CALLBACKS
548/* 4.2 compiler or older */
549# else
550# define Q_NO_BOOL_TYPE
551# define Q_NO_EXPLICIT_KEYWORD
552# define Q_NO_USING_KEYWORD
553# endif
554
555/* CDS++ does not seem to define __EDG__ or __EDG according to Reliant
556 documentation but nevertheless uses EDG conventions like _BOOL */
557#elif defined(sinix)
558# define Q_CC_EDG
559# define Q_CC_CDS
560# if !defined(_BOOL)
561# define Q_NO_BOOL_TYPE
562# endif
563# define Q_BROKEN_TEMPLATE_SPECIALIZATION
564
565#elif defined(Q_OS_HPUX)
566/* __HP_aCC was not defined in first aCC releases */
567# if defined(__HP_aCC) || __cplusplus &gt;= 199707L
568# define Q_CC_HPACC
569# else
570# define Q_CC_HP
571# define Q_NO_BOOL_TYPE
572# define Q_FULL_TEMPLATE_INSTANTIATION
573# define Q_BROKEN_TEMPLATE_SPECIALIZATION
574# define Q_NO_EXPLICIT_KEYWORD
575# endif
576# define Q_NO_USING_KEYWORD /* ### check "using" status */
577
578#else
579# error "Qt has not been tested with this compiler - talk to qt-bugs@trolltech.com"
580#endif
581
582#ifndef Q_PACKED
583# define Q_PACKED
584#endif
585
586
587/*
588 The window system, must be one of: (Q_WS_x)
589
590 MACX - Mac OS X
591 MAC9 - Mac OS 9
592 QWS - Qt/Embedded
593 WIN32 - Windows
594 X11 - X Window System
595 PM - unsupported
596 WIN16 - unsupported
597*/
598
599#if defined(Q_OS_MAC9)
600# define Q_WS_MAC9
601#elif defined(Q_OS_MSDOS)
602# define Q_WS_WIN16
603# error "Qt requires Win32 and does not work with Windows 3.x"
604#elif defined(_WIN32_X11_)
605# define Q_WS_X11
606#elif defined(Q_OS_WIN32)
607# define Q_WS_WIN32
608# if defined(Q_OS_WIN64)
609# define Q_WS_WIN64
610# endif
611#elif defined(Q_OS_OS2)
612# define Q_WS_PM
613# error "Qt does not work with OS/2 Presentation Manager or Workplace Shell"
614#elif defined(Q_OS_UNIX)
615# if defined(QWS)
616# define Q_WS_QWS
617# define QT_NO_QWS_IM
618# elif defined(Q_OS_MACX)
619# define Q_WS_MACX
620# else
621# define Q_WS_X11
622# endif
623#endif
624#if defined(Q_OS_MAC) &amp;&amp; !defined(QMAC_PASCAL)
625# define QMAC_PASCAL
626#endif
627
628#if defined(Q_WS_WIN16) || defined(Q_WS_WIN32)
629# define Q_WS_WIN
630#endif
631
632#if (defined(Q_WS_MAC9) || defined(Q_WS_MACX)) &amp;&amp; !defined(Q_WS_QWS) &amp;&amp; !defined(Q_WS_X11)
633# define Q_WS_MAC
634#endif
635
636
637/*
638 Some classes do not permit copies to be made of an object.
639 These classes contains a private copy constructor and operator=
640 to disable copying (the compiler gives an error message).
641 Undefine Q_DISABLE_COPY to turn off this checking.
642*/
643
644#define Q_DISABLE_COPY
645
646#if defined(__cplusplus)
647
648
649//
650// Useful type definitions for Qt
651//
652
653#if defined(Q_NO_BOOL_TYPE)
654#if defined(Q_CC_HP)
655// bool is an unsupported reserved keyword in later versions
656#define bool int
657#else
658typedef int bool;
659#endif
660#endif
661
662typedef unsigned char uchar;
663typedef unsigned short ushort;
664typedef unsigned uint;
665typedef unsigned long ulong;
666typedef char *pchar;
667typedef uchar *puchar;
668typedef const char *pcchar;
669
670
671//
672// Constant bool values
673//
674
675#ifndef TRUE
676const bool FALSE = 0;
677const bool TRUE = !0;
678#endif
679#if defined(__WATCOMC__)
680# if defined(Q_OS_QNX4)
681const bool false = FALSE;
682const bool true = TRUE;
683# endif
684#endif
685
686//
687// Proper for-scoping
688// ### turn on in 4.0
689
690#if 0 &amp;&amp; defined(Q_CC_MSVC) &amp;&amp; !defined(Q_CC_MSVC_NET)
691# define for if(0){}else for
692#endif
693
694//
695// Use the "explicit" keyword on platforms that support it.
696//
697
698#if !defined(Q_NO_EXPLICIT_KEYWORD)
699# define Q_EXPLICIT explicit
700#else
701# define Q_EXPLICIT
702#endif
703
704
705//
706// Workaround for static const members on MSVC++.
707//
708
709#if defined(Q_CC_MSVC)
710# define QT_STATIC_CONST static
711# define QT_STATIC_CONST_IMPL
712#else
713# define QT_STATIC_CONST static const
714# define QT_STATIC_CONST_IMPL const
715#endif
716
717
718//
719// Utility macros and inline functions
720//
721
722#define QMAX(a, b) ((b) &lt; (a) ? (a) : (b))
723#define QMIN(a, b) ((a) &lt; (b) ? (a) : (b))
724#define QABS(a) ((a) &gt;= 0 ? (a) : -(a))
725
726inline int qRound( double d )
727{
728 return d &gt;= 0.0 ? int(d + 0.5) : int( d - ((int)d-1) + 0.5 ) + ((int)d-1);
729}
730
731
732//
733// Size-dependent types (architechture-dependent byte order)
734//
735
736#if !defined(QT_CLEAN_NAMESPACE)
737// source compatibility with Qt 1.x
738typedef signed char INT8; // 8 bit signed
739typedef unsigned char UINT8; // 8 bit unsigned
740typedef short INT16; // 16 bit signed
741typedef unsigned short UINT16; // 16 bit unsigned
742typedef int INT32; // 32 bit signed
743typedef unsigned int UINT32; // 32 bit unsigned
744#endif
745
746typedef signed char Q_INT8; // 8 bit signed
747typedef unsigned char Q_UINT8; // 8 bit unsigned
748typedef short Q_INT16; // 16 bit signed
749typedef unsigned short Q_UINT16; // 16 bit unsigned
750typedef int Q_INT32; // 32 bit signed
751typedef unsigned int Q_UINT32; // 32 bit unsigned
752#if defined(Q_OS_WIN64)
753typedef __int64 Q_LONG; // word up to 64 bit signed
754typedef unsigned __int64 Q_ULONG; // word up to 64 bit unsigned
755#else
756typedef long Q_LONG; // word up to 64 bit signed
757typedef unsigned long Q_ULONG; // word up to 64 bit unsigned
758#endif
759#if defined(Q_OS_WIN) &amp;&amp; !defined(Q_CC_GNU)
760# define Q_INT64_C(c) c ## i64 // signed 64 bit constant
761# define Q_UINT64_C(c) c ## ui64 // unsigned 64 bit constant
762typedef __int64 Q_INT64; // 64 bit signed
763typedef unsigned __int64 Q_UINT64; // 64 bit unsigned
764#else
765# define Q_INT64_C(c) c ## LL // signed 64 bit constant
766# define Q_UINT64_C(c) c ## ULL // unsigned 64 bit constant
767typedef long long Q_INT64; // 64 bit signed
768typedef unsigned long long Q_UINT64; // 64 bit unsigned
769#endif
770typedef Q_INT64 Q_LLONG; // signed long long
771typedef Q_UINT64 Q_ULLONG; // unsigned long long
772
773#if defined(Q_OS_MACX) &amp;&amp; !defined(QT_LARGEFILE_SUPPORT)
774# define QT_LARGEFILE_SUPPORT 64
775#endif
776#if defined(QT_LARGEFILE_SUPPORT)
777 typedef Q_ULLONG QtOffset;
778#else
779 typedef Q_ULONG QtOffset;
780#endif
781
782
783//
784// Data stream functions is provided by many classes (defined in qdatastream.h)
785//
786
787class QDataStream;
788
789
790//
791// Feature subsetting
792//
793// Note that disabling some features will produce a libqt that is not
794// compatible with other libqt builds. Such modifications are only
795// supported on Qt/Embedded where reducing the library size is important
796// and where the application-suite is often a fixed set.
797//
798
799#if !defined(QT_MOC)
800#if defined(QCONFIG_LOCAL)
801#include "qconfig-local.h"
802#elif defined(QCONFIG_MINIMAL)
803#include "qconfig-minimal.h"
804#elif defined(QCONFIG_SMALL)
805#include "qconfig-small.h"
806#elif defined(QCONFIG_MEDIUM)
807#include "qconfig-medium.h"
808#elif defined(QCONFIG_LARGE)
809#include "qconfig-large.h"
810#else // everything...
811#include "qconfig.h"
812#endif
813#endif
814
815
816#ifndef QT_BUILD_KEY
817#define QT_BUILD_KEY "unspecified"
818#endif
819
820// prune to local config
821#include "qmodules.h"
822#ifndef QT_MODULE_DIALOGS
823# define QT_NO_DIALOG
824#endif
825#ifndef QT_MODULE_ICONVIEW
826# define QT_NO_ICONVIEW
827#endif
828#ifndef QT_MODULE_WORKSPACE
829# define QT_NO_WORKSPACE
830#endif
831#ifndef QT_MODULE_NETWORK
832#define QT_NO_NETWORK
833#endif
834#ifndef QT_MODULE_CANVAS
835# define QT_NO_CANVAS
836#endif
837#ifndef QT_MODULE_TABLE
838#define QT_NO_TABLE
839#endif
840#ifndef QT_MODULE_XML
841# define QT_NO_XML
842#endif
843#ifndef QT_MODULE_OPENGL
844# define QT_NO_OPENGL
845#endif
846#if !defined(QT_MODULE_SQL)
847# define QT_NO_SQL
848#endif
849
850#if defined(Q_WS_MAC9)
851//No need for menu merging
852# ifndef QMAC_QMENUBAR_NO_MERGE
853# define QMAC_QMENUBAR_NO_MERGE
854# endif
855//Mac9 does not use quartz
856# ifndef QMAC_NO_QUARTZ
857# define QMAC_NO_QUARTZ
858# endif
859# ifndef QMAC_QMENUBAR_NO_EVENT
860# define QMAC_QMENUBAR_NO_EVENT
861# endif
862#endif
863#if defined(Q_WS_MACX) //for no nobody uses quartz, just putting in first level hooks
864# ifndef QMAC_NO_QUARTZ
865# define QMAC_NO_QUARTZ
866# endif
867# ifndef QMAC_QMENUBAR_NO_EVENT
868# define QMAC_QMENUBAR_NO_EVENT
869# endif
870#endif
871
872#if !defined(Q_WS_QWS) &amp;&amp; !defined(QT_NO_COP)
873# define QT_NO_COP
874#endif
875
876#ifndef QT_H
877#include "qfeatures.h"
878#endif /* QT_H */
879
880
881//
882// Create Qt DLL if QT_DLL is defined (Windows only)
883// or QT_SHARED is defined (Kylix only)
884//
885
886#if defined(Q_OS_WIN)
887# if defined(QT_NODLL)
888# undef QT_MAKEDLL
889# undef QT_DLL
890# elif defined(QT_MAKEDLL) /* create a Qt DLL library */
891# if defined(QT_DLL)
892# undef QT_DLL
893# endif
894# define Q_EXPORT __declspec(dllexport)
895# define Q_TEMPLATEDLL
896# define Q_TEMPLATE_EXTERN
897# undef Q_DISABLE_COPY /* avoid unresolved externals */
898# elif defined(QT_DLL) /* use a Qt DLL library */
899# define Q_EXPORT __declspec(dllimport)
900# define Q_TEMPLATEDLL
901# ifndef Q_TEMPLATE_EXTERN
902# if defined(Q_CC_MSVC_NET)
903# define Q_TEMPLATE_EXTERN extern
904# else
905# define Q_TEMPLATE_EXTERN
906# endif
907# endif
908# undef Q_DISABLE_COPY /* avoid unresolved externals */
909# endif
910#elif defined(Q_OS_LINUX) &amp;&amp; defined(Q_CC_BOR)
911# if defined(QT_SHARED) /* create a Qt shared library */
912# define Q_EXPORT __declspec(dllexport)
913# define Q_TEMPLATEDLL
914# define Q_TEMPLATE_EXTERN
915# undef Q_DISABLE_COPY /* avoid unresolved externals */
916# else
917# define Q_TEMPLATEDLL
918# define Q_TEMPLATE_EXTERN
919# undef Q_DISABLE_COPY /* avoid unresolved externals */
920# endif
921#else
922# undef QT_MAKEDLL /* ignore these for other platforms */
923# undef QT_DLL
924#endif
925
926#ifndef Q_EXPORT
927# define Q_EXPORT
928#endif
929
930
931//
932// Some platform specific stuff
933//
934
935#if defined(Q_WS_WIN)
936extern Q_EXPORT bool qt_winunicode;
937#endif
938
939
940//
941// System information
942//
943
944Q_EXPORT const char *qVersion();
945Q_EXPORT bool qSysInfo( int *wordSize, bool *bigEndian );
946Q_EXPORT bool qSharedBuild();
947#if defined(Q_OS_MAC)
948int qMacVersion();
949#elif defined(Q_WS_WIN)
950Q_EXPORT int qWinVersion();
951#if defined(UNICODE)
952#define QT_WA( uni, ansi ) if ( qt_winunicode ) { uni } else { ansi }
953#define QT_WA_INLINE( uni, ansi ) ( qt_winunicode ? uni : ansi )
954#else
955#define QT_WA( uni, ansi ) ansi
956#define QT_WA_INLINE( uni, ansi ) ansi
957#endif
958#endif
959
960#ifdef Q_OS_TEMP
961#ifdef QT_WA
962#undef QT_WA
963#undef QT_WA_INLINE
964#endif
965#define QT_WA( uni, ansi ) uni
966#define QT_WA_INLINE( uni, ansi ) ( uni )
967#endif
968
969#ifndef Q_INLINE_TEMPLATES
970# define Q_INLINE_TEMPLATES
971#endif
972
973#ifndef Q_TYPENAME
974# define Q_TYPENAME typename
975#endif
976
977//
978// Use to avoid "unused parameter" warnings
979//
980#define Q_UNUSED(x) (void)x;
981
982//
983// Debugging and error handling
984//
985
986#if !defined(QT_NO_CHECK)
987# define QT_CHECK_STATE // check state of objects etc.
988# define QT_CHECK_RANGE // check range of indexes etc.
989# define QT_CHECK_NULL // check null pointers
990# define QT_CHECK_MATH // check math functions
991#endif
992
993#if !defined(QT_NO_DEBUG) &amp;&amp; !defined(QT_DEBUG)
994# define QT_DEBUG // display debug messages
995# if !defined(QT_NO_COMPAT) // compatibility with Qt 2
996# if !defined(NO_DEBUG) &amp;&amp; !defined(DEBUG)
997# if !defined(Q_OS_MACX) // clash with MacOS X headers
998# define DEBUG
999# endif
1000# endif
1001# endif
1002#endif
1003
1004
1005Q_EXPORT void qDebug( const char *, ... ) // print debug message
1006#if defined(Q_CC_GNU) &amp;&amp; !defined(__INSURE__)
1007 __attribute__ ((format (printf, 1, 2)))
1008#endif
1009;
1010
1011Q_EXPORT void qWarning( const char *, ... ) // print warning message
1012#if defined(Q_CC_GNU) &amp;&amp; !defined(__INSURE__)
1013 __attribute__ ((format (printf, 1, 2)))
1014#endif
1015;
1016
1017Q_EXPORT void qFatal( const char *, ... ) // print fatal message and exit
1018#if defined(Q_CC_GNU)
1019 __attribute__ ((format (printf, 1, 2)))
1020#endif
1021;
1022
1023Q_EXPORT void qSystemWarning( const char *, int code = -1 );
1024
1025#if !defined(QT_CLEAN_NAMESPACE) // compatibility with Qt 1
1026
1027Q_EXPORT void debug( const char *, ... ) // print debug message
1028#if defined(Q_CC_GNU) &amp;&amp; !defined(__INSURE__)
1029 __attribute__ ((format (printf, 1, 2)))
1030#endif
1031;
1032
1033Q_EXPORT void warning( const char *, ... ) // print warning message
1034#if defined(Q_CC_GNU) &amp;&amp; !defined(__INSURE__)
1035 __attribute__ ((format (printf, 1, 2)))
1036#endif
1037;
1038
1039Q_EXPORT void fatal( const char *, ... ) // print fatal message and exit
1040#if defined(Q_CC_GNU) &amp;&amp; !defined(__INSURE__)
1041 __attribute__ ((format (printf, 1, 2)))
1042#endif
1043;
1044
1045#endif // QT_CLEAN_NAMESPACE
1046
1047
1048#if !defined(Q_ASSERT)
1049# if defined(QT_CHECK_STATE)
1050# if defined(QT_FATAL_ASSERT)
1051# define Q_ASSERT(x) ((x) ? (void)0 : qFatal("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__))
1052# else
1053# define Q_ASSERT(x) ((x) ? (void)0 : qWarning("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__))
1054# endif
1055# else
1056# define Q_ASSERT(x)
1057# endif
1058#endif
1059
1060#if !defined(QT_NO_COMPAT) // compatibility with Qt 2
1061# if !defined(ASSERT)
1062# if !defined(Q_OS_TEMP)
1063# define ASSERT(x) Q_ASSERT(x)
1064# endif
1065# endif
1066#endif // QT_NO_COMPAT
1067
1068
1069Q_EXPORT bool qt_check_pointer( bool c, const char *, int );
1070
1071#if defined(QT_CHECK_NULL)
1072# define Q_CHECK_PTR(p) (qt_check_pointer((p)==0,__FILE__,__LINE__))
1073#else
1074# define Q_CHECK_PTR(p)
1075#endif
1076
1077#if !defined(QT_NO_COMPAT) // compatibility with Qt 2
1078# if !defined(CHECK_PTR)
1079# define CHECK_PTR(x) Q_CHECK_PTR(x)
1080# endif
1081#endif // QT_NO_COMPAT
1082
1083enum QtMsgType { QtDebugMsg, QtWarningMsg, QtFatalMsg };
1084
1085typedef void (*QtMsgHandler)(QtMsgType, const char *);
1086Q_EXPORT QtMsgHandler qInstallMsgHandler( QtMsgHandler );
1087
1088#if !defined(QT_NO_COMPAT) // compatibility with Qt 2
1089typedef QtMsgHandler msg_handler;
1090#endif // QT_NO_COMPAT
1091
1092Q_EXPORT void qSuppressObsoleteWarnings( bool = TRUE );
1093
1094Q_EXPORT void qObsolete( const char *obj, const char *oldfunc,
1095 const char *newfunc );
1096Q_EXPORT void qObsolete( const char *obj, const char *oldfunc );
1097Q_EXPORT void qObsolete( const char *message );
1098
1099
1100//
1101// Install paths from configure
1102//
1103
1104Q_EXPORT const char *qInstallPath();
1105Q_EXPORT const char *qInstallPathDocs();
1106Q_EXPORT const char *qInstallPathHeaders();
1107Q_EXPORT const char *qInstallPathLibs();
1108Q_EXPORT const char *qInstallPathBins();
1109Q_EXPORT const char *qInstallPathPlugins();
1110Q_EXPORT const char *qInstallPathData();
1111Q_EXPORT const char *qInstallPathTranslations();
1112Q_EXPORT const char *qInstallPathSysconf();
1113
1114#endif /* __cplusplus */
1115
1116/*
1117 compilers which follow outdated template instantiation rules
1118 require a class to have a comparison operator to exist when
1119 a QValueList of this type is instantiated. It's not actually
1120 used in the list, though. Hence the dummy implementation.
1121 Just in case other code relies on it we better trigger a warning
1122 mandating a real implementation.
1123*/
1124#ifdef Q_FULL_TEMPLATE_INSTANTIATION
1125# define Q_DUMMY_COMPARISON_OPERATOR(C) \
1126 bool operator==( const C&amp; ) const { \
1127 qWarning( #C"::operator==( const "#C"&amp; ) got called." ); \
1128 return FALSE; \
1129 }
1130#else
1131# define Q_DUMMY_COMPARISON_OPERATOR(C)
1132#endif
1133
1134#endif /* QGLOBAL_H */
1135
1136/*
1137 Avoid some particularly useless warnings from some stupid compilers.
1138 To get ALL C++ compiler warnings, define QT_CC_WARNINGS or comment out
1139 the line "#define QT_NO_WARNINGS"
1140*/
1141
1142#if !defined(QT_CC_WARNINGS)
1143# define QT_NO_WARNINGS
1144#endif
1145#if defined(QT_NO_WARNINGS)
1146# if defined(Q_CC_MSVC)
1147# pragma warning(disable: 4244) // 'conversion' conversion from 'type1' to 'type2', possible loss of data
1148# pragma warning(disable: 4275) // non - DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier'
1149# pragma warning(disable: 4514) // unreferenced inline/local function has been removed
1150# pragma warning(disable: 4800) // 'type' : forcing value to bool 'true' or 'false' (performance warning)
1151# pragma warning(disable: 4097) // typedef-name 'identifier1' used as synonym for class-name 'identifier2'
1152# pragma warning(disable: 4706) // assignment within conditional expression
1153# pragma warning(disable: 4786) // truncating debug info after 255 characters
1154# pragma warning(disable: 4660) // template-class specialization 'identifier' is already instantiated
1155# pragma warning(disable: 4355) // 'this' : used in base member initializer list
1156# pragma warning(disable: 4231) // nonstandard extension used : 'extern' before template explicit instantiation
1157# pragma warning(disable: 4710) // function not inlined
1158# elif defined(Q_CC_BOR)
1159# pragma option -w-inl
1160# pragma option -w-aus
1161# pragma warn -inl
1162# pragma warn -pia
1163# pragma warn -ccc
1164# pragma warn -rch
1165# pragma warn -sig
1166# endif
1167#endif
1168
1169</pre>
1170<!-- eof -->
1171<p><address><hr><div align=center>
1172<table width=100% cellspacing=0 border=0><tr>
1173<td>Copyright &copy; 2007
1174<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
1175<td align=right><div align=right>Qt 3.3.8</div>
1176</table></div></address></body>
1177</html>
Note: See TracBrowser for help on using the repository browser.