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

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

class KURLDragJBridge : public KURLDrag
{
public:
	KURLDragJBridge(const KURL::List& arg1,TQWidget* arg2,const char* arg3) : KURLDrag(arg1,arg2,arg3) {};
	KURLDragJBridge(const KURL::List& arg1,TQWidget* arg2) : KURLDrag(arg1,arg2) {};
	KURLDragJBridge(const KURL::List& arg1) : KURLDrag(arg1) {};
	~KURLDragJBridge() {QtSupport::qtKeyDeleted(this);}
	void removeChild(TQObject* arg1) {
		if (!QtSupport::eventDelegate(this,"removeChild",(void*)arg1,"org.trinitydesktop.qt.TQObject")) {
			TQObject::removeChild(arg1);
		}
		return;
	}
	void customEvent(TQCustomEvent* arg1) {
		if (!QtSupport::eventDelegate(this,"customEvent",(void*)arg1,"org.trinitydesktop.qt.TQCustomEvent")) {
			TQObject::customEvent(arg1);
		}
		return;
	}
	void timerEvent(TQTimerEvent* arg1) {
		if (!QtSupport::eventDelegate(this,"timerEvent",(void*)arg1,"org.trinitydesktop.qt.TQTimerEvent")) {
			TQObject::timerEvent(arg1);
		}
		return;
	}
	void childEvent(TQChildEvent* arg1) {
		if (!QtSupport::eventDelegate(this,"childEvent",(void*)arg1,"org.trinitydesktop.qt.TQChildEvent")) {
			TQObject::childEvent(arg1);
		}
		return;
	}
	void insertChild(TQObject* arg1) {
		if (!QtSupport::eventDelegate(this,"insertChild",(void*)arg1,"org.trinitydesktop.qt.TQObject")) {
			TQObject::insertChild(arg1);
		}
		return;
	}
	bool eventFilter(TQObject* object,TQEvent* event) {
		if (!QtSupport::eventFilterDelegate(this,"org.trinitydesktop.koala.KURLDrag",object,event)) {
			return TQObject::eventFilter(object,event);
		} else {
			return TRUE;
		}
	}
};

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KURLDrag_decode(JNIEnv* env, jclass cls, jobject e, jobjectArray urls)
{
	(void) cls;
static KURL::List* _qlist_urls = 0;
	jboolean xret = (jboolean) KURLDragJBridge::decode((const TQMimeSource*) QtSupport::mimeSource(env, e), (KURL::List&)*(KURL::List*) KDESupport::toKURLList(env, urls, &_qlist_urls));
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KURLDrag_dispose(JNIEnv* env, jobject obj)
{
	Java_org_trinitydesktop_koala_KURLDrag_finalize(env, obj);
	return;
}

JNIEXPORT jbyteArray JNICALL
Java_org_trinitydesktop_koala_KURLDrag_encodedData(JNIEnv* env, jobject obj, jstring mime)
{
	TQByteArray _qbyteArray;
static TQCString* _qstring_mime = 0;
	_qbyteArray = ((KURLDrag*) QtSupport::getQt(env, obj))->encodedData((const char*) QtSupport::toCharString(env, mime, &_qstring_mime));
	return QtSupport::fromTQByteArray(env, &_qbyteArray);
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KURLDrag_finalize(JNIEnv* env, jobject obj)
{
	if (QtSupport::allocatedInJavaWorld(env, obj) && ((KURLDrag*)QtSupport::getQt(env, obj))->parent() == 0) {
		delete (KURLDrag*)QtSupport::getQt(env, obj);
		QtSupport::setQt(env, obj, 0);
	}
	return;
}

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_koala_KURLDrag_format(JNIEnv* env, jobject obj, jint i)
{
	const char* _qstring;
	_qstring = ((KURLDrag*) QtSupport::getQt(env, obj))->format((int) i);
	return QtSupport::fromCharString(env, (char *) _qstring);
}

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KURLDrag_newKURLDrag__Ljava_util_ArrayList_2(JNIEnv* env, jobject obj, jobjectArray urls)
{
static KURL::List* _qlist_urls = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KURLDragJBridge((const KURL::List&)*(KURL::List*) KDESupport::toKURLList(env, urls, &_qlist_urls)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KURLDrag_newKURLDrag__Ljava_util_ArrayList_2Lorg_trinitydesktop_qt_QWidget_2(JNIEnv* env, jobject obj, jobjectArray urls, jobject dragSource)
{
static KURL::List* _qlist_urls = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KURLDragJBridge((const KURL::List&)*(KURL::List*) KDESupport::toKURLList(env, urls, &_qlist_urls), (TQWidget*) QtSupport::getQt(env, dragSource)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KURLDrag_newKURLDrag__Ljava_util_ArrayList_2Lorg_trinitydesktop_qt_QWidget_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jobjectArray urls, jobject dragSource, jstring name)
{
static KURL::List* _qlist_urls = 0;
static TQCString* _qstring_name = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KURLDragJBridge((const KURL::List&)*(KURL::List*) KDESupport::toKURLList(env, urls, &_qlist_urls), (TQWidget*) QtSupport::getQt(env, dragSource), (const char*) QtSupport::toCharString(env, name, &_qstring_name)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KURLDrag_setExportAsText(JNIEnv* env, jobject obj, jboolean exp)
{
	((KURLDrag*) QtSupport::getQt(env, obj))->setExportAsText((bool) exp);
	return;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KURLDrag_stringToUrl(JNIEnv* env, jclass cls, jstring s)
{
	(void) cls;
static TQCString* _qcstring_s = 0;
	jobject xret = QtSupport::objectForQtKey(env, (void*)new KURL(KURLDragJBridge::stringToUrl((const TQCString&)*(TQCString*) QtSupport::toTQCString(env, s, &_qcstring_s))), "org.trinitydesktop.koala.KURL", TRUE);
	return xret;
}

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_koala_KURLDrag_urlToString(JNIEnv* env, jclass cls, jobject url)
{
	TQString  _qstring;
	(void) cls;
	_qstring = KURLDragJBridge::urlToString((const KURL&)*(const KURL*) QtSupport::getQt(env, url));
	return QtSupport::fromTQString(env, &_qstring);
}

