options.h
00001 #ifndef _KPILOT_OPTIONS_H
00002 #define _KPILOT_OPTIONS_H
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
00039 #define USE_KHEXEDIT
00040
00041
00042
00043
00044
00045 #ifdef HAVE_CONFIG_H
00046 #include "config.h"
00047 #endif
00048
00049 #ifndef QT_VERSION
00050 #include <qglobal.h>
00051 #endif
00052
00053 #if (QT_VERSION < 223)
00054 #error "This is KPilot for KDE2 and won't compile with Qt < 2.2.3"
00055 #endif
00056
00057 #ifndef KDE_VERSION
00058 #include <kdeversion.h>
00059 #endif
00060
00061 #if KDE_VERSION > 289
00062 #define KDE3
00063 #undef KDE2
00064 #else
00065 #undef KDE3
00066 #define KDE2
00067 #endif
00068
00069
00070
00071
00072
00073
00074
00075 #ifdef DEBUG_CERR
00076 #define DEBUGFUNC cerr
00077 #else
00078 #define DEBUGFUNC kdDebug()
00079 #endif
00080
00081
00082 #include <iostream>
00083
00084 #include <qstring.h>
00085
00086 #include <klocale.h>
00087
00088 #include <kdebug.h>
00089
00090 using namespace std;
00091
00092
00093
00094
00095
00096
00097 #define KPILOT_AREA 5510
00098 #define DAEMON_AREA 5511
00099 #define CONDUIT_AREA 5512
00100 #define LIBPILOTDB_AREA 5513
00101
00102 #ifdef DEBUG_CERR
00103 #define DEBUGSTREAM ostream
00104 #define DEBUGKPILOT cerr
00105 #define DEBUGDAEMON cerr
00106 #define DEBUGCONDUIT cerr
00107 #define DEBUGDB cerr
00108 #else
00109 #define DEBUGSTREAM kdbgstream
00110 #define DEBUGKPILOT kdDebug(KPILOT_AREA)
00111 #define DEBUGDAEMON kdDebug(DAEMON_AREA)
00112 #define DEBUGCONDUIT kdDebug(CONDUIT_AREA)
00113 #define DEBUGDB kdDebug(LIBPILOTDB_AREA)
00114 #endif
00115
00116 #define KPILOT_VERSION "4.4.1"
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130 extern int debug_level;
00131 extern const char *debug_spaces;
00132
00133
00134 QString rtExpand(const QString &s, bool richText=true);
00135
00136
00137 #ifdef DEBUG
00138
00139
00140
00141
00142
00143 #ifdef __GNUC__
00144 #define KPILOT_FNAMEDEF static const char *fname=__FUNCTION__
00145 #define KPILOT_LOCNDEF debug_spaces+(::strlen(fname)) \
00146 << "(" << __FILE__ << ":" << \
00147 __LINE__ << ")\n"
00148 #else
00149 #define KPILOT_FNAMEDEF static const char *fname=__FILE__ ":" "__LINE__"
00150 #define KPILOT_LOCNDEF "\n"
00151 #endif
00152
00153 #define FUNCTIONSETUP KPILOT_FNAMEDEF; \
00154 if (debug_level) { DEBUGFUNC << \
00155 fname << KPILOT_LOCNDEF ; }
00156 #define FUNCTIONSETUPL(l) KPILOT_FNAMEDEF; \
00157 if (debug_level>l) { DEBUGFUNC << \
00158 fname << KPILOT_LOCNDEF; }
00159
00160 class KConfig;
00161
00162
00163
00164
00165
00166 QString qstringExpansion(const QString &);
00167 QString charExpansion(const char *);
00168
00169 #else
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186 #define FUNCTIONSETUP
00187 #define FUNCTIONSETUPL(a)
00188 #endif
00189
00190 class KConfig;
00191
00192
00193
00194
00195
00196 QString qstringExpansion(const QString &);
00197 QString charExpansion(const char *);
00198
00199 inline ostream& operator <<(ostream &o,const QString &s) { if (s.isEmpty()) return o; else return o<<s.latin1(); }
00200 inline ostream& operator <<(ostream &o,const QCString &s) { return (o << *s ); }
00201
00205 QDateTime readTm(const struct tm &t);
00209 struct tm writeTm(const QDateTime &dt);
00210 struct tm writeTm(const QDate &dt);
00211
00212
00213
00214
00215
00216
00217
00218
00219 #define SPACING (10)
00220
00221
00222
00223
00224
00225 #define KPILOT_FREE(a) { if (a) { ::free(a); a=0L; } }
00226 #define KPILOT_DELETE(a) { if (a) { delete a; a=0L; } }
00227
00228
00229
00230
00231
00232
00233 #define TODO_I18N(a) QString::fromLatin1(a)
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246 #define CSL1(a) QString::fromLatin1(a "")
00247
00248 #endif
This file is part of the documentation for kpilot Library Version 3.2.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Mar 6 17:18:08 2004 by
doxygen 1.3.6-20040222 written by
Dimitri van Heesch, © 1997-2003