//Auto-generated by kalyptus. DO NOT EDIT.
#include <kpalette.h>
#include <qstring.h>
#include <qstringlist.h>
#include <qcolor.h>

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

class KPaletteJBridge : public KPalette
{
public:
	KPaletteJBridge(const QString& arg1) : KPalette(arg1) {};
	KPaletteJBridge() : KPalette() {};
	KPaletteJBridge(const KPalette& arg1) : KPalette(arg1) {};
	~KPaletteJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT jint JNICALL
Java_org_kde_koala_KPalette_addColor__Lorg_kde_qt_QColor_2(JNIEnv* env, jobject obj, jobject newColor)
{
	jint xret = (jint) ((KPalette*) QtSupport::getQt(env, obj))->addColor((const QColor&)*(const QColor*) QtSupport::getQt(env, newColor));
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KPalette_addColor__Lorg_kde_qt_QColor_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jobject newColor, jstring newColorName)
{
static QString* _qstring_newColorName = 0;
	jint xret = (jint) ((KPalette*) QtSupport::getQt(env, obj))->addColor((const QColor&)*(const QColor*) QtSupport::getQt(env, newColor), (const QString&)*(QString*) QtSupport::toQString(env, newColorName, &_qstring_newColorName));
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KPalette_changeColor__ILorg_kde_qt_QColor_2(JNIEnv* env, jobject obj, jint index, jobject newColor)
{
	jint xret = (jint) ((KPalette*) QtSupport::getQt(env, obj))->changeColor((int) index, (const QColor&)*(const QColor*) QtSupport::getQt(env, newColor));
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KPalette_changeColor__ILorg_kde_qt_QColor_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jint index, jobject newColor, jstring newColorName)
{
static QString* _qstring_newColorName = 0;
	jint xret = (jint) ((KPalette*) QtSupport::getQt(env, obj))->changeColor((int) index, (const QColor&)*(const QColor*) QtSupport::getQt(env, newColor), (const QString&)*(QString*) QtSupport::toQString(env, newColorName, &_qstring_newColorName));
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KPalette_changeColor__Lorg_kde_qt_QColor_2Lorg_kde_qt_QColor_2(JNIEnv* env, jobject obj, jobject oldColor, jobject newColor)
{
	jint xret = (jint) ((KPalette*) QtSupport::getQt(env, obj))->changeColor((const QColor&)*(const QColor*) QtSupport::getQt(env, oldColor), (const QColor&)*(const QColor*) QtSupport::getQt(env, newColor));
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KPalette_changeColor__Lorg_kde_qt_QColor_2Lorg_kde_qt_QColor_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jobject oldColor, jobject newColor, jstring newColorName)
{
static QString* _qstring_newColorName = 0;
	jint xret = (jint) ((KPalette*) QtSupport::getQt(env, obj))->changeColor((const QColor&)*(const QColor*) QtSupport::getQt(env, oldColor), (const QColor&)*(const QColor*) QtSupport::getQt(env, newColor), (const QString&)*(QString*) QtSupport::toQString(env, newColorName, &_qstring_newColorName));
	return xret;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KPalette_colorName__I(JNIEnv* env, jobject obj, jint index)
{
	QString  _qstring;
	_qstring = ((KPalette*) QtSupport::getQt(env, obj))->colorName((int) index);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KPalette_colorName__Lorg_kde_qt_QColor_2(JNIEnv* env, jobject obj, jobject color)
{
	QString  _qstring;
	_qstring = ((KPalette*) QtSupport::getQt(env, obj))->colorName((const QColor&)*(const QColor*) QtSupport::getQt(env, color));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KPalette_color(JNIEnv* env, jobject obj, jint index)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new QColor(((KPalette*) QtSupport::getQt(env, obj))->color((int) index)), "org.kde.qt.QColor", TRUE);
	return xret;
}

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KPalette_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_koala_KPalette_finalize(env, obj);
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KPalette_editable(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KPalette*) QtSupport::getQt(env, obj))->editable();
	return xret;
}

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

JNIEXPORT jint JNICALL
Java_org_kde_koala_KPalette_findColor(JNIEnv* env, jobject obj, jobject color)
{
	jint xret = (jint) ((KPalette*) QtSupport::getQt(env, obj))->findColor((const QColor&)*(const QColor*) QtSupport::getQt(env, color));
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KPalette_getPaletteList(JNIEnv* env, jclass cls)
{
	QStringList  _qlist;
	(void) cls;
	_qlist = KPaletteJBridge::getPaletteList();
	return (jobject) QtSupport::arrayWithQStringList(env, (QStringList*) &_qlist);
}

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

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KPalette_newKPalette__(JNIEnv* env, jobject obj)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KPaletteJBridge());
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KPalette_newKPalette__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring name)
{
static QString* _qstring_name = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KPaletteJBridge((const QString&)*(QString*) QtSupport::toQString(env, name, &_qstring_name)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KPalette_newKPalette__Lorg_kde_koala_KPalette_2(JNIEnv* env, jobject obj, jobject arg1)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KPaletteJBridge((const KPalette&)*(const KPalette*) QtSupport::getQt(env, arg1)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KPalette_nrColors(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KPalette*) QtSupport::getQt(env, obj))->nrColors();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KPalette_save(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KPalette*) QtSupport::getQt(env, obj))->save();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KPalette_setDescription(JNIEnv* env, jobject obj, jstring desc)
{
static QString* _qstring_desc = 0;
	((KPalette*) QtSupport::getQt(env, obj))->setDescription((const QString&)*(QString*) QtSupport::toQString(env, desc, &_qstring_desc));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KPalette_setEditable(JNIEnv* env, jobject obj, jint editable)
{
	((KPalette*) QtSupport::getQt(env, obj))->setEditable((KPalette::Editable) editable);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KPalette_setName(JNIEnv* env, jobject obj, jstring name)
{
static QString* _qstring_name = 0;
	((KPalette*) QtSupport::getQt(env, obj))->setName((const QString&)*(QString*) QtSupport::toQString(env, name, &_qstring_name));
	return;
}

