You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1114 lines
32 KiB
1114 lines
32 KiB
13 years ago
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||
4 months ago
|
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/include/tqglobal.h:1 -->
|
||
13 years ago
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||
4 months ago
|
<title>tqglobal.h Include File</title>
|
||
13 years ago
|
<style type="text/css"><!--
|
||
|
fn { margin-left: 1cm; text-indent: -1cm; }
|
||
|
a:link { color: #004faf; text-decoration: none }
|
||
|
a:visited { color: #672967; text-decoration: none }
|
||
|
body { background: #ffffff; color: black; }
|
||
|
--></style>
|
||
|
</head>
|
||
|
<body>
|
||
|
|
||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
|
<tr bgcolor="#E5E5E5">
|
||
|
<td valign=center>
|
||
|
<a href="index.html">
|
||
|
<font color="#004faf">Home</font></a>
|
||
|
| <a href="classes.html">
|
||
|
<font color="#004faf">All Classes</font></a>
|
||
|
| <a href="mainclasses.html">
|
||
|
<font color="#004faf">Main Classes</font></a>
|
||
|
| <a href="annotated.html">
|
||
|
<font color="#004faf">Annotated</font></a>
|
||
|
| <a href="groups.html">
|
||
|
<font color="#004faf">Grouped Classes</font></a>
|
||
|
| <a href="functions.html">
|
||
|
<font color="#004faf">Functions</font></a>
|
||
|
</td>
|
||
4 months ago
|
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>tqglobal.h</h1>
|
||
13 years ago
|
|
||
4 months ago
|
<p>This is the verbatim text of the tqglobal.h include file. It is provided only for illustration; the copyright remains with Trolltech.
|
||
13 years ago
|
<hr>
|
||
|
<pre>
|
||
|
/****************************************************************************
|
||
4 months ago
|
** $Id: qt/tqglobal.h 3.3.8 edited Feb 2 15:00 $
|
||
13 years ago
|
**
|
||
|
** Global type declarations and definitions
|
||
|
**
|
||
|
** Created : 920529
|
||
|
**
|
||
|
** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.
|
||
|
**
|
||
|
** This file is part of the tools module of the TQt GUI Toolkit.
|
||
|
**
|
||
|
** This file may be used under the terms of the GNU General Public
|
||
|
** License versions 2.0 or 3.0 as published by the Free Software
|
||
|
** Foundation and appearing in the file LICENSE.GPL included in the
|
||
|
** packaging of this file. Alternatively you may (at your option) use any
|
||
|
** later version of the GNU General Public License if such license has
|
||
|
** been publicly approved by Trolltech ASA (or its successors, if any)
|
||
|
** and the KDE Free TQt Foundation.
|
||
|
**
|
||
|
** Please review the following information to ensure GNU General
|
||
13 years ago
|
** Public Licensing requirements will be met:
|
||
13 years ago
|
** http://trolltech.com/products/qt/licenses/licensing/opensource/.
|
||
|
** If you are unsure which license is appropriate for your use, please
|
||
|
** review the following information:
|
||
|
** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
|
||
|
** or contact the sales department at sales@trolltech.com.
|
||
|
**
|
||
|
** This file may be used under the terms of the Q Public License as
|
||
|
** defined by Trolltech ASA and appearing in the file LICENSE.TQPL
|
||
|
** included in the packaging of this file. Licensees holding valid TQt
|
||
|
** Commercial licenses may use this file in accordance with the TQt
|
||
|
** Commercial License Agreement provided with the Software.
|
||
|
**
|
||
|
** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
|
||
|
** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
|
||
|
** A PARTICULAR PURPOSE. Trolltech reserves all rights not granted
|
||
|
** herein.
|
||
|
**
|
||
|
**********************************************************************/
|
||
|
|
||
|
#ifndef TQGLOBAL_H
|
||
|
#define TQGLOBAL_H
|
||
|
|
||
13 years ago
|
#define TQT_VERSION_STR "3.3.8"
|
||
13 years ago
|
/*
|
||
13 years ago
|
TQT_VERSION is (major << 16) + (minor << 8) + patch.
|
||
13 years ago
|
*/
|
||
13 years ago
|
#define TQT_VERSION 0x030308
|
||
13 years ago
|
|
||
|
/*
|
||
|
The operating system, must be one of: (Q_OS_x)
|
||
|
|
||
|
MACX - Mac OS X
|
||
|
MAC9 - Mac OS 9
|
||
|
DARWIN - Darwin OS (Without Mac OS X)
|
||
|
MSDOS - MS-DOS and Windows
|
||
|
OS2 - OS/2
|
||
|
OS2EMX - XFree86 on OS/2 (not PM)
|
||
|
WIN32 - Win32 (Windows 95/98/ME and Windows NT/2000/XP)
|
||
|
CYGWIN - Cygwin
|
||
|
SOLARIS - Sun Solaris
|
||
|
HPUX - HP-UX
|
||
|
ULTRIX - DEC Ultrix
|
||
|
LINUX - Linux
|
||
|
FREEBSD - FreeBSD
|
||
|
NETBSD - NetBSD
|
||
|
OPENBSD - OpenBSD
|
||
|
BSDI - BSD/OS
|
||
|
IRIX - SGI Irix
|
||
|
OSF - HP Tru64 UNIX
|
||
|
SCO - SCO OpenServer 5
|
||
|
UNIXWARE - UnixWare 7, Open UNIX 8
|
||
|
AIX - AIX
|
||
|
HURD - GNU Hurd
|
||
|
DGUX - DG/UX
|
||
|
RELIANT - Reliant UNIX
|
||
|
DYNIX - DYNIX/ptx
|
||
|
TQNX - TQNX
|
||
|
TQNX6 - TQNX RTP 6.1
|
||
|
LYNX - LynxOS
|
||
|
BSD4 - Any BSD 4.4 system
|
||
|
UNIX - Any UNIX BSD/SYSV system
|
||
|
*/
|
||
|
|
||
|
#if defined(__DARWIN_X11__)
|
||
|
# define Q_OS_DARWIN
|
||
|
#elif defined(__APPLE__) && (defined(__GNUC__) || defined(__xlC__))
|
||
|
# define Q_OS_MACX
|
||
|
#elif defined(__MACOSX__)
|
||
|
# define Q_OS_MACX
|
||
|
#elif defined(macintosh)
|
||
|
# define Q_OS_MAC9
|
||
|
#elif defined(__CYGWIN__)
|
||
|
# define Q_OS_CYGWIN
|
||
|
#elif defined(MSDOS) || defined(_MSDOS)
|
||
|
# define Q_OS_MSDOS
|
||
|
#elif defined(__OS2__)
|
||
|
# if defined(__EMX__)
|
||
|
# define Q_OS_OS2EMX
|
||
|
# else
|
||
|
# define Q_OS_OS2
|
||
|
# endif
|
||
|
#elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))
|
||
|
# define Q_OS_WIN32
|
||
|
# define Q_OS_WIN64
|
||
|
#elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__))
|
||
|
# define Q_OS_WIN32
|
||
|
#elif defined(__MWERKS__) && defined(__INTEL__)
|
||
|
# define Q_OS_WIN32
|
||
|
#elif defined(__sun) || defined(sun)
|
||
|
# define Q_OS_SOLARIS
|
||
|
#elif defined(hpux) || defined(__hpux)
|
||
|
# define Q_OS_HPUX
|
||
|
#elif defined(__ultrix) || defined(ultrix)
|
||
|
# define Q_OS_ULTRIX
|
||
|
#elif defined(sinix)
|
||
|
# define Q_OS_RELIANT
|
||
|
#elif defined(__linux__) || defined(__linux) || defined(__GNU__) || defined(__GLIBC__)
|
||
|
# define Q_OS_LINUX
|
||
|
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
||
|
# define Q_OS_FREEBSD
|
||
|
# define Q_OS_BSD4
|
||
|
#elif defined(__NetBSD__)
|
||
|
# define Q_OS_NETBSD
|
||
|
# define Q_OS_BSD4
|
||
|
#elif defined(__OpenBSD__)
|
||
|
# define Q_OS_OPENBSD
|
||
|
# define Q_OS_BSD4
|
||
|
#elif defined(__bsdi__)
|
||
|
# define Q_OS_BSDI
|
||
|
# define Q_OS_BSD4
|
||
|
#elif defined(__sgi)
|
||
|
# define Q_OS_IRIX
|
||
|
#elif defined(__osf__)
|
||
|
# define Q_OS_OSF
|
||
|
#elif defined(_AIX)
|
||
|
# define Q_OS_AIX
|
||
|
#elif defined(__Lynx__)
|
||
|
# define Q_OS_LYNX
|
||
|
#elif defined(__DGUX__)
|
||
|
# define Q_OS_DGUX
|
||
|
#elif defined(__QNXNTO__)
|
||
|
# define Q_OS_QNX6
|
||
|
#elif defined(__QNX__)
|
||
|
# define Q_OS_QNX
|
||
12 years ago
|
#elif defined(_SEQUENT_)
|
||
13 years ago
|
# define Q_OS_DYNIX
|
||
|
#elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */
|
||
|
# define Q_OS_SCO
|
||
|
#elif defined(__USLC__) /* all SCO platforms + UDK or OUDK */
|
||
|
# define Q_OS_UNIXWARE
|
||
|
# define Q_OS_UNIXWARE7
|
||
|
#elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */
|
||
|
# define Q_OS_UNIXWARE
|
||
|
# define Q_OS_UNIXWARE7
|
||
|
#elif defined(__MAKEDEPEND__)
|
||
|
#else
|
||
|
# error "TQt has not been ported to this OS - talk to qt-bugs@trolltech.com"
|
||
|
#endif
|
||
|
|
||
|
#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
|
||
|
# define Q_OS_WIN
|
||
|
#endif
|
||
|
|
||
|
#if defined(Q_OS_MAC9) || defined(Q_OS_MACX)
|
||
|
# define Q_OS_MAC
|
||
|
#endif
|
||
|
|
||
|
#if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN)
|
||
|
# undef Q_OS_UNIX
|
||
|
#elif !defined(Q_OS_UNIX)
|
||
|
# define Q_OS_UNIX
|
||
|
#endif
|
||
|
|
||
|
#if defined(Q_OS_MACX)
|
||
13 years ago
|
# ifdef MAC_OS_X_VERSION_MIN_REQUIRED
|
||
|
# undef MAC_OS_X_VERSION_MIN_REQUIRED
|
||
13 years ago
|
# endif
|
||
13 years ago
|
# define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_2
|
||
13 years ago
|
# 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 (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_4)
|
||
|
# error "This version of Mac OS X is unsupported"
|
||
|
# endif
|
||
|
#endif
|
||
|
|
||
|
|
||
|
/*
|
||
|
The compiler, must be one of: (Q_CC_x)
|
||
|
|
||
|
SYM - Symantec C++ for both PC and Macintosh
|
||
|
MPW - MPW C++
|
||
|
MWERKS - Metrowerks CodeWarrior
|
||
|
MSVC - Microsoft Visual C/C++, Intel C++ for Windows
|
||
|
BOR - Borland/Turbo C++
|
||
|
WAT - Watcom C++
|
||
|
GNU - GNU C++
|
||
|
COMEAU - Comeau C++
|
||
|
EDG - Edison Design Group C++
|
||
|
OC - CenterLine C++
|
||
|
SUN - Sun WorkShop, Forte Developer, or Sun ONE Studio C++
|
||
|
MIPS - MIPSpro C++
|
||
|
DEC - DEC C++
|
||
|
HP - HPUX C++
|
||
|
HPACC - HPUX ANSI C++
|
||
|
USLC - SCO OUDK, UDK, and UnixWare 2.X C++
|
||
|
CDS - Reliant C++
|
||
|
KAI - KAI C++
|
||
|
INTEL - Intel C++ for Linux, Intel C++ for Windows
|
||
|
HIGHC - MetaWare High C/C++
|
||
|
PGI - Portland Group C++
|
||
|
GHS - Green Hills Optimizing C++ Compilers
|
||
|
|
||
|
Should be sorted most to least authoritative.
|
||
|
*/
|
||
|
|
||
|
/* Symantec C++ is now Digital Mars */
|
||
|
#if defined(__DMC__) || defined(__SC__)
|
||
|
# define Q_CC_SYM
|
||
|
/* "explicit" semantics implemented in 8.1e but keyword recognized since 7.5 */
|
||
|
# if defined(__SC__) && __SC__ < 0x750
|
||
|
# define Q_NO_EXPLICIT_KEYWORD
|
||
|
# endif
|
||
|
# define Q_NO_USING_KEYWORD
|
||
|
# if !defined(_CPPUNWIND)
|
||
|
# define Q_NO_EXCEPTIONS
|
||
|
# endif
|
||
|
|
||
|
#elif defined(applec)
|
||
|
# define Q_CC_MPW
|
||
|
# define Q_NO_BOOL_TYPE
|
||
|
# define Q_NO_EXPLICIT_KEYWORD
|
||
|
# define Q_NO_USING_KEYWORD
|
||
|
|
||
|
#elif defined(__MWERKS__)
|
||
|
# define Q_CC_MWERKS
|
||
|
/* "explicit" recognized since 4.0d1 */
|
||
|
# define TQMAC_PASCAL pascal
|
||
|
|
||
|
#elif defined(_MSC_VER)
|
||
|
# define Q_CC_MSVC
|
||
|
/* proper support of bool for _MSC_VER >= 1100 */
|
||
|
# define Q_CANNOT_DELETE_CONSTANT
|
||
1 year ago
|
# define TQ_INLINE_TEMPLATES inline
|
||
13 years ago
|
/* Visual C++.Net issues for _MSC_VER >= 1300 */
|
||
|
# if _MSC_VER >= 1300
|
||
|
# define Q_CC_MSVC_NET
|
||
|
# if _MSC_VER < 1310 || (defined(Q_OS_WIN64) && defined(_M_IA64))
|
||
1 year ago
|
# define TQ_TYPENAME
|
||
13 years ago
|
# endif
|
||
|
# endif
|
||
|
/* Intel C++ disguising as Visual C++: the `using' keyword avoids warnings */
|
||
|
# if defined(__INTEL_COMPILER)
|
||
|
# define Q_CC_INTEL
|
||
|
# if !defined(__EXCEPTIONS)
|
||
|
# define Q_NO_EXCEPTIONS
|
||
|
# endif
|
||
|
# else
|
||
|
# define Q_NO_USING_KEYWORD /* ### check "using" status */
|
||
|
# endif
|
||
|
|
||
|
#elif defined(__BORLANDC__) || defined(__TURBOC__)
|
||
|
# define Q_CC_BOR
|
||
|
# if __BORLANDC__ < 0x502
|
||
|
# define Q_NO_BOOL_TYPE
|
||
|
# define Q_NO_EXPLICIT_KEYWORD
|
||
|
# endif
|
||
|
# define Q_NO_USING_KEYWORD /* ### check "using" status */
|
||
|
|
||
|
#elif defined(__WATCOMC__)
|
||
|
# define Q_CC_WAT
|
||
|
# if defined(Q_OS_QNX4)
|
||
|
/* compiler flags */
|
||
1 year ago
|
# define TQ_TYPENAME
|
||
13 years ago
|
# define Q_NO_BOOL_TYPE
|
||
|
# define Q_CANNOT_DELETE_CONSTANT
|
||
|
# define mutable
|
||
|
/* ??? */
|
||
|
# define Q_BROKEN_TEMPLATE_SPECIALIZATION
|
||
|
/* no template classes in TQVariant */
|
||
6 years ago
|
# define TQT_NO_TEMPLATE_VARIANT
|
||
13 years ago
|
/* Wcc does not fill in functions needed by valuelists, maps, and
|
||
|
valuestacks implicitly */
|
||
4 years ago
|
# define TQ_FULL_TEMPLATE_INSTANTIATION
|
||
13 years ago
|
/* can we just compare the structures? */
|
||
4 years ago
|
# define TQ_FULL_TEMPLATE_INSTANTIATION_MEMCMP
|
||
13 years ago
|
/* these are not useful to our customers */
|
||
6 years ago
|
# define TQT_NO_SQL
|
||
13 years ago
|
# endif
|
||
|
|
||
|
#elif defined(__GNUC__)
|
||
|
# define Q_CC_GNU
|
||
|
# define Q_C_CALLBACKS
|
||
|
# if __GNUC__ == 2 && __GNUC_MINOR__ <= 7
|
||
4 years ago
|
# define TQ_FULL_TEMPLATE_INSTANTIATION
|
||
13 years ago
|
# endif
|
||
|
/* GCC 2.95 knows "using" but does not support it correctly */
|
||
|
# if __GNUC__ == 2 && __GNUC_MINOR__ <= 95
|
||
|
# define Q_NO_USING_KEYWORD
|
||
|
# endif
|
||
|
/* GCC 3.1 and GCC 3.2 wrongly define _SB_CTYPE_MACROS on HP-UX */
|
||
|
# if defined(Q_OS_HPUX) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1
|
||
|
# define Q_WRONG_SB_CTYPE_MACROS
|
||
|
# endif
|
||
|
|
||
|
/* ARM gcc pads structs to 32 bits, even when they contain a single
|
||
|
char, or short. We tell gcc to pack TQChars to 16 bits, to avoid
|
||
|
TQString bloat. However, gcc 3.4 doesn't allow us to create references to
|
||
|
members of a packed struct. (Pointers are OK, because then you
|
||
|
supposedly know what you are doing.) */
|
||
|
# if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
|
||
13 years ago
|
# define TQ_PACKED __attribute__ ((packed))
|
||
13 years ago
|
# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4
|
||
|
# define Q_NO_PACKED_REFERENCE
|
||
|
# endif
|
||
|
# endif
|
||
|
# if !defined(__EXCEPTIONS)
|
||
|
# define Q_NO_EXCEPTIONS
|
||
|
# endif
|
||
|
|
||
|
/* IBM compiler versions are a bit messy. There are actually two products:
|
||
|
the C product, and the C++ product. The C++ compiler is always packaged
|
||
|
with the latest version of the C compiler. Version numbers do not always
|
||
|
match. This little table (I'm not sure it's accurate) should be helpful:
|
||
|
|
||
|
C++ product C product
|
||
|
|
||
|
C Set 3.1 C Compiler 3.0
|
||
|
... ...
|
||
|
C++ Compiler 3.6.6 C Compiler 4.3
|
||
|
... ...
|
||
|
Visual Age C++ 4.0 ...
|
||
|
... ...
|
||
|
Visual Age C++ 5.0 C Compiler 5.0
|
||
|
... ...
|
||
|
Visual Age C++ 6.0 C Compiler 6.0
|
||
|
|
||
|
Now:
|
||
|
__xlC__ is the version of the C compiler in hexadecimal notation
|
||
|
is only an approximation of the C++ compiler version
|
||
|
__IBMCPP__ is the version of the C++ compiler in decimal notation
|
||
|
but it is not defined on older compilers like C Set 3.1 */
|
||
|
#elif defined(__xlC__)
|
||
|
# define Q_CC_XLC
|
||
4 years ago
|
# define TQ_FULL_TEMPLATE_INSTANTIATION
|
||
13 years ago
|
# if __xlC__ < 0x400
|
||
|
# define Q_NO_BOOL_TYPE
|
||
|
# define Q_NO_EXPLICIT_KEYWORD
|
||
|
# define Q_NO_USING_KEYWORD
|
||
1 year ago
|
# define TQ_TYPENAME
|
||
|
# define TQ_INLINE_TEMPLATES inline
|
||
13 years ago
|
# define Q_BROKEN_TEMPLATE_SPECIALIZATION
|
||
|
# define Q_CANNOT_DELETE_CONSTANT
|
||
|
# endif
|
||
|
|
||
|
/* Older versions of DEC C++ do not define __EDG__ or __EDG - observed
|
||
|
on DEC C++ V5.5-004. New versions do define __EDG__ - observed on
|
||
|
Compaq C++ V6.3-002.
|
||
|
This compiler is different enough from other EDG compilers to handle
|
||
|
it separately anyway. */
|
||
|
#elif defined(__DECCXX) || defined(__DECC)
|
||
|
# define Q_CC_DEC
|
||
|
/* Compaq C++ V6 compilers are EDG-based but I'm not sure about older
|
||
|
DEC C++ V5 compilers. */
|
||
|
# if defined(__EDG__)
|
||
|
# define Q_CC_EDG
|
||
|
# endif
|
||
|
/* Compaq have disabled EDG's _BOOL macro and use _BOOL_EXISTS instead
|
||
|
- observed on Compaq C++ V6.3-002.
|
||
|
In any case versions prior to Compaq C++ V6.0-005 do not have bool. */
|
||
|
# if !defined(_BOOL_EXISTS)
|
||
|
# define Q_NO_BOOL_TYPE
|
||
|
# endif
|
||
|
/* Spurious (?) error messages observed on Compaq C++ V6.5-014. */
|
||
|
# define Q_NO_USING_KEYWORD
|
||
|
/* Apply to all versions prior to Compaq C++ V6.0-000 - observed on
|
||
|
DEC C++ V5.5-004. */
|
||
|
# if __DECCXX_VER < 60060000
|
||
1 year ago
|
# define TQ_TYPENAME
|
||
13 years ago
|
# define Q_BROKEN_TEMPLATE_SPECIALIZATION
|
||
|
# define Q_CANNOT_DELETE_CONSTANT
|
||
|
# endif
|
||
|
/* avoid undefined symbol problems with out-of-line template members */
|
||
1 year ago
|
# define TQ_INLINE_TEMPLATES inline
|
||
13 years ago
|
|
||
|
/* Compilers with EDG front end are similar. To detect them we test:
|
||
|
__EDG documented by SGI, observed on MIPSpro 7.3.1.1 and KAI C++ 4.0b
|
||
|
__EDG__ documented in EDG online docs, observed on Compaq C++ V6.3-002 */
|
||
|
#elif defined(__EDG) || defined(__EDG__)
|
||
|
# define Q_CC_EDG
|
||
|
/* From the EDG documentation (does not seem to apply to Compaq C++):
|
||
|
_BOOL
|
||
|
Defined in C++ mode when bool is a keyword. The name of this
|
||
|
predefined macro is specified by a configuration flag. _BOOL
|
||
|
is the default.
|
||
|
__BOOL_DEFINED
|
||
|
Defined in Microsoft C++ mode when bool is a keyword. */
|
||
|
# if !defined(_BOOL) && !defined(__BOOL_DEFINED)
|
||
|
# define Q_NO_BOOL_TYPE
|
||
|
# endif
|
||
|
|
||
|
/* The Comeau compiler is based on EDG and does define __EDG__ */
|
||
|
# if defined(__COMO__)
|
||
|
# define Q_CC_COMEAU
|
||
|
# define Q_C_CALLBACKS
|
||
|
|
||
|
/* The `using' keyword was introduced to avoid KAI C++ warnings
|
||
|
but it's now causing KAI C++ errors instead. The standard is
|
||
|
unclear about the use of this keyword, and in practice every
|
||
|
compiler is using its own set of rules. Forget it. */
|
||
|
# elif defined(__KCC)
|
||
|
# define Q_CC_KAI
|
||
|
# if !defined(_EXCEPTIONS)
|
||
|
# define Q_NO_EXCEPTIONS
|
||
|
# endif
|
||
|
# define Q_NO_USING_KEYWORD
|
||
|
|
||
|
/* Using the `using' keyword avoids Intel C++ for Linux warnings */
|
||
|
# elif defined(__INTEL_COMPILER)
|
||
|
# define Q_CC_INTEL
|
||
|
# if !defined(__EXCEPTIONS)
|
||
|
# define Q_NO_EXCEPTIONS
|
||
|
# endif
|
||
|
|
||
|
/* The Portland Group compiler is based on EDG and does define __EDG__ */
|
||
|
# elif defined(__PGI)
|
||
|
# define Q_CC_PGI
|
||
|
# if !defined(__EXCEPTIONS)
|
||
|
# define Q_NO_EXCEPTIONS
|
||
|
# endif
|
||
|
|
||
|
/* Never tested! */
|
||
|
# elif defined(__ghs)
|
||
|
# define Q_CC_GHS
|
||
|
|
||
|
/* The UnixWare 7 UDK compiler is based on EDG and does define __EDG__ */
|
||
|
# elif defined(__USLC__) && defined(__SCO_VERSION__)
|
||
|
# define Q_CC_USLC
|
||
|
/* The latest UDK 7.1.1b does not need this, but previous versions do */
|
||
|
# if !defined(__SCO_VERSION__) || (__SCO_VERSION__ < 302200010)
|
||
1 year ago
|
# define TQ_INLINE_TEMPLATES inline
|
||
13 years ago
|
# endif
|
||
|
# define Q_NO_USING_KEYWORD /* ### check "using" status */
|
||
|
|
||
|
/* Never tested! */
|
||
|
# elif defined(CENTERLINE_CLPP) || defined(OBJECTCENTER)
|
||
|
# define Q_CC_OC
|
||
|
# define Q_NO_USING_KEYWORD
|
||
|
|
||
|
/* CDS++ defines __EDG__ although this is not documented in the Reliant
|
||
|
documentation. It also follows conventions like _BOOL and this documented */
|
||
|
# elif defined(sinix)
|
||
|
# define Q_CC_CDS
|
||
|
# define Q_NO_USING_KEYWORD
|
||
|
# if defined(__cplusplus) && (__cplusplus < 2) /* Cfront C++ mode */
|
||
|
# define Q_NO_EXCEPTIONS
|
||
|
# endif
|
||
|
|
||
|
/* The MIPSpro compiler in o32 mode is based on EDG but disables features
|
||
|
such as template specialization nevertheless */
|
||
|
# elif defined(__sgi)
|
||
|
# define Q_CC_MIPS
|
||
|
# if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32) /* o32 ABI */
|
||
1 year ago
|
# define TQ_TYPENAME
|
||
13 years ago
|
# define Q_BROKEN_TEMPLATE_SPECIALIZATION
|
||
|
# define Q_NO_EXPLICIT_KEYWORD
|
||
1 year ago
|
# define TQ_INLINE_TEMPLATES inline
|
||
13 years ago
|
# elif defined(_COMPILER_VERSION) && (_COMPILER_VERSION < 730) /* 7.2 */
|
||
1 year ago
|
# define TQ_TYPENAME
|
||
13 years ago
|
# define Q_BROKEN_TEMPLATE_SPECIALIZATION
|
||
|
# endif
|
||
|
# define Q_NO_USING_KEYWORD /* ### check "using" status */
|
||
|
# if defined(_COMPILER_VERSION) && (_COMPILER_VERSION >= 740)
|
||
|
# pragma set woff 3624,3625, 3649 /* turn off some harmless warnings */
|
||
|
# endif
|
||
|
# endif
|
||
|
|
||
|
/* The older UnixWare 2.X compiler? */
|
||
|
#elif defined(__USLC__)
|
||
|
# define Q_CC_USLC
|
||
1 year ago
|
# define TQ_TYPENAME
|
||
13 years ago
|
# define Q_NO_BOOL_TYPE
|
||
|
# define Q_NO_EXPLICIT_KEYWORD
|
||
|
# define Q_NO_USING_KEYWORD
|
||
1 year ago
|
# define TQ_INLINE_TEMPLATES inline
|
||
13 years ago
|
|
||
|
/* Never tested! */
|
||
|
#elif defined(__HIGHC__)
|
||
|
# define Q_CC_HIGHC
|
||
|
|
||
|
#elif defined(__SUNPRO_CC) || defined(__SUNPRO_C)
|
||
|
# define Q_CC_SUN
|
||
|
/* 5.0 compiler or better
|
||
|
'bool' is enabled by default but can be disabled using -features=nobool
|
||
|
in which case _BOOL is not defined
|
||
|
this is the default in 4.2 compatibility mode triggered by -compat=4 */
|
||
|
# if __SUNPRO_CC >= 0x500
|
||
|
# if !defined(_BOOL)
|
||
|
# define Q_NO_BOOL_TYPE
|
||
|
# endif
|
||
|
# if defined(__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT <= 4)
|
||
|
# define Q_NO_USING_KEYWORD
|
||
|
# endif
|
||
|
# define Q_C_CALLBACKS
|
||
|
/* 4.2 compiler or older */
|
||
|
# else
|
||
|
# define Q_NO_BOOL_TYPE
|
||
|
# define Q_NO_EXPLICIT_KEYWORD
|
||
|
# define Q_NO_USING_KEYWORD
|
||
|
# endif
|
||
|
|
||
|
/* CDS++ does not seem to define __EDG__ or __EDG according to Reliant
|
||
|
documentation but nevertheless uses EDG conventions like _BOOL */
|
||
|
#elif defined(sinix)
|
||
|
# define Q_CC_EDG
|
||
|
# define Q_CC_CDS
|
||
|
# if !defined(_BOOL)
|
||
|
# define Q_NO_BOOL_TYPE
|
||
|
# endif
|
||
|
# define Q_BROKEN_TEMPLATE_SPECIALIZATION
|
||
|
|
||
|
#elif defined(Q_OS_HPUX)
|
||
|
/* __HP_aCC was not defined in first aCC releases */
|
||
|
# if defined(__HP_aCC) || __cplusplus >= 199707L
|
||
|
# define Q_CC_HPACC
|
||
|
# else
|
||
|
# define Q_CC_HP
|
||
|
# define Q_NO_BOOL_TYPE
|
||
4 years ago
|
# define TQ_FULL_TEMPLATE_INSTANTIATION
|
||
13 years ago
|
# define Q_BROKEN_TEMPLATE_SPECIALIZATION
|
||
|
# define Q_NO_EXPLICIT_KEYWORD
|
||
|
# endif
|
||
|
# define Q_NO_USING_KEYWORD /* ### check "using" status */
|
||
|
|
||
|
#else
|
||
|
# error "TQt has not been tested with this compiler - talk to qt-bugs@trolltech.com"
|
||
|
#endif
|
||
|
|
||
13 years ago
|
#ifndef TQ_PACKED
|
||
|
# define TQ_PACKED
|
||
13 years ago
|
#endif
|
||
|
|
||
|
|
||
|
/*
|
||
10 months ago
|
The window system, must be one of: (TQ_WS_x)
|
||
13 years ago
|
|
||
|
MACX - Mac OS X
|
||
|
MAC9 - Mac OS 9
|
||
|
WIN32 - Windows
|
||
|
X11 - X Window System
|
||
|
PM - unsupported
|
||
|
WIN16 - unsupported
|
||
|
*/
|
||
|
|
||
|
#if defined(Q_OS_MAC9)
|
||
10 months ago
|
# define TQ_WS_MAC9
|
||
13 years ago
|
#elif defined(Q_OS_MSDOS)
|
||
10 months ago
|
# define TQ_WS_WIN16
|
||
13 years ago
|
# error "TQt requires Win32 and does not work with Windows 3.x"
|
||
13 years ago
|
#elif defined(_WIN32_X11_)
|
||
10 months ago
|
# define TQ_WS_X11
|
||
13 years ago
|
#elif defined(Q_OS_WIN32)
|
||
10 months ago
|
# define TQ_WS_WIN32
|
||
13 years ago
|
# if defined(Q_OS_WIN64)
|
||
10 months ago
|
# define TQ_WS_WIN64
|
||
13 years ago
|
# endif
|
||
|
#elif defined(Q_OS_OS2)
|
||
10 months ago
|
# define TQ_WS_PM
|
||
13 years ago
|
# error "TQt does not work with OS/2 Presentation Manager or Workplace Shell"
|
||
|
#elif defined(Q_OS_UNIX)
|
||
6 months ago
|
# if defined(Q_OS_MACX)
|
||
10 months ago
|
# define TQ_WS_MACX
|
||
13 years ago
|
# else
|
||
10 months ago
|
# define TQ_WS_X11
|
||
13 years ago
|
# endif
|
||
|
#endif
|
||
|
#if defined(Q_OS_MAC) && !defined(TQMAC_PASCAL)
|
||
|
# define TQMAC_PASCAL
|
||
|
#endif
|
||
|
|
||
10 months ago
|
#if defined(TQ_WS_WIN16) || defined(TQ_WS_WIN32)
|
||
|
# define TQ_WS_WIN
|
||
13 years ago
|
#endif
|
||
|
|
||
6 months ago
|
#if (defined(TQ_WS_MAC9) || defined(TQ_WS_MACX)) && !defined(TQ_WS_X11)
|
||
10 months ago
|
# define TQ_WS_MAC
|
||
13 years ago
|
#endif
|
||
|
|
||
|
|
||
|
/*
|
||
|
Some classes do not permit copies to be made of an object.
|
||
|
These classes contains a private copy constructor and operator=
|
||
|
to disable copying (the compiler gives an error message).
|
||
13 years ago
|
Undefine TQ_DISABLE_COPY to turn off this checking.
|
||
13 years ago
|
*/
|
||
|
|
||
13 years ago
|
#define TQ_DISABLE_COPY
|
||
13 years ago
|
|
||
|
#if defined(__cplusplus)
|
||
|
|
||
|
|
||
|
//
|
||
|
// Useful type definitions for TQt
|
||
|
//
|
||
|
|
||
|
#if defined(Q_NO_BOOL_TYPE)
|
||
|
#if defined(Q_CC_HP)
|
||
|
// bool is an unsupported reserved keyword in later versions
|
||
|
#define bool int
|
||
|
#else
|
||
|
typedef int bool;
|
||
|
#endif
|
||
|
#endif
|
||
|
|
||
|
typedef unsigned char uchar;
|
||
|
typedef unsigned short ushort;
|
||
|
typedef unsigned uint;
|
||
|
typedef unsigned long ulong;
|
||
|
typedef char *pchar;
|
||
|
typedef uchar *puchar;
|
||
|
typedef const char *pcchar;
|
||
|
|
||
|
|
||
|
//
|
||
|
// Constant bool values
|
||
|
//
|
||
|
|
||
|
#ifndef TRUE
|
||
|
const bool FALSE = 0;
|
||
|
const bool TRUE = !0;
|
||
|
#endif
|
||
|
#if defined(__WATCOMC__)
|
||
|
# if defined(Q_OS_QNX4)
|
||
|
const bool false = FALSE;
|
||
|
const bool true = TRUE;
|
||
|
# endif
|
||
|
#endif
|
||
|
|
||
|
//
|
||
|
// Proper for-scoping
|
||
|
// ### turn on in 4.0
|
||
|
|
||
|
#if 0 && defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET)
|
||
|
# define for if(0){}else for
|
||
|
#endif
|
||
|
|
||
|
//
|
||
|
// Use the "explicit" keyword on platforms that support it.
|
||
|
//
|
||
|
|
||
|
#if !defined(Q_NO_EXPLICIT_KEYWORD)
|
||
|
# define Q_EXPLICIT explicit
|
||
|
#else
|
||
|
# define Q_EXPLICIT
|
||
|
#endif
|
||
|
|
||
|
|
||
|
//
|
||
|
// Utility macros and inline functions
|
||
|
//
|
||
|
|
||
|
#define TQMAX(a, b) ((b) < (a) ? (a) : (b))
|
||
|
#define TQMIN(a, b) ((a) < (b) ? (a) : (b))
|
||
|
#define TQABS(a) ((a) >= 0 ? (a) : -(a))
|
||
|
|
||
13 years ago
|
inline int tqRound( double d )
|
||
13 years ago
|
{
|
||
|
return d >= 0.0 ? int(d + 0.5) : int( d - ((int)d-1) + 0.5 ) + ((int)d-1);
|
||
|
}
|
||
|
|
||
|
|
||
|
//
|
||
|
// Size-dependent types (architechture-dependent byte order)
|
||
|
//
|
||
|
|
||
13 years ago
|
typedef signed char TQ_INT8; // 8 bit signed
|
||
|
typedef unsigned char TQ_UINT8; // 8 bit unsigned
|
||
|
typedef short TQ_INT16; // 16 bit signed
|
||
|
typedef unsigned short TQ_UINT16; // 16 bit unsigned
|
||
|
typedef int TQ_INT32; // 32 bit signed
|
||
|
typedef unsigned int TQ_UINT32; // 32 bit unsigned
|
||
13 years ago
|
#if defined(Q_OS_WIN64)
|
||
13 years ago
|
typedef __int64 TQ_LONG; // word up to 64 bit signed
|
||
|
typedef unsigned __int64 TQ_ULONG; // word up to 64 bit unsigned
|
||
13 years ago
|
#else
|
||
13 years ago
|
typedef long TQ_LONG; // word up to 64 bit signed
|
||
|
typedef unsigned long TQ_ULONG; // word up to 64 bit unsigned
|
||
13 years ago
|
#endif
|
||
|
#if defined(Q_OS_WIN) && !defined(Q_CC_GNU)
|
||
13 years ago
|
# define TQ_INT64_C(c) c ## i64 // signed 64 bit constant
|
||
|
# define TQ_UINT64_C(c) c ## ui64 // unsigned 64 bit constant
|
||
13 years ago
|
typedef __int64 TQ_INT64; // 64 bit signed
|
||
|
typedef unsigned __int64 TQ_UINT64; // 64 bit unsigned
|
||
13 years ago
|
#else
|
||
13 years ago
|
# define TQ_INT64_C(c) c ## LL // signed 64 bit constant
|
||
|
# define TQ_UINT64_C(c) c ## ULL // unsigned 64 bit constant
|
||
13 years ago
|
typedef long long TQ_INT64; // 64 bit signed
|
||
|
typedef unsigned long long TQ_UINT64; // 64 bit unsigned
|
||
13 years ago
|
#endif
|
||
13 years ago
|
typedef TQ_INT64 TQ_LLONG; // signed long long
|
||
|
typedef TQ_UINT64 TQ_ULLONG; // unsigned long long
|
||
13 years ago
|
|
||
|
#if defined(Q_OS_MACX) && !defined(QT_LARGEFILE_SUPPORT)
|
||
|
# define QT_LARGEFILE_SUPPORT 64
|
||
|
#endif
|
||
|
#if defined(QT_LARGEFILE_SUPPORT)
|
||
13 years ago
|
typedef TQ_ULLONG TQtOffset;
|
||
13 years ago
|
#else
|
||
13 years ago
|
typedef TQ_ULONG TQtOffset;
|
||
13 years ago
|
#endif
|
||
|
|
||
|
|
||
|
//
|
||
5 months ago
|
// Data stream functions is provided by many classes (defined in tqdatastream.h)
|
||
13 years ago
|
//
|
||
|
|
||
|
class TQDataStream;
|
||
|
|
||
|
|
||
|
//
|
||
|
// Feature subsetting
|
||
|
//
|
||
6 years ago
|
// Note that disabling some features will produce a libtqt that is not
|
||
|
// compatible with other libtqt builds. Such modifications are only
|
||
13 years ago
|
// supported on TQt/Embedded where reducing the library size is important
|
||
|
// and where the application-suite is often a fixed set.
|
||
|
//
|
||
|
|
||
|
#if !defined(QT_MOC)
|
||
|
#if defined(TQCONFIG_LOCAL)
|
||
|
#include "qconfig-local.h"
|
||
|
#elif defined(TQCONFIG_MINIMAL)
|
||
|
#include "qconfig-minimal.h"
|
||
|
#elif defined(TQCONFIG_SMALL)
|
||
|
#include "qconfig-small.h"
|
||
|
#elif defined(TQCONFIG_MEDIUM)
|
||
|
#include "qconfig-medium.h"
|
||
|
#elif defined(TQCONFIG_LARGE)
|
||
|
#include "qconfig-large.h"
|
||
|
#else // everything...
|
||
13 years ago
|
#include "ntqconfig.h"
|
||
13 years ago
|
#endif
|
||
|
#endif
|
||
|
|
||
|
|
||
13 years ago
|
#ifndef TQT_BUILD_KEY
|
||
|
#define TQT_BUILD_KEY "unspecified"
|
||
13 years ago
|
#endif
|
||
|
|
||
|
// prune to local config
|
||
13 years ago
|
#include "ntqmodules.h"
|
||
13 years ago
|
#ifndef TQT_MODULE_DIALOGS
|
||
6 years ago
|
# define TQT_NO_DIALOG
|
||
13 years ago
|
#endif
|
||
13 years ago
|
#ifndef TQT_MODULE_WORKSPACE
|
||
6 years ago
|
# define TQT_NO_WORKSPACE
|
||
13 years ago
|
#endif
|
||
13 years ago
|
#ifndef TQT_MODULE_NETWORK
|
||
6 years ago
|
#define TQT_NO_NETWORK
|
||
13 years ago
|
#endif
|
||
13 years ago
|
#ifndef TQT_MODULE_CANVAS
|
||
6 years ago
|
# define TQT_NO_CANVAS
|
||
13 years ago
|
#endif
|
||
13 years ago
|
#ifndef TQT_MODULE_TABLE
|
||
6 years ago
|
#define TQT_NO_TABLE
|
||
13 years ago
|
#endif
|
||
13 years ago
|
#ifndef TQT_MODULE_XML
|
||
6 years ago
|
# define TQT_NO_XML
|
||
13 years ago
|
#endif
|
||
13 years ago
|
#ifndef TQT_MODULE_OPENGL
|
||
6 years ago
|
# define TQT_NO_OPENGL
|
||
13 years ago
|
#endif
|
||
13 years ago
|
#if !defined(TQT_MODULE_SQL)
|
||
6 years ago
|
# define TQT_NO_SQL
|
||
13 years ago
|
#endif
|
||
|
|
||
10 months ago
|
#if defined(TQ_WS_MAC9)
|
||
13 years ago
|
//No need for menu merging
|
||
|
# ifndef TQMAC_QMENUBAR_NO_MERGE
|
||
|
# define TQMAC_QMENUBAR_NO_MERGE
|
||
|
# endif
|
||
|
//Mac9 does not use quartz
|
||
|
# ifndef TQMAC_NO_QUARTZ
|
||
|
# define TQMAC_NO_QUARTZ
|
||
|
# endif
|
||
|
# ifndef TQMAC_QMENUBAR_NO_EVENT
|
||
|
# define TQMAC_QMENUBAR_NO_EVENT
|
||
|
# endif
|
||
|
#endif
|
||
10 months ago
|
#if defined(TQ_WS_MACX) //for no nobody uses quartz, just putting in first level hooks
|
||
13 years ago
|
# ifndef TQMAC_NO_QUARTZ
|
||
|
# define TQMAC_NO_QUARTZ
|
||
|
# endif
|
||
|
# ifndef TQMAC_QMENUBAR_NO_EVENT
|
||
|
# define TQMAC_QMENUBAR_NO_EVENT
|
||
|
# endif
|
||
|
#endif
|
||
|
|
||
|
#ifndef QT_H
|
||
13 years ago
|
#include "ntqfeatures.h"
|
||
13 years ago
|
#endif /* QT_H */
|
||
|
|
||
|
|
||
|
//
|
||
|
// Create TQt DLL if QT_DLL is defined (Windows only)
|
||
|
// or QT_SHARED is defined (Kylix only)
|
||
|
//
|
||
|
|
||
|
#if defined(Q_OS_WIN)
|
||
|
# if defined(QT_NODLL)
|
||
|
# undef QT_MAKEDLL
|
||
|
# undef QT_DLL
|
||
|
# elif defined(QT_MAKEDLL) /* create a TQt DLL library */
|
||
|
# if defined(QT_DLL)
|
||
|
# undef QT_DLL
|
||
|
# endif
|
||
1 year ago
|
# define TQ_EXPORT __declspec(dllexport)
|
||
13 years ago
|
# define Q_TEMPLATEDLL
|
||
|
# define Q_TEMPLATE_EXTERN
|
||
13 years ago
|
# undef TQ_DISABLE_COPY /* avoid unresolved externals */
|
||
13 years ago
|
# elif defined(QT_DLL) /* use a TQt DLL library */
|
||
1 year ago
|
# define TQ_EXPORT __declspec(dllimport)
|
||
13 years ago
|
# define Q_TEMPLATEDLL
|
||
|
# ifndef Q_TEMPLATE_EXTERN
|
||
|
# if defined(Q_CC_MSVC_NET)
|
||
|
# define Q_TEMPLATE_EXTERN extern
|
||
|
# else
|
||
|
# define Q_TEMPLATE_EXTERN
|
||
|
# endif
|
||
|
# endif
|
||
13 years ago
|
# undef TQ_DISABLE_COPY /* avoid unresolved externals */
|
||
13 years ago
|
# endif
|
||
|
#elif defined(Q_OS_LINUX) && defined(Q_CC_BOR)
|
||
|
# if defined(QT_SHARED) /* create a TQt shared library */
|
||
1 year ago
|
# define TQ_EXPORT __declspec(dllexport)
|
||
13 years ago
|
# define Q_TEMPLATEDLL
|
||
|
# define Q_TEMPLATE_EXTERN
|
||
13 years ago
|
# undef TQ_DISABLE_COPY /* avoid unresolved externals */
|
||
13 years ago
|
# else
|
||
|
# define Q_TEMPLATEDLL
|
||
|
# define Q_TEMPLATE_EXTERN
|
||
13 years ago
|
# undef TQ_DISABLE_COPY /* avoid unresolved externals */
|
||
13 years ago
|
# endif
|
||
|
#else
|
||
|
# undef QT_MAKEDLL /* ignore these for other platforms */
|
||
|
# undef QT_DLL
|
||
|
#endif
|
||
|
|
||
1 year ago
|
#ifndef TQ_EXPORT
|
||
|
# define TQ_EXPORT
|
||
13 years ago
|
#endif
|
||
|
|
||
|
|
||
|
//
|
||
|
// Some platform specific stuff
|
||
|
//
|
||
|
|
||
10 months ago
|
#if defined(TQ_WS_WIN)
|
||
1 year ago
|
extern TQ_EXPORT bool qt_winunicode;
|
||
13 years ago
|
#endif
|
||
|
|
||
|
|
||
|
//
|
||
|
// System information
|
||
|
//
|
||
|
|
||
1 year ago
|
TQ_EXPORT const char *tqVersion();
|
||
|
TQ_EXPORT bool tqSysInfo( int *wordSize, bool *bigEndian );
|
||
|
TQ_EXPORT bool tqSharedBuild();
|
||
13 years ago
|
#if defined(Q_OS_MAC)
|
||
|
int qMacVersion();
|
||
10 months ago
|
#elif defined(TQ_WS_WIN)
|
||
1 year ago
|
TQ_EXPORT int qWinVersion();
|
||
13 years ago
|
#if defined(UNICODE)
|
||
|
#define QT_WA( uni, ansi ) if ( qt_winunicode ) { uni } else { ansi }
|
||
|
#define QT_WA_INLINE( uni, ansi ) ( qt_winunicode ? uni : ansi )
|
||
|
#else
|
||
|
#define QT_WA( uni, ansi ) ansi
|
||
|
#define QT_WA_INLINE( uni, ansi ) ansi
|
||
|
#endif
|
||
|
#endif
|
||
|
|
||
|
#ifdef Q_OS_TEMP
|
||
|
#ifdef QT_WA
|
||
|
#undef QT_WA
|
||
|
#undef QT_WA_INLINE
|
||
|
#endif
|
||
|
#define QT_WA( uni, ansi ) uni
|
||
|
#define QT_WA_INLINE( uni, ansi ) ( uni )
|
||
|
#endif
|
||
|
|
||
1 year ago
|
#ifndef TQ_INLINE_TEMPLATES
|
||
|
# define TQ_INLINE_TEMPLATES
|
||
13 years ago
|
#endif
|
||
|
|
||
1 year ago
|
#ifndef TQ_TYPENAME
|
||
|
# define TQ_TYPENAME typename
|
||
13 years ago
|
#endif
|
||
|
|
||
|
//
|
||
|
// Use to avoid "unused parameter" warnings
|
||
|
//
|
||
|
#define Q_UNUSED(x) (void)x;
|
||
|
|
||
|
//
|
||
|
// Debugging and error handling
|
||
|
//
|
||
|
|
||
6 years ago
|
#if !defined(TQT_NO_CHECK)
|
||
13 years ago
|
# define QT_CHECK_STATE // check state of objects etc.
|
||
|
# define QT_CHECK_RANGE // check range of indexes etc.
|
||
|
# define QT_CHECK_NULL // check null pointers
|
||
|
# define QT_CHECK_MATH // check math functions
|
||
|
#endif
|
||
|
|
||
6 years ago
|
#if !defined(TQT_NO_DEBUG) && !defined(QT_DEBUG)
|
||
13 years ago
|
# define QT_DEBUG // display debug messages
|
||
6 years ago
|
# if !defined(TQT_NO_COMPAT) // compatibility with TQt 2
|
||
13 years ago
|
# if !defined(NO_DEBUG) && !defined(DEBUG)
|
||
|
# if !defined(Q_OS_MACX) // clash with MacOS X headers
|
||
|
# define DEBUG
|
||
|
# endif
|
||
|
# endif
|
||
|
# endif
|
||
|
#endif
|
||
|
|
||
|
|
||
1 year ago
|
TQ_EXPORT void tqDebug( const char *, ... ) // print debug message
|
||
13 years ago
|
#if defined(Q_CC_GNU) && !defined(__INSURE__)
|
||
|
__attribute__ ((format (printf, 1, 2)))
|
||
|
#endif
|
||
|
;
|
||
|
|
||
1 year ago
|
TQ_EXPORT void tqWarning( const char *, ... ) // print warning message
|
||
13 years ago
|
#if defined(Q_CC_GNU) && !defined(__INSURE__)
|
||
|
__attribute__ ((format (printf, 1, 2)))
|
||
|
#endif
|
||
|
;
|
||
|
|
||
1 year ago
|
TQ_EXPORT void tqFatal( const char *, ... ) // print fatal message and exit
|
||
13 years ago
|
#if defined(Q_CC_GNU)
|
||
|
__attribute__ ((format (printf, 1, 2)))
|
||
|
#endif
|
||
|
;
|
||
|
|
||
1 year ago
|
TQ_EXPORT void tqSystemWarning( const char *, int code = -1 );
|
||
13 years ago
|
|
||
|
|
||
|
#if !defined(Q_ASSERT)
|
||
|
# if defined(QT_CHECK_STATE)
|
||
|
# if defined(QT_FATAL_ASSERT)
|
||
13 years ago
|
# define Q_ASSERT(x) ((x) ? (void)0 : tqFatal("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__))
|
||
13 years ago
|
# else
|
||
13 years ago
|
# define Q_ASSERT(x) ((x) ? (void)0 : tqWarning("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__))
|
||
13 years ago
|
# endif
|
||
|
# else
|
||
|
# define Q_ASSERT(x)
|
||
|
# endif
|
||
|
#endif
|
||
|
|
||
6 years ago
|
#if !defined(TQT_NO_COMPAT) // compatibility with TQt 2
|
||
13 years ago
|
# if !defined(ASSERT)
|
||
|
# if !defined(Q_OS_TEMP)
|
||
|
# define ASSERT(x) Q_ASSERT(x)
|
||
|
# endif
|
||
|
# endif
|
||
6 years ago
|
#endif // TQT_NO_COMPAT
|
||
13 years ago
|
|
||
|
|
||
1 year ago
|
TQ_EXPORT bool tqt_check_pointer( bool c, const char *, int );
|
||
13 years ago
|
|
||
|
#if defined(QT_CHECK_NULL)
|
||
13 years ago
|
# define TQ_CHECK_PTR(p) (tqt_check_pointer((p)==0,__FILE__,__LINE__))
|
||
13 years ago
|
#else
|
||
13 years ago
|
# define TQ_CHECK_PTR(p)
|
||
13 years ago
|
#endif
|
||
|
|
||
|
enum TQtMsgType { TQtDebugMsg, TQtWarningMsg, TQtFatalMsg };
|
||
|
|
||
|
typedef void (*TQtMsgHandler)(TQtMsgType, const char *);
|
||
1 year ago
|
TQ_EXPORT TQtMsgHandler qInstallMsgHandler( TQtMsgHandler );
|
||
13 years ago
|
|
||
6 years ago
|
#if !defined(TQT_NO_COMPAT) // compatibility with TQt 2
|
||
13 years ago
|
typedef TQtMsgHandler msg_handler;
|
||
6 years ago
|
#endif // TQT_NO_COMPAT
|
||
13 years ago
|
|
||
1 year ago
|
TQ_EXPORT void tqSuppressObsoleteWarnings( bool = TRUE );
|
||
13 years ago
|
|
||
1 year ago
|
TQ_EXPORT void tqObsolete( const char *obj, const char *oldfunc,
|
||
13 years ago
|
const char *newfunc );
|
||
1 year ago
|
TQ_EXPORT void tqObsolete( const char *obj, const char *oldfunc );
|
||
|
TQ_EXPORT void tqObsolete( const char *message );
|
||
13 years ago
|
|
||
|
|
||
|
//
|
||
|
// Install paths from configure
|
||
|
//
|
||
|
|
||
1 year ago
|
TQ_EXPORT const char *tqInstallPath();
|
||
|
TQ_EXPORT const char *tqInstallPathDocs();
|
||
|
TQ_EXPORT const char *tqInstallPathHeaders();
|
||
|
TQ_EXPORT const char *tqInstallPathLibs();
|
||
|
TQ_EXPORT const char *tqInstallPathBins();
|
||
|
TQ_EXPORT const char *tqInstallPathPlugins();
|
||
|
TQ_EXPORT const char *tqInstallPathData();
|
||
|
TQ_EXPORT const char *tqInstallPathTranslations();
|
||
|
TQ_EXPORT const char *tqInstallPathSysconf();
|
||
13 years ago
|
|
||
|
#endif /* __cplusplus */
|
||
|
|
||
|
/*
|
||
|
compilers which follow outdated template instantiation rules
|
||
13 years ago
|
require a class to have a comparison operator to exist when
|
||
13 years ago
|
a TQValueList of this type is instantiated. It's not actually
|
||
|
used in the list, though. Hence the dummy implementation.
|
||
|
Just in case other code relies on it we better trigger a warning
|
||
|
mandating a real implementation.
|
||
|
*/
|
||
4 years ago
|
#ifdef TQ_FULL_TEMPLATE_INSTANTIATION
|
||
1 year ago
|
# define TQ_DUMMY_COMPARISON_OPERATOR(C) \
|
||
13 years ago
|
bool operator==( const C& ) const { \
|
||
13 years ago
|
tqWarning( #C"::operator==( const "#C"& ) got called." ); \
|
||
13 years ago
|
return FALSE; \
|
||
|
}
|
||
|
#else
|
||
1 year ago
|
# define TQ_DUMMY_COMPARISON_OPERATOR(C)
|
||
13 years ago
|
#endif
|
||
|
|
||
|
#endif /* TQGLOBAL_H */
|
||
|
|
||
|
/*
|
||
|
Avoid some particularly useless warnings from some stupid compilers.
|
||
|
To get ALL C++ compiler warnings, define QT_CC_WARNINGS or comment out
|
||
6 years ago
|
the line "#define TQT_NO_WARNINGS"
|
||
13 years ago
|
*/
|
||
|
|
||
|
#if !defined(QT_CC_WARNINGS)
|
||
6 years ago
|
# define TQT_NO_WARNINGS
|
||
13 years ago
|
#endif
|
||
6 years ago
|
#if defined(TQT_NO_WARNINGS)
|
||
13 years ago
|
# if defined(Q_CC_MSVC)
|
||
|
# pragma warning(disable: 4244) // 'conversion' conversion from 'type1' to 'type2', possible loss of data
|
||
|
# pragma warning(disable: 4275) // non - DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier'
|
||
|
# pragma warning(disable: 4514) // unreferenced inline/local function has been removed
|
||
|
# pragma warning(disable: 4800) // 'type' : forcing value to bool 'true' or 'false' (performance warning)
|
||
|
# pragma warning(disable: 4097) // typedef-name 'identifier1' used as synonym for class-name 'identifier2'
|
||
|
# pragma warning(disable: 4706) // assignment within conditional expression
|
||
|
# pragma warning(disable: 4786) // truncating debug info after 255 characters
|
||
|
# pragma warning(disable: 4660) // template-class specialization 'identifier' is already instantiated
|
||
|
# pragma warning(disable: 4355) // 'this' : used in base member initializer list
|
||
|
# pragma warning(disable: 4231) // nonstandard extension used : 'extern' before template explicit instantiation
|
||
|
# pragma warning(disable: 4710) // function not inlined
|
||
|
# elif defined(Q_CC_BOR)
|
||
|
# pragma option -w-inl
|
||
|
# pragma option -w-aus
|
||
|
# pragma warn -inl
|
||
|
# pragma warn -pia
|
||
|
# pragma warn -ccc
|
||
|
# pragma warn -rch
|
||
|
# pragma warn -sig
|
||
|
# endif
|
||
|
#endif
|
||
|
|
||
|
</pre>
|
||
|
<!-- eof -->
|
||
|
<p><address><hr><div align=center>
|
||
|
<table width=100% cellspacing=0 border=0><tr>
|
||
|
<td>Copyright © 2007
|
||
|
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
||
|
<td align=right><div align=right>TQt 3.3.8</div>
|
||
|
</table></div></address></body>
|
||
|
</html>
|