kchart

KDChartGlobal.h

00001 /* -*- Mode: C++ -*-
00002    KDChart - a multi-platform charting engine
00003    */
00004 
00005 /****************************************************************************
00006  ** Copyright (C) 2001-2003 Klar�vdalens Datakonsult AB.  All rights reserved.
00007  **
00008  ** This file is part of the KDChart library.
00009  **
00010  ** This file may be distributed and/or modified under the terms of the
00011  ** GNU General Public License version 2 as published by the Free Software
00012  ** Foundation and appearing in the file LICENSE.GPL included in the
00013  ** packaging of this file.
00014  **
00015  ** Licensees holding valid commercial KDChart licenses may use this file in
00016  ** accordance with the KDChart Commercial License Agreement provided with
00017  ** the Software.
00018  **
00019  ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00020  ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00021  **
00022  ** See http://www.klaralvdalens-datakonsult.se/?page=products for
00023  **   information about KDChart Commercial License Agreements.
00024  **
00025  ** Contact info@klaralvdalens-datakonsult.se if any conditions of this
00026  ** licensing are not clear to you.
00027  **
00028  **********************************************************************/
00029 #ifndef __KDCHARTGLOBAL_H__
00030 #define __KDCHARTGLOBAL_H__
00031 
00032 #include <qglobal.h>
00033 
00034 #include <float.h>
00035 
00036 #if defined(unix) || defined(__unix__) || defined(Q_WS_MAC) || defined(Q_WS_LINUX)
00037 #include <limits.h>
00038 #else
00039 #define MINDOUBLE DBL_MIN
00040 #define MAXDOUBLE DBL_MAX
00041 #endif
00042 
00043 #if defined(_MSC_VER)
00044 #pragma warning(disable: 4251)
00045 #endif
00046 #include <kdchart_export.h>
00047 
00048 
00049 /* \file KDChartGlobal.h
00050    \brief Definition of global macros.
00051    */
00052 
00053 
00054 
00055 #if defined(_MSC_VER)
00056 #ifndef QT_NO_STL
00057 #define QT_NO_STL // Avoid a name clash
00058 #endif
00059 #endif
00060 
00061 
00062 
00063 // important: make the old format of QT_VERSION comparable
00064 //            to the new format that is used since Qt 3.0.0
00065 #if QT_VERSION == 141
00066 #define COMPAT_QT_VERSION 0x010401
00067 #endif
00068 #if QT_VERSION == 142
00069 #define COMPAT_QT_VERSION 0x010402
00070 #endif
00071 #if QT_VERSION == 143
00072 #define COMPAT_QT_VERSION 0x010403
00073 #endif
00074 #if QT_VERSION == 144
00075 #define COMPAT_QT_VERSION 0x010404
00076 #endif
00077 #if QT_VERSION == 145
00078 #define COMPAT_QT_VERSION 0x010405
00079 #endif
00080 #if QT_VERSION == 200
00081 #define COMPAT_QT_VERSION 0x020000
00082 #endif
00083 #if QT_VERSION == 201
00084 #define COMPAT_QT_VERSION 0x020001
00085 #endif
00086 #if QT_VERSION == 202
00087 #define COMPAT_QT_VERSION 0x020002
00088 #endif
00089 #if QT_VERSION == 210
00090 #define COMPAT_QT_VERSION 0x020100
00091 #endif
00092 #if QT_VERSION == 211
00093 #define COMPAT_QT_VERSION 0x020101
00094 #endif
00095 #if QT_VERSION == 220
00096 #define COMPAT_QT_VERSION 0x020200
00097 #endif
00098 #if QT_VERSION == 221
00099 #define COMPAT_QT_VERSION 0x020201
00100 #endif
00101 #if QT_VERSION == 222
00102 #define COMPAT_QT_VERSION 0x020202
00103 #endif
00104 #if QT_VERSION == 223
00105 #define COMPAT_QT_VERSION 0x020203
00106 #endif
00107 #if QT_VERSION == 224
00108 #define COMPAT_QT_VERSION 0x020204
00109 #endif
00110 #if QT_VERSION == 230
00111 #define COMPAT_QT_VERSION 0x020300
00112 #endif
00113 #if QT_VERSION == 231
00114 #define COMPAT_QT_VERSION 0x020301
00115 #endif
00116 #if QT_VERSION == 232
00117 #define COMPAT_QT_VERSION 0x020302
00118 #if defined(_MSC_VER)
00119 #pragma message( "using Qt 2.3.2" )
00120 #endif
00121 #endif
00122 #if QT_VERSION == 300
00123 #define COMPAT_QT_VERSION 0x030000
00124 #endif
00125 #if QT_VERSION == 301
00126 #define COMPAT_QT_VERSION 0x030001
00127 #endif
00128 #if QT_VERSION == 302
00129 #define COMPAT_QT_VERSION 0x030002
00130 #endif
00131 #if QT_VERSION == 303
00132 #define COMPAT_QT_VERSION 0x030003
00133 #endif
00134 #if QT_VERSION == 304
00135 #define COMPAT_QT_VERSION 0x030004
00136 #endif
00137 #if QT_VERSION == 305
00138 #define COMPAT_QT_VERSION 0x030005
00139 #endif
00140 #if QT_VERSION == 310
00141 #define COMPAT_QT_VERSION 0x030100
00142 #endif
00143 // --- new format since Qt 3.0.0 or since 3.0.4 ???
00144 #ifndef COMPAT_QT_VERSION
00145 #if defined(_MSC_VER)
00146 #pragma message( "using Qt > 2.3.2" )
00147 #endif
00148 #define COMPAT_QT_VERSION QT_VERSION
00149 #endif
00150 
00151 // since Qt 3.1 they do /not/ include limits.h or climits on windows anymore
00152 // so we must include that manually
00153 #if COMPAT_QT_VERSION > 0x030099
00154 #if defined(_MSC_VER)
00155 #include <climits>
00156 #endif
00157 #endif
00158 
00159 
00160 #if COMPAT_QT_VERSION < 0x030000
00161 
00162 #if !defined(Q_ASSERT)
00163 #if defined(QT_CHECK_STATE)
00164 #if defined(QT_FATAL_ASSERT)
00165 #define Q_ASSERT(x)  ((x) ? (void)0 : qFatal("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__))
00166 #else
00167 #define Q_ASSERT(x)  ((x) ? (void)0 : qWarning("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__))
00168 #endif
00169 #else
00170 #define Q_ASSERT(x)
00171 #endif
00172 #endif
00173 
00174 #if !defined(QT_NO_COMPAT)
00175 // source compatibility with Qt 2.x
00176 #ifndef Q_OS_TEMP
00177 #  if !defined(ASSERT)
00178 #    define ASSERT(x) Q_ASSERT(x)
00179 #  endif
00180 #endif // Q_OS_TEMP
00181 #endif // QT_NO_COMPAT
00182 
00183 #define QPtrList QList
00184 #define QPtrListIterator QListIterator
00185 #define QPtrVector QVector
00186 #define QMemArray QArray
00187 
00188 #include <qlist.h>
00189 #include <qvector.h>
00190 #include <qarray.h>
00191 
00192 #else
00193 
00194 #include <qptrlist.h>
00195 #include <qptrvector.h>
00196 #include <qmemarray.h>
00197 
00198 #endif
00199 // end of #if COMPAT_QT_VERSION < 0x030000
00200 
00201 
00202 
00203 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys