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

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

class KTempFileJBridge : public KTempFile
{
public:
	KTempFileJBridge(TQString arg1,TQString arg2,int arg3) : KTempFile(arg1,arg2,arg3) {};
	KTempFileJBridge(TQString arg1,TQString arg2) : KTempFile(arg1,arg2) {};
	KTempFileJBridge(TQString arg1) : KTempFile(arg1) {};
	KTempFileJBridge() : KTempFile() {};
	KTempFileJBridge(bool arg1) : KTempFile(arg1) {};
	bool protected_create(const TQString& arg1,const TQString& arg2,int arg3) {
		return (bool) KTempFile::create(arg1,arg2,arg3);
	}
	void protected_setError(int arg1) {
		KTempFile::setError(arg1);
		return;
	}
	~KTempFileJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KTempFile_close(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KTempFile*) QtSupport::getQt(env, obj))->close();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KTempFile_create(JNIEnv* env, jobject obj, jstring filePrefix, jstring fileExtension, jint mode)
{
static TQString* _qstring_filePrefix = 0;
static TQString* _qstring_fileExtension = 0;
	jboolean xret = (jboolean) ((KTempFileJBridge*) QtSupport::getQt(env, obj))->protected_create((const TQString&)*(TQString*) QtSupport::toTQString(env, filePrefix, &_qstring_filePrefix), (const TQString&)*(TQString*) QtSupport::toTQString(env, fileExtension, &_qstring_fileExtension), (int) mode);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KTempFile_dataStream(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KTempFile*) QtSupport::getQt(env, obj))->dataStream(), "org.trinitydesktop.qt.TQDataStream");
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KTempFile_dispose(JNIEnv* env, jobject obj)
{
	Java_org_trinitydesktop_koala_KTempFile_finalize(env, obj);
	return;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KTempFile_file(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KTempFile*) QtSupport::getQt(env, obj))->file(), "org.trinitydesktop.qt.TQFile");
	return xret;
}

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

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_koala_KTempFile_handle(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KTempFile*) QtSupport::getQt(env, obj))->handle();
	return xret;
}

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

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

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KTempFile_newKTempFile__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring filePrefix)
{
static TQString* _qstring_filePrefix = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KTempFileJBridge((TQString)*(TQString*) QtSupport::toTQString(env, filePrefix, &_qstring_filePrefix)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KTempFile_newKTempFile__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring filePrefix, jstring fileExtension)
{
static TQString* _qstring_filePrefix = 0;
static TQString* _qstring_fileExtension = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KTempFileJBridge((TQString)*(TQString*) QtSupport::toTQString(env, filePrefix, &_qstring_filePrefix), (TQString)*(TQString*) QtSupport::toTQString(env, fileExtension, &_qstring_fileExtension)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KTempFile_newKTempFile__Ljava_lang_String_2Ljava_lang_String_2I(JNIEnv* env, jobject obj, jstring filePrefix, jstring fileExtension, jint mode)
{
static TQString* _qstring_filePrefix = 0;
static TQString* _qstring_fileExtension = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KTempFileJBridge((TQString)*(TQString*) QtSupport::toTQString(env, filePrefix, &_qstring_filePrefix), (TQString)*(TQString*) QtSupport::toTQString(env, fileExtension, &_qstring_fileExtension), (int) mode));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KTempFile_newKTempFile__Z(JNIEnv* env, jobject obj, jboolean arg1)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KTempFileJBridge((bool) arg1));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KTempFile_setAutoDelete(JNIEnv* env, jobject obj, jboolean autoDelete)
{
	((KTempFile*) QtSupport::getQt(env, obj))->setAutoDelete((bool) autoDelete);
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KTempFile_setError(JNIEnv* env, jobject obj, jint error)
{
	((KTempFileJBridge*) QtSupport::getQt(env, obj))->protected_setError((int) error);
	return;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_koala_KTempFile_status(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KTempFile*) QtSupport::getQt(env, obj))->status();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KTempFile_sync(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KTempFile*) QtSupport::getQt(env, obj))->sync();
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KTempFile_textStream(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KTempFile*) QtSupport::getQt(env, obj))->textStream(), "org.trinitydesktop.qt.TQTextStream");
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KTempFile_unlink(JNIEnv* env, jobject obj)
{
	((KTempFile*) QtSupport::getQt(env, obj))->unlink();
	return;
}

