kexi

kexi_global.h
1/* This file is part of the KDE project
2 Copyright (c) 2003-2005 Kexi Team
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef _KEXI_GLOBAL_
21#define _KEXI_GLOBAL_
22
28//#define KEXI_STANDALONE 1
29
30#include <kexi_export.h>
31#include <config.h>
32
33#define kexidbg kdDebug(44010)
34#define kexicoredbg kdDebug(44020)
35#define kexipluginsdbg kdDebug(44021)
36#define kexiwarn kdWarning(44010)
37#define kexicorewarn kdWarning(44020)
38#define kexipluginswarn kdWarning(44021)
39
40/* useful macros */
41
43#define foreach(_class, _variable, _list) \
44 for (_class _variable = (_list).constBegin(); _variable!=(_list).constEnd(); ++_variable)
45
47#define foreach_nonconst(_class, _variable, _list) \
48 for (_class _variable = (_list).begin(); _variable!=(_list).end(); ++_variable)
49
51#define foreach_list(_class, _variable, _list) \
52 for (_class _variable(_list); _variable.current(); ++_variable)
53
54#define foreach_dict(_class, _variable, _list) foreach_list(_class, _variable, _list)
55
56#ifndef futureI18n
57# ifdef USE_FUTURE_I18N
58# define futureI18n(a) TQObject::tr(a)
59# define futureI18n2(a,b) TQObject::tr(b)
60# else
61# define futureI18n(a) TQString(a)
62# define futureI18n2(a,b) TQString(b)
63# endif
64#endif
65
66#ifndef FUTURE_I18N_NOOP
67# define FUTURE_I18N_NOOP(x) (x)
68#endif
69
70#endif /* _KEXI_GLOBAL_ */