home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / KDChartGlobal.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-05-30  |  4.6 KB  |  204 lines

  1. /* -*- Mode: C++ -*-
  2.    KDChart - a multi-platform charting engine
  3.    */
  4.  
  5. /****************************************************************************
  6.  ** Copyright (C) 2001-2003 Klar├ñlvdalens Datakonsult AB.  All rights reserved.
  7.  **
  8.  ** This file is part of the KDChart library.
  9.  **
  10.  ** This file may be distributed and/or modified under the terms of the
  11.  ** GNU General Public License version 2 as published by the Free Software
  12.  ** Foundation and appearing in the file LICENSE.GPL included in the
  13.  ** packaging of this file.
  14.  **
  15.  ** Licensees holding valid commercial KDChart licenses may use this file in
  16.  ** accordance with the KDChart Commercial License Agreement provided with
  17.  ** the Software.
  18.  **
  19.  ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20.  ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21.  **
  22.  ** See http://www.klaralvdalens-datakonsult.se/?page=products for
  23.  **   information about KDChart Commercial License Agreements.
  24.  **
  25.  ** Contact info@klaralvdalens-datakonsult.se if any conditions of this
  26.  ** licensing are not clear to you.
  27.  **
  28.  **********************************************************************/
  29. #ifndef __KDCHARTGLOBAL_H__
  30. #define __KDCHARTGLOBAL_H__
  31.  
  32. #include <qglobal.h>
  33.  
  34. #include <float.h>
  35.  
  36. #if defined(unix) || defined(__unix__) || defined(Q_WS_MAC) || defined(Q_WS_LINUX)
  37. #include <limits.h>
  38. #else
  39. #define MINDOUBLE DBL_MIN
  40. #define MAXDOUBLE DBL_MAX
  41. #endif
  42.  
  43. #if defined(_MSC_VER)
  44. #pragma warning(disable: 4251)
  45. #endif
  46. #include <kdchart_export.h>
  47.  
  48.  
  49. /* \file KDChartGlobal.h
  50.    \brief Definition of global macros.
  51.    */
  52.  
  53.  
  54.  
  55. #if defined(_MSC_VER)
  56. #ifndef QT_NO_STL
  57. #define QT_NO_STL // Avoid a name clash
  58. #endif
  59. #endif
  60.  
  61.  
  62.  
  63. // important: make the old format of QT_VERSION comparable
  64. //            to the new format that is used since Qt 3.0.0
  65. #if QT_VERSION == 141
  66. #define COMPAT_QT_VERSION 0x010401
  67. #endif
  68. #if QT_VERSION == 142
  69. #define COMPAT_QT_VERSION 0x010402
  70. #endif
  71. #if QT_VERSION == 143
  72. #define COMPAT_QT_VERSION 0x010403
  73. #endif
  74. #if QT_VERSION == 144
  75. #define COMPAT_QT_VERSION 0x010404
  76. #endif
  77. #if QT_VERSION == 145
  78. #define COMPAT_QT_VERSION 0x010405
  79. #endif
  80. #if QT_VERSION == 200
  81. #define COMPAT_QT_VERSION 0x020000
  82. #endif
  83. #if QT_VERSION == 201
  84. #define COMPAT_QT_VERSION 0x020001
  85. #endif
  86. #if QT_VERSION == 202
  87. #define COMPAT_QT_VERSION 0x020002
  88. #endif
  89. #if QT_VERSION == 210
  90. #define COMPAT_QT_VERSION 0x020100
  91. #endif
  92. #if QT_VERSION == 211
  93. #define COMPAT_QT_VERSION 0x020101
  94. #endif
  95. #if QT_VERSION == 220
  96. #define COMPAT_QT_VERSION 0x020200
  97. #endif
  98. #if QT_VERSION == 221
  99. #define COMPAT_QT_VERSION 0x020201
  100. #endif
  101. #if QT_VERSION == 222
  102. #define COMPAT_QT_VERSION 0x020202
  103. #endif
  104. #if QT_VERSION == 223
  105. #define COMPAT_QT_VERSION 0x020203
  106. #endif
  107. #if QT_VERSION == 224
  108. #define COMPAT_QT_VERSION 0x020204
  109. #endif
  110. #if QT_VERSION == 230
  111. #define COMPAT_QT_VERSION 0x020300
  112. #endif
  113. #if QT_VERSION == 231
  114. #define COMPAT_QT_VERSION 0x020301
  115. #endif
  116. #if QT_VERSION == 232
  117. #define COMPAT_QT_VERSION 0x020302
  118. #if defined(_MSC_VER)
  119. #pragma message( "using Qt 2.3.2" )
  120. #endif
  121. #endif
  122. #if QT_VERSION == 300
  123. #define COMPAT_QT_VERSION 0x030000
  124. #endif
  125. #if QT_VERSION == 301
  126. #define COMPAT_QT_VERSION 0x030001
  127. #endif
  128. #if QT_VERSION == 302
  129. #define COMPAT_QT_VERSION 0x030002
  130. #endif
  131. #if QT_VERSION == 303
  132. #define COMPAT_QT_VERSION 0x030003
  133. #endif
  134. #if QT_VERSION == 304
  135. #define COMPAT_QT_VERSION 0x030004
  136. #endif
  137. #if QT_VERSION == 305
  138. #define COMPAT_QT_VERSION 0x030005
  139. #endif
  140. #if QT_VERSION == 310
  141. #define COMPAT_QT_VERSION 0x030100
  142. #endif
  143. // --- new format since Qt 3.0.0 or since 3.0.4 ???
  144. #ifndef COMPAT_QT_VERSION
  145. #if defined(_MSC_VER)
  146. #pragma message( "using Qt > 2.3.2" )
  147. #endif
  148. #define COMPAT_QT_VERSION QT_VERSION
  149. #endif
  150.  
  151. // since Qt 3.1 they do /not/ include limits.h or climits on windows anymore
  152. // so we must include that manually
  153. #if COMPAT_QT_VERSION > 0x030099
  154. #if defined(_MSC_VER)
  155. #include <climits>
  156. #endif
  157. #endif
  158.  
  159.  
  160. #if COMPAT_QT_VERSION < 0x030000
  161.  
  162. #if !defined(Q_ASSERT)
  163. #if defined(QT_CHECK_STATE)
  164. #if defined(QT_FATAL_ASSERT)
  165. #define Q_ASSERT(x)  ((x) ? (void)0 : qFatal("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__))
  166. #else
  167. #define Q_ASSERT(x)  ((x) ? (void)0 : qWarning("ASSERT: \"%s\" in %s (%d)",#x,__FILE__,__LINE__))
  168. #endif
  169. #else
  170. #define Q_ASSERT(x)
  171. #endif
  172. #endif
  173.  
  174. #if !defined(QT_NO_COMPAT)
  175. // source compatibility with Qt 2.x
  176. #ifndef Q_OS_TEMP
  177. #  if !defined(ASSERT)
  178. #    define ASSERT(x) Q_ASSERT(x)
  179. #  endif
  180. #endif // Q_OS_TEMP
  181. #endif // QT_NO_COMPAT
  182.  
  183. #define QPtrList QList
  184. #define QPtrListIterator QListIterator
  185. #define QPtrVector QVector
  186. #define QMemArray QArray
  187.  
  188. #include <qlist.h>
  189. #include <qvector.h>
  190. #include <qarray.h>
  191.  
  192. #else
  193.  
  194. #include <qptrlist.h>
  195. #include <qptrvector.h>
  196. #include <qmemarray.h>
  197.  
  198. #endif
  199. // end of #if COMPAT_QT_VERSION < 0x030000
  200.  
  201.  
  202.  
  203. #endif
  204.