//Auto-generated by kalyptus. DO NOT EDIT.
#include <kpalette.h>
#include <tqstring.h>
#include <tqstringlist.h>
#include <tqcolor.h>

#include <qtjava/QtSupport.h>
#include <tdejava/TDESupport.h>
#include <tdejava/KPalette.h>

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

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

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

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

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

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

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

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

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_koala_KPalette_colorName__Lorg_trinitydesktop_qt_QColor_2(JNIEnv* env, jobject obj, jobject color)
{
	TQString  _qstring;
	_qstring = ((KPalette*) QtSupport::getQt(env, obj))->colorName((const TQColor&)*(const TQColor*) QtSupport::getQt(env, color));
	return QtSupport::fromTQString(env, &_qstring);
}

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

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KPalette_dispose(JNIEnv* env, jobject obj)
{
	Java_org_trinitydesktop_koala_KPalette_finalize(env, obj);
	return;
}

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_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_trinitydesktop_koala_KPalette_findColor(JNIEnv* env, jobject obj, jobject color)
{
	jint xret = (jint) ((KPalette*) QtSupport::getQt(env, obj))->findColor((const TQColor&)*(const TQColor*) QtSupport::getQt(env, color));
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KPalette_getPaletteList(JNIEnv* env, jclass cls)
{
	TQStringList  _qlist;
	(void) cls;
	_qlist = KPaletteJBridge::getPaletteList();
	return (jobject) QtSupport::arrayWithTQStringList(env, (TQStringList*) &_qlist);
}

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

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_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_trinitydesktop_koala_KPalette_newKPalette__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring name)
{
static TQString* _qstring_name = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KPaletteJBridge((const TQString&)*(TQString*) QtSupport::toTQString(env, name, &_qstring_name)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KPalette_newKPalette__Lorg_trinitydesktop_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_trinitydesktop_koala_KPalette_nrColors(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KPalette*) QtSupport::getQt(env, obj))->nrColors();
	return xret;
}

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

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

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

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

