/***************************************************************************
                            KLocale.cpp -  description
                             -------------------
    begin                : Fri Mar 15 15:14:30 2002
    copyright            : (C) 2000-2002 Lost Highway Ltd.
    email                : Richard_Dale@tipitina.demon.co.uk
    generated by         : duke@tipitina on Fri Mar 15 15:14:30 2002, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
***************************************************************************/

#define _BOOL_H_
#include <klocale.h>
#include <qstring.h>
#include <qcstring.h>

#include <qtjava/QtSupport.h>
#include <kdejava/KDESupport.h>
#include <kdejava/KLocale.h>

class KLocaleJBridge : public KLocale
{
public:
	KLocaleJBridge(const QString& catalogue, KConfig* config) : KLocale(catalogue, config) {}
	KLocaleJBridge(const KLocale& rhs) : KLocale(rhs) {}
	~KLocaleJBridge() {QtSupport::qtKeyDeleted(this);}
	void protected_initInstance() {
		KLocale::initInstance();
		return;
	}
};


JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_newKLocale__Ljava_lang_String_2Lorg_kde_koala_KConfig_2(JNIEnv *env, jobject obj, jstring catalogue, jobject config)
{
static QString * _qstring_catalogue = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KLocaleJBridge((QString&) * (QString *) QtSupport::toQString(env, catalogue, &_qstring_catalogue), (KConfig*) QtSupport::getQt(env, config)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_newKLocale__Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring catalogue)
{
static QString * _qstring_catalogue = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KLocaleJBridge((QString&) * (QString *) QtSupport::toQString(env, catalogue, &_qstring_catalogue), 0));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_newKLocale__Lorg_kde_koala_KLocale_2(JNIEnv *env, jobject obj, jobject rhs)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KLocaleJBridge((KLocale&) *(KLocale *) QtSupport::getQt(env, rhs)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_finalize(JNIEnv *env, jobject obj)
{
	if (QtSupport::allocatedInJavaWorld(env, obj)) {
		delete (KLocale*)QtSupport::getQt(env, obj);
		QtSupport::setQt(env, obj, 0);
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_dispose(JNIEnv *env, jobject obj)
{
	Java_org_kde_koala_KLocale_finalize(env, obj);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KLocale_isDisposed(JNIEnv *env, jobject obj)
{
	return (QtSupport::getQt(env, obj) == 0);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_translate__Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring index)
{
	QString  _qstring;
static QCString * _qstring_index = 0;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->translate((char*) QtSupport::toCharString(env, index, &_qstring_index));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_translate__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring index, jstring fallback)
{
	QString  _qstring;
static QCString * _qstring_fallback = 0;
static QCString * _qstring_index = 0;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->translate((char*) QtSupport::toCharString(env, index, &_qstring_index), (char*) QtSupport::toCharString(env, fallback, &_qstring_fallback));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_translate__Ljava_lang_String_2Ljava_lang_String_2J(JNIEnv *env, jobject obj, jstring singular, jstring plural, jlong n)
{
	QString  _qstring;
static QCString * _qstring_plural = 0;
static QCString * _qstring_singular = 0;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->translate((char*) QtSupport::toCharString(env, singular, &_qstring_singular), (char*) QtSupport::toCharString(env, plural, &_qstring_plural), (unsigned long) n);
	return QtSupport::fromQString(env, &_qstring);
}

//JNIEXPORT jboolean JNICALL
//Java_org_kde_koala_KLocale_setCharset(JNIEnv *env, jobject obj, jstring charset)
//{
//static QString * _qstring_charset = 0;
//	return (jboolean) ((KLocale*) QtSupport::getQt(env, obj))->setCharset((QString&) * (QString *) QtSupport::toQString(env, charset, &_qstring_charset));
//}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KLocale_setEncoding(JNIEnv *env, jobject obj, jint mibEnum)
{
	return (jboolean) ((KLocale*) QtSupport::getQt(env, obj))->setEncoding((int) mibEnum);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KLocale_setLanguage__Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring language)
{
static QString * _qstring_language = 0;
	return (jboolean) ((KLocale*) QtSupport::getQt(env, obj))->setLanguage((QString&) * (QString *) QtSupport::toQString(env, language, &_qstring_language));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KLocale_setLanguage___3Ljava_lang_String_2(JNIEnv *env, jobject obj, jobjectArray languages)
{
static QStringList * _qlist_languages = 0;
	return (jboolean) ((KLocale*) QtSupport::getQt(env, obj))->setLanguage((QStringList&) * (QStringList *) QtSupport::toQStringList(env, languages, &_qlist_languages));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KLocale_setCountry(JNIEnv *env, jobject obj, jstring country)
{
static QString * _qstring_country = 0;
	return (jboolean) ((KLocale*) QtSupport::getQt(env, obj))->setCountry((QString&) * (QString *) QtSupport::toQString(env, country, &_qstring_country));
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_decimalSymbol(JNIEnv *env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->decimalSymbol();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_thousandsSeparator(JNIEnv *env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->thousandsSeparator();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_currencySymbol(JNIEnv *env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->currencySymbol();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_monetaryDecimalSymbol(JNIEnv *env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->monetaryDecimalSymbol();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_monetaryThousandsSeparator(JNIEnv *env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->monetaryThousandsSeparator();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_positiveSign(JNIEnv *env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->positiveSign();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_negativeSign(JNIEnv *env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->negativeSign();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KLocale_fracDigits(JNIEnv *env, jobject obj)
{
	return (jint) ((KLocale*) QtSupport::getQt(env, obj))->fracDigits();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KLocale_positivePrefixCurrencySymbol(JNIEnv *env, jobject obj)
{
	return (jboolean) ((KLocale*) QtSupport::getQt(env, obj))->positivePrefixCurrencySymbol();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KLocale_negativePrefixCurrencySymbol(JNIEnv *env, jobject obj)
{
	return (jboolean) ((KLocale*) QtSupport::getQt(env, obj))->negativePrefixCurrencySymbol();
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KLocale_positiveMonetarySignPosition(JNIEnv *env, jobject obj)
{
	return (jint) ((KLocale*) QtSupport::getQt(env, obj))->positiveMonetarySignPosition();
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KLocale_negativeMonetarySignPosition(JNIEnv *env, jobject obj)
{
	return (jint) ((KLocale*) QtSupport::getQt(env, obj))->negativeMonetarySignPosition();
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_formatMoney__DLjava_lang_String_2I(JNIEnv *env, jobject obj, jdouble num, jstring currency, jint digits)
{
	QString  _qstring;
static QString * _qstring_currency = 0;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->formatMoney((double) num, (QString&) * (QString *) QtSupport::toQString(env, currency, &_qstring_currency), (int) digits);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_formatMoney__D(JNIEnv *env, jobject obj, jdouble num)
{
	QString _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->formatMoney((double) num, QString::null, -1);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_formatMoney__Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring numStr)
{
	QString  _qstring;
static QString * _qstring_numStr = 0;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->formatMoney((QString&) * (QString *) QtSupport::toQString(env, numStr, &_qstring_numStr));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_formatNumber__DI(JNIEnv *env, jobject obj, jdouble num, jint precision)
{
	QString  _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->formatNumber((double) num, (int) precision);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_formatNumber__D(JNIEnv *env, jobject obj, jdouble num)
{
	QString _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->formatNumber((double) num, -1);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_formatNumber__Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring numStr)
{
	QString  _qstring;
static QString * _qstring_numStr = 0;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->formatNumber((QString&) * (QString *) QtSupport::toQString(env, numStr, &_qstring_numStr));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_formatDate__Ljava_util_Calendar_2Z(JNIEnv *env, jobject obj, jobject pDate, jboolean shortFormat)
{
	QString  _qstring;
static QDate * _qdate_pDate = 0;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->formatDate((QDate&) * (QDate *) QtSupport::toQDate(env, pDate, &_qdate_pDate), (bool) shortFormat);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_formatDate__Ljava_util_Calendar_2(JNIEnv *env, jobject obj, jobject pDate)
{
static QDate * _qdate_pDate = 0;
	QString _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->formatDate((QDate&) * (QDate *) QtSupport::toQDate(env, pDate, &_qdate_pDate), false);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_formatTime__Ljava_util_Date_2Z(JNIEnv *env, jobject obj, jobject pTime, jboolean includeSecs)
{
	QString  _qstring;
static QTime * _qtime_pTime = 0;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->formatTime((QTime&) * (QTime *) QtSupport::toQTime(env, pTime, &_qtime_pTime), (bool) includeSecs);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_formatTime__Ljava_util_Date_2(JNIEnv *env, jobject obj, jobject pTime)
{
static QTime * _qtime_pTime = 0;
	QString _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->formatTime((QTime&) * (QTime *) QtSupport::toQTime(env, pTime, &_qtime_pTime), false);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KLocale_use12Clock(JNIEnv *env, jobject obj)
{
	return (jboolean) ((KLocale*) QtSupport::getQt(env, obj))->use12Clock();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KLocale_weekStartsMonday(JNIEnv *env, jobject obj)
{
	return (jboolean) ((KLocale*) QtSupport::getQt(env, obj))->weekStartsMonday();
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_monthName__IZ(JNIEnv *env, jobject obj, jint i, jboolean shortName)
{
	QString  _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->monthName((int) i, (bool) shortName);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_monthName__I(JNIEnv *env, jobject obj, jint i)
{
	QString _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->monthName((int) i, false);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_weekDayName__IZ(JNIEnv *env, jobject obj, jint i, jboolean shortName)
{
	QString  _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->weekDayName((int) i, (bool) shortName);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_weekDayName__I(JNIEnv *env, jobject obj, jint i)
{
	QString _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->weekDayName((int) i, false);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_formatDateTime__Ljava_util_Calendar_2ZZ(JNIEnv *env, jobject obj, jobject pDateTime, jboolean shortFormat, jboolean includeSecs)
{
	QString  _qstring;
static QDateTime * _qdate_pDateTime = 0;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->formatDateTime((QDateTime&) * (QDateTime *) QtSupport::toQDateTime(env, pDateTime, &_qdate_pDateTime), (bool) shortFormat, (bool) includeSecs);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_formatDateTime__Ljava_util_Calendar_2(JNIEnv *env, jobject obj, jobject pDateTime)
{
static QDateTime * _qdate_pDateTime = 0;
	QString _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->formatDateTime((QDateTime&) * (QDateTime *) QtSupport::toQDateTime(env, pDateTime, &_qdate_pDateTime), true, false);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jdouble JNICALL
Java_org_kde_koala_KLocale_readMoney__Ljava_lang_String_2_3Z(JNIEnv *env, jobject obj, jstring numStr, jbooleanArray ok)
{
static QString * _qstring_numStr = 0;
	return (jdouble) ((KLocale*) QtSupport::getQt(env, obj))->readMoney((QString&) * (QString *) QtSupport::toQString(env, numStr, &_qstring_numStr),  (bool*) QtSupport::toBooleanPtr(env, ok));
}

JNIEXPORT jdouble JNICALL
Java_org_kde_koala_KLocale_readMoney__Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring numStr)
{
static QString * _qstring_numStr = 0;
	return (jdouble) ((KLocale*) QtSupport::getQt(env, obj))->readMoney((QString&) * (QString *) QtSupport::toQString(env, numStr, &_qstring_numStr), 0);
}

JNIEXPORT jdouble JNICALL
Java_org_kde_koala_KLocale_readNumber__Ljava_lang_String_2_3Z(JNIEnv *env, jobject obj, jstring numStr, jbooleanArray ok)
{
static QString * _qstring_numStr = 0;
	return (jdouble) ((KLocale*) QtSupport::getQt(env, obj))->readNumber((QString&) * (QString *) QtSupport::toQString(env, numStr, &_qstring_numStr),  (bool*) QtSupport::toBooleanPtr(env, ok));
}

JNIEXPORT jdouble JNICALL
Java_org_kde_koala_KLocale_readNumber__Ljava_lang_String_2(JNIEnv *env, jobject obj, jstring numStr)
{
static QString * _qstring_numStr = 0;
	return (jdouble) ((KLocale*) QtSupport::getQt(env, obj))->readNumber((QString&) * (QString *) QtSupport::toQString(env, numStr, &_qstring_numStr), 0);
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KLocale_readDate__Ljava_lang_String_2_3Z(JNIEnv *env, jobject obj, jstring str, jbooleanArray ok)
{
	QDate  _qdate;
static QString * _qstring_str = 0;
	_qdate = ((KLocale*) QtSupport::getQt(env, obj))->readDate((QString&) * (QString *) QtSupport::toQString(env, str, &_qstring_str),  (bool*) QtSupport::toBooleanPtr(env, ok));
	return (jobject) QtSupport::fromQDate(env, (QDate *) &_qdate);
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KLocale_readDate__Ljava_lang_String_2Ljava_lang_String_2_3Z(JNIEnv *env, jobject obj, jstring intstr, jstring fmt, jbooleanArray ok)
{
	QDate  _qdate;
static QString * _qstring_fmt = 0;
static QString * _qstring_intstr = 0;
	_qdate = ((KLocale*) QtSupport::getQt(env, obj))->readDate((QString&) * (QString *) QtSupport::toQString(env, intstr, &_qstring_intstr), (QString&) * (QString *) QtSupport::toQString(env, fmt, &_qstring_fmt),  (bool*) QtSupport::toBooleanPtr(env, ok));
	return (jobject) QtSupport::fromQDate(env, (QDate *) &_qdate);
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KLocale_readTime(JNIEnv *env, jobject obj, jstring str, jbooleanArray ok)
{
	QTime  _qtime;
static QString * _qstring_str = 0;
	_qtime = ((KLocale*) QtSupport::getQt(env, obj))->readTime((QString&) * (QString *) QtSupport::toQString(env, str, &_qstring_str),  (bool*) QtSupport::toBooleanPtr(env, ok));
	return (jobject) QtSupport::fromQTime(env, (QTime *) &_qtime);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_language(JNIEnv *env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->language();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_country(JNIEnv *env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->country();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_languages(JNIEnv *env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->languages();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KLocale_languagesTwoAlpha(JNIEnv *env, jobject obj)
{
	QStringList  _qlist;
	_qlist = ((KLocale*) QtSupport::getQt(env, obj))->languagesTwoAlpha();
	return (jobject) QtSupport::arrayWithQStringList(env, (QStringList *) &_qlist);
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KLocale_languageList(JNIEnv *env, jobject obj)
{
	QStringList  _qlist;
	_qlist = ((KLocale*) QtSupport::getQt(env, obj))->languageList();
	return (jobject) QtSupport::arrayWithQStringList(env, (QStringList *) &_qlist);
}

//JNIEXPORT jstring JNICALL
//Java_org_kde_koala_KLocale_charset(JNIEnv *env, jobject obj)
//{
//	QString  _qstring;
//	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->charset();
//	return QtSupport::fromQString(env, &_qstring);
//}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_encoding(JNIEnv *env, jobject obj)
{
	const char *  _qcstring;
	_qcstring = (const char *)((KLocale*) QtSupport::getQt(env, obj))->encoding();
	return QtSupport::fromCharString(env, (char *) _qcstring);
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KLocale_encodingMib(JNIEnv *env, jobject obj)
{
	return (jint) ((KLocale*) QtSupport::getQt(env, obj))->encodingMib();
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KLocale_codecForEncoding(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)((KLocale*) QtSupport::getQt(env, obj))->codecForEncoding(), "org.kde.qt.QTextCodec");
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_setDateFormat(JNIEnv *env, jobject obj, jstring format)
{
static QString * _qstring_format = 0;
	((KLocale*) QtSupport::getQt(env, obj))->setDateFormat((QString&) * (QString *) QtSupport::toQString(env, format, &_qstring_format));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_setDateFormatShort(JNIEnv *env, jobject obj, jstring format)
{
static QString * _qstring_format = 0;
	((KLocale*) QtSupport::getQt(env, obj))->setDateFormatShort((QString&) * (QString *) QtSupport::toQString(env, format, &_qstring_format));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_setTimeFormat(JNIEnv *env, jobject obj, jstring format)
{
static QString * _qstring_format = 0;
	((KLocale*) QtSupport::getQt(env, obj))->setTimeFormat((QString&) * (QString *) QtSupport::toQString(env, format, &_qstring_format));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_setWeekStartsMonday(JNIEnv *env, jobject obj, jboolean start)
{
	((KLocale*) QtSupport::getQt(env, obj))->setWeekStartsMonday((bool) start);
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_dateFormat(JNIEnv *env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->dateFormat();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_dateFormatShort(JNIEnv *env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->dateFormatShort();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_timeFormat(JNIEnv *env, jobject obj)
{
	QString  _qstring;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->timeFormat();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_setDecimalSymbol(JNIEnv *env, jobject obj, jstring symbol)
{
static QString * _qstring_symbol = 0;
	((KLocale*) QtSupport::getQt(env, obj))->setDecimalSymbol((QString&) * (QString *) QtSupport::toQString(env, symbol, &_qstring_symbol));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_setThousandsSeparator(JNIEnv *env, jobject obj, jstring separator)
{
static QString * _qstring_separator = 0;
	((KLocale*) QtSupport::getQt(env, obj))->setThousandsSeparator((QString&) * (QString *) QtSupport::toQString(env, separator, &_qstring_separator));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_setPositiveSign(JNIEnv *env, jobject obj, jstring sign)
{
static QString * _qstring_sign = 0;
	((KLocale*) QtSupport::getQt(env, obj))->setPositiveSign((QString&) * (QString *) QtSupport::toQString(env, sign, &_qstring_sign));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_setNegativeSign(JNIEnv *env, jobject obj, jstring sign)
{
static QString * _qstring_sign = 0;
	((KLocale*) QtSupport::getQt(env, obj))->setNegativeSign((QString&) * (QString *) QtSupport::toQString(env, sign, &_qstring_sign));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_setPositiveMonetarySignPosition(JNIEnv *env, jobject obj, jint signpos)
{
	((KLocale*) QtSupport::getQt(env, obj))->setPositiveMonetarySignPosition((KLocale::SignPosition) signpos);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_setNegativeMonetarySignPosition(JNIEnv *env, jobject obj, jint signpos)
{
	((KLocale*) QtSupport::getQt(env, obj))->setNegativeMonetarySignPosition((KLocale::SignPosition) signpos);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_setPositivePrefixCurrencySymbol(JNIEnv *env, jobject obj, jboolean prefix)
{
	((KLocale*) QtSupport::getQt(env, obj))->setPositivePrefixCurrencySymbol((bool) prefix);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_setNegativePrefixCurrencySymbol(JNIEnv *env, jobject obj, jboolean prefix)
{
	((KLocale*) QtSupport::getQt(env, obj))->setNegativePrefixCurrencySymbol((bool) prefix);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_setFracDigits(JNIEnv *env, jobject obj, jint digits)
{
	((KLocale*) QtSupport::getQt(env, obj))->setFracDigits((int) digits);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_setMonetaryThousandsSeparator(JNIEnv *env, jobject obj, jstring separator)
{
static QString * _qstring_separator = 0;
	((KLocale*) QtSupport::getQt(env, obj))->setMonetaryThousandsSeparator((QString&) * (QString *) QtSupport::toQString(env, separator, &_qstring_separator));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_setMonetaryDecimalSymbol(JNIEnv *env, jobject obj, jstring symbol)
{
static QString * _qstring_symbol = 0;
	((KLocale*) QtSupport::getQt(env, obj))->setMonetaryDecimalSymbol((QString&) * (QString *) QtSupport::toQString(env, symbol, &_qstring_symbol));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_setCurrencySymbol(JNIEnv *env, jobject obj, jstring symbol)
{
static QString * _qstring_symbol = 0;
	((KLocale*) QtSupport::getQt(env, obj))->setCurrencySymbol((QString&) * (QString *) QtSupport::toQString(env, symbol, &_qstring_symbol));
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KLocale_pageSize(JNIEnv *env, jobject obj)
{
	return (jint) ((KLocale*) QtSupport::getQt(env, obj))->pageSize();
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_setPageSize(JNIEnv *env, jobject obj, jint paperFormat)
{
	((KLocale*) QtSupport::getQt(env, obj))->setPageSize((int) paperFormat);
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KLocale_measureSystem(JNIEnv *env, jobject obj)
{
	return (jint) ((KLocale*) QtSupport::getQt(env, obj))->measureSystem();
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_setMeasureSystem(JNIEnv *env, jobject obj, jint value)
{
	((KLocale*) QtSupport::getQt(env, obj))->setMeasureSystem((KLocale::MeasureSystem) value);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_insertCatalogue(JNIEnv *env, jobject obj, jstring catalogue)
{
static QString * _qstring_catalogue = 0;
	((KLocale*) QtSupport::getQt(env, obj))->insertCatalogue((QString&) * (QString *) QtSupport::toQString(env, catalogue, &_qstring_catalogue));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_removeCatalogue(JNIEnv *env, jobject obj, jstring catalogue)
{
static QString * _qstring_catalogue = 0;
	((KLocale*) QtSupport::getQt(env, obj))->removeCatalogue((QString&) * (QString *) QtSupport::toQString(env, catalogue, &_qstring_catalogue));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_setActiveCatalogue(JNIEnv *env, jobject obj, jstring catalogue)
{
static QString * _qstring_catalogue = 0;
	((KLocale*) QtSupport::getQt(env, obj))->setActiveCatalogue((QString&) * (QString *) QtSupport::toQString(env, catalogue, &_qstring_catalogue));
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_translateQt(JNIEnv *env, jobject obj, jstring context, jstring sourceText, jstring message)
{
	QString  _qstring;
static QCString * _qstring_message = 0;
static QCString * _qstring_sourceText = 0;
static QCString * _qstring_context = 0;
	_qstring = ((KLocale*) QtSupport::getQt(env, obj))->translateQt((char*) QtSupport::toCharString(env, context, &_qstring_context), (char*) QtSupport::toCharString(env, sourceText, &_qstring_sourceText), (char*) QtSupport::toCharString(env, message, &_qstring_message));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_splitLocale(JNIEnv *env, jclass obj, jstring str, jstring language, jstring country, jstring charset)
{
static QString * _qstring_charset = 0;
static QString * _qstring_country = 0;
static QString * _qstring_language = 0;
static QString * _qstring_str = 0;
	KLocaleJBridge::splitLocale((QString&) * (QString *) QtSupport::toQString(env, str, &_qstring_str), (QString&) * (QString *) QtSupport::toQString(env, language, &_qstring_language), (QString&) * (QString *) QtSupport::toQString(env, country, &_qstring_country), (QString&) * (QString *) QtSupport::toQString(env, charset, &_qstring_charset));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KLocale_setMainCatalogue(JNIEnv *env, jclass obj, jstring catalogue)
{
static QCString * _qstring_catalogue = 0;
	KLocaleJBridge::setMainCatalogue((char*) QtSupport::toCharString(env, catalogue, &_qstring_catalogue));
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_langLookup__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring fname, jstring rtype)
{
	QString  _qstring;
static QCString * _qstring_rtype = 0;
static QString * _qstring_fname = 0;
	_qstring = KLocaleJBridge::langLookup((QString&) * (QString *) QtSupport::toQString(env, fname, &_qstring_fname), (char*) QtSupport::toCharString(env, rtype, &_qstring_rtype));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_langLookup__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring fname)
{
static QString * _qstring_fname = 0;
	QString _qstring;
	_qstring = KLocaleJBridge::langLookup((QString&) * (QString *) QtSupport::toQString(env, fname, &_qstring_fname), "html");
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_defaultLanguage(JNIEnv *env, jclass obj)
{
	QString  _qstring;
	_qstring = KLocaleJBridge::defaultLanguage();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KLocale_defaultCountry(JNIEnv *env, jclass obj)
{
	QString  _qstring;
	_qstring = KLocaleJBridge::defaultCountry();
	return QtSupport::fromQString(env, &_qstring);
}

//JNIEXPORT void JNICALL
//Java_org_kde_koala_KLocale_initInstance(JNIEnv *env, jclass obj)
//{
//	KLocaleJBridge::protected_initInstance();
//	return;
//}

