kradio4 r778
|
00001 /*************************************************************************** 00002 utils.h - description 00003 ------------------- 00004 begin : Sun Feb 3 2002 00005 copyright : (C) 2002 by Martin Witte / Frank Schwanz 00006 email : emw-kradio@nocabal.de / schwanz@fh-brandenburg.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef KRADIO_UTILS_H 00019 #define KRADIO_UTILS_H 00020 00021 #ifdef HAVE_CONFIG_H 00022 #include <config.h> 00023 #endif 00024 00025 using namespace std; 00026 00027 #include <kconfig.h> 00028 #include <klocale.h> 00029 #include <kdebug.h> 00030 #include <QtCore/QString> 00031 #define __USE_ISOC99 1 00032 #include <math.h> 00033 00034 //extern const char *mixerChannelLabels[]; 00035 //extern const char *mixerChannelNames[]; 00036 00037 extern QString XMLEscape (const QString &s); 00038 QString xmlOpenTag (const QString &tag, bool newline = true); 00039 QString xmlTag (const QString &tag, const QString &s, bool newline = true); 00040 QString xmlTag (const QString &tag, int i, bool newline = true); 00041 QString xmlTag (const QString &tag, float f, bool newline = true); 00042 QString xmlCloseTag (const QString &tag, bool newline = true); 00043 00044 template<class T1, class T2> inline T1 min (T1 a, T2 b) { return a < b ? a : b; } 00045 template<class T1, class T2> inline T1 max (T1 a, T2 b) { return a < b ? b : a; } 00046 00047 #endif