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

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

class KSaveFileJBridge : public KSaveFile
{
public:
	KSaveFileJBridge(const TQString& arg1,int arg2) : KSaveFile(arg1,arg2) {};
	KSaveFileJBridge(const TQString& arg1) : KSaveFile(arg1) {};
	~KSaveFileJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KSaveFile_abort(JNIEnv* env, jobject obj)
{
	((KSaveFile*) QtSupport::getQt(env, obj))->abort();
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KSaveFile_backupFile__Ljava_lang_String_2(JNIEnv* env, jclass cls, jstring filename)
{
	(void) cls;
static TQString* _qstring_filename = 0;
	jboolean xret = (jboolean) KSaveFileJBridge::backupFile((const TQString&)*(TQString*) QtSupport::toTQString(env, filename, &_qstring_filename));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KSaveFile_backupFile__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jclass cls, jstring filename, jstring backupDir)
{
	(void) cls;
static TQString* _qstring_filename = 0;
static TQString* _qstring_backupDir = 0;
	jboolean xret = (jboolean) KSaveFileJBridge::backupFile((const TQString&)*(TQString*) QtSupport::toTQString(env, filename, &_qstring_filename), (const TQString&)*(TQString*) QtSupport::toTQString(env, backupDir, &_qstring_backupDir));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KSaveFile_backupFile__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jclass cls, jstring filename, jstring backupDir, jstring backupExtension)
{
	(void) cls;
static TQString* _qstring_filename = 0;
static TQString* _qstring_backupDir = 0;
static TQString* _qstring_backupExtension = 0;
	jboolean xret = (jboolean) KSaveFileJBridge::backupFile((const TQString&)*(TQString*) QtSupport::toTQString(env, filename, &_qstring_filename), (const TQString&)*(TQString*) QtSupport::toTQString(env, backupDir, &_qstring_backupDir), (const TQString&)*(TQString*) QtSupport::toTQString(env, backupExtension, &_qstring_backupExtension));
	return xret;
}

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

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KSaveFile_dispose(JNIEnv* env, jobject obj)
{
	Java_org_trinitydesktop_koala_KSaveFile_finalize(env, obj);
	return;
}

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

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

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

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

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KSaveFile_newKSaveFile__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring filename)
{
static TQString* _qstring_filename = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KSaveFileJBridge((const TQString&)*(TQString*) QtSupport::toTQString(env, filename, &_qstring_filename)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KSaveFile_newKSaveFile__Ljava_lang_String_2I(JNIEnv* env, jobject obj, jstring filename, jint mode)
{
static TQString* _qstring_filename = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KSaveFileJBridge((const TQString&)*(TQString*) QtSupport::toTQString(env, filename, &_qstring_filename), (int) mode));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

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

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

