kexi

kexi_global.h

00001 /* This file is part of the KDE project
00002    Copyright (c) 2003-2005 Kexi Team
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef _KEXI_GLOBAL_
00021 #define _KEXI_GLOBAL_
00022 
00028 //#define KEXI_STANDALONE 1
00029 
00030 #include <kexi_export.h>
00031 #include <config.h>
00032 
00033 #define kexidbg  kdDebug(44010)   
00034 #define kexicoredbg  kdDebug(44020)   
00035 #define kexipluginsdbg kdDebug(44021) 
00036 #define kexiwarn  kdWarning(44010)
00037 #define kexicorewarn kdWarning(44020)
00038 #define kexipluginswarn kdWarning(44021)
00039 
00040 /* useful macros */
00041 
00043 #define foreach(_class, _variable, _list) \
00044     for (_class _variable = (_list).constBegin(); _variable!=(_list).constEnd(); ++_variable)
00045 
00047 #define foreach_nonconst(_class, _variable, _list) \
00048     for (_class _variable = (_list).begin(); _variable!=(_list).end(); ++_variable)
00049 
00051 #define foreach_list(_class, _variable, _list) \
00052     for (_class _variable(_list); _variable.current(); ++_variable)
00053 
00054 #define foreach_dict(_class, _variable, _list) foreach_list(_class, _variable, _list)
00055 
00056 #ifndef futureI18n
00057 # ifdef USE_FUTURE_I18N
00058 #  define futureI18n(a) QObject::tr(a)
00059 #  define futureI18n2(a,b) QObject::tr(b)
00060 # else
00061 #  define futureI18n(a) QString(a)
00062 #  define futureI18n2(a,b) QString(b)
00063 # endif
00064 #endif
00065 
00066 #ifndef FUTURE_I18N_NOOP
00067 # define FUTURE_I18N_NOOP(x) (x)
00068 #endif
00069 
00070 #endif /* _KEXI_GLOBAL_ */
KDE Home | KDE Accessibility Home | Description of Access Keys