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

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

class KRecentDocumentJBridge : public KRecentDocument
{
public:
	KRecentDocumentJBridge() : KRecentDocument() {};
	~KRecentDocumentJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT void JNICALL
Java_org_kde_koala_KRecentDocument_add__Ljava_lang_String_2(JNIEnv* env, jclass cls, jstring documentStr)
{
	(void) cls;
static TQString* _qstring_documentStr = 0;
	KRecentDocumentJBridge::add((const TQString&)*(TQString*) QtSupport::toQString(env, documentStr, &_qstring_documentStr));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KRecentDocument_add__Ljava_lang_String_2Z(JNIEnv* env, jclass cls, jstring documentStr, jboolean isURL)
{
	(void) cls;
static TQString* _qstring_documentStr = 0;
	KRecentDocumentJBridge::add((const TQString&)*(TQString*) QtSupport::toQString(env, documentStr, &_qstring_documentStr), (bool) isURL);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KRecentDocument_add__Lorg_kde_koala_KURL_2(JNIEnv* env, jclass cls, jobject url)
{
	(void) cls;
	KRecentDocumentJBridge::add((const KURL&)*(const KURL*) QtSupport::getQt(env, url));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KRecentDocument_add__Lorg_kde_koala_KURL_2Ljava_lang_String_2(JNIEnv* env, jclass cls, jobject url, jstring desktopEntryName)
{
	(void) cls;
static TQString* _qstring_desktopEntryName = 0;
	KRecentDocumentJBridge::add((const KURL&)*(const KURL*) QtSupport::getQt(env, url), (const TQString&)*(TQString*) QtSupport::toQString(env, desktopEntryName, &_qstring_desktopEntryName));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KRecentDocument_clear(JNIEnv* env, jclass cls)
{
	(void) cls;
	(void) env;
	KRecentDocumentJBridge::clear();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KRecentDocument_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_koala_KRecentDocument_finalize(env, obj);
	return;
}

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

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

JNIEXPORT jint JNICALL
Java_org_kde_koala_KRecentDocument_maximumItems(JNIEnv* env, jclass cls)
{
	(void) cls;
	(void) env;
	jint xret = (jint) KRecentDocumentJBridge::maximumItems();
	return xret;
}

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

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KRecentDocument_recentDocumentDirectory(JNIEnv* env, jclass cls)
{
	TQString  _qstring;
	(void) cls;
	_qstring = KRecentDocumentJBridge::recentDocumentDirectory();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KRecentDocument_recentDocuments(JNIEnv* env, jclass cls)
{
	TQStringList  _qlist;
	(void) cls;
	_qlist = KRecentDocumentJBridge::recentDocuments();
	return (jobject) QtSupport::arrayWithQStringList(env, (TQStringList*) &_qlist);
}

