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

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

class KTipDatabaseJBridge : public KTipDatabase
{
public:
	KTipDatabaseJBridge(const TQString& arg1) : KTipDatabase(arg1) {};
	KTipDatabaseJBridge() : KTipDatabase() {};
	KTipDatabaseJBridge(const TQStringList& arg1) : KTipDatabase(arg1) {};
	~KTipDatabaseJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KTipDatabase_dispose(JNIEnv* env, jobject obj)
{
	Java_org_trinitydesktop_koala_KTipDatabase_finalize(env, obj);
	return;
}

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

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

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KTipDatabase_newKTipDatabase__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring tipFile)
{
static TQString* _qstring_tipFile = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KTipDatabaseJBridge((const TQString&)*(TQString*) QtSupport::toTQString(env, tipFile, &_qstring_tipFile)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KTipDatabase_newKTipDatabase___3Ljava_lang_String_2(JNIEnv* env, jobject obj, jobjectArray tipFiles)
{
static TQStringList* _qlist_tipFiles = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KTipDatabaseJBridge((const TQStringList&)*(TQStringList*) QtSupport::toTQStringList(env, tipFiles, &_qlist_tipFiles)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KTipDatabase_nextTip(JNIEnv* env, jobject obj)
{
	((KTipDatabase*) QtSupport::getQt(env, obj))->nextTip();
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KTipDatabase_prevTip(JNIEnv* env, jobject obj)
{
	((KTipDatabase*) QtSupport::getQt(env, obj))->prevTip();
	return;
}

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

