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

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

class KReplaceJBridge : public KReplace
{
public:
	KReplaceJBridge(const TQString& arg1,const TQString& arg2,long arg3,TQWidget* arg4) : KReplace(arg1,arg2,arg3,arg4) {};
	KReplaceJBridge(const TQString& arg1,const TQString& arg2,long arg3) : KReplace(arg1,arg2,arg3) {};
	KReplaceJBridge(const TQString& arg1,const TQString& arg2,long arg3,TQWidget* arg4,TQWidget* arg5) : KReplace(arg1,arg2,arg3,arg4,arg5) {};
	void public_resetCounts() {
		KReplace::resetCounts();
		return;
	}
	void public_displayFinalDialog() {
		KReplace::displayFinalDialog();
		return;
	}
	void protected_slotSkip() {
		KReplace::slotSkip();
		return;
	}
	void protected_slotReplace() {
		KReplace::slotReplace();
		return;
	}
	void protected_slotReplaceAll() {
		KReplace::slotReplaceAll();
		return;
	}
	~KReplaceJBridge() {QtSupport::qtKeyDeleted(this);}
	void displayFinalDialog() {
		if (!QtSupport::voidDelegate(this,"org.trinitydesktop.koala.KReplace","displayFinalDialog")) {
			KReplace::displayFinalDialog();
		}
		return;
	}
	void resetCounts() {
		if (!QtSupport::voidDelegate(this,"org.trinitydesktop.koala.KReplace","resetCounts")) {
			KReplace::resetCounts();
		}
		return;
	}
	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.KReplace",object,event)) {
			return TQObject::eventFilter(object,event);
		} else {
			return TRUE;
		}
	}
};

JNIEXPORT jstring JNICALL
Java_org_trinitydesktop_koala_KReplace_className(JNIEnv* env, jobject obj)
{
	const char* _qstring;
	_qstring = ((KReplace*) QtSupport::getQt(env, obj))->className();
	return QtSupport::fromCharString(env, (char *) _qstring);
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KReplace_closeReplaceNextDialog(JNIEnv* env, jobject obj)
{
	((KReplace*) QtSupport::getQt(env, obj))->closeReplaceNextDialog();
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KReplace_displayFinalDialog(JNIEnv* env, jobject obj)
{
	((KReplaceJBridge*) QtSupport::getQt(env, obj))->public_displayFinalDialog();
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KReplace_dispose(JNIEnv* env, jobject obj)
{
	Java_org_trinitydesktop_koala_KReplace_finalize(env, obj);
	return;
}

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

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

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KReplace_metaObject(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KReplace*) QtSupport::getQt(env, obj))->metaObject(), "org.trinitydesktop.qt.TQMetaObject");
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KReplace_newKReplace__Ljava_lang_String_2Ljava_lang_String_2J(JNIEnv* env, jobject obj, jstring pattern, jstring replacement, jlong options)
{
static TQString* _qstring_pattern = 0;
static TQString* _qstring_replacement = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KReplaceJBridge((const TQString&)*(TQString*) QtSupport::toTQString(env, pattern, &_qstring_pattern), (const TQString&)*(TQString*) QtSupport::toTQString(env, replacement, &_qstring_replacement), (long) options));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KReplace_newKReplace__Ljava_lang_String_2Ljava_lang_String_2JLorg_trinitydesktop_qt_QWidget_2(JNIEnv* env, jobject obj, jstring pattern, jstring replacement, jlong options, jobject parent)
{
static TQString* _qstring_pattern = 0;
static TQString* _qstring_replacement = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KReplaceJBridge((const TQString&)*(TQString*) QtSupport::toTQString(env, pattern, &_qstring_pattern), (const TQString&)*(TQString*) QtSupport::toTQString(env, replacement, &_qstring_replacement), (long) options, (TQWidget*) QtSupport::getQt(env, parent)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KReplace_newKReplace__Ljava_lang_String_2Ljava_lang_String_2JLorg_trinitydesktop_qt_QWidget_2Lorg_trinitydesktop_qt_QWidget_2(JNIEnv* env, jobject obj, jstring pattern, jstring replacement, jlong options, jobject parent, jobject replaceDialog)
{
static TQString* _qstring_pattern = 0;
static TQString* _qstring_replacement = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new KReplaceJBridge((const TQString&)*(TQString*) QtSupport::toTQString(env, pattern, &_qstring_pattern), (const TQString&)*(TQString*) QtSupport::toTQString(env, replacement, &_qstring_replacement), (long) options, (TQWidget*) QtSupport::getQt(env, parent), (TQWidget*) QtSupport::getQt(env, replaceDialog)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_koala_KReplace_numReplacements(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KReplace*) QtSupport::getQt(env, obj))->numReplacements();
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KReplace_replaceNextDialog__(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KReplace*) QtSupport::getQt(env, obj))->replaceNextDialog(), "org.trinitydesktop.koala.KDialogBase");
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_koala_KReplace_replaceNextDialog__Z(JNIEnv* env, jobject obj, jboolean create)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)((KReplace*) QtSupport::getQt(env, obj))->replaceNextDialog((bool) create), "org.trinitydesktop.koala.KDialogBase");
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_koala_KReplace_replace__(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KReplace*) QtSupport::getQt(env, obj))->replace();
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_koala_KReplace_replace__Ljava_lang_StringBuffer_2Ljava_lang_String_2Ljava_lang_String_2IJ_3I(JNIEnv* env, jclass cls, jobject text, jstring pattern, jstring replacement, jint index, jlong options, jintArray replacedLength)
{
	(void) cls;
static TQString* _qstring_text = 0;
static TQString* _qstring_pattern = 0;
static TQString* _qstring_replacement = 0;
	int* _int_replacedLength = QtSupport::toIntPtr(env, replacedLength);
	jint xret = (jint) KReplaceJBridge::replace((TQString&)*(TQString*) QtSupport::toTQStringFromStringBuffer(env, text, &_qstring_text), (const TQString&)*(TQString*) QtSupport::toTQString(env, pattern, &_qstring_pattern), (const TQString&)*(TQString*) QtSupport::toTQString(env, replacement, &_qstring_replacement), (int) index, (long) options,  (int*) _int_replacedLength);
	QtSupport::fromTQStringToStringBuffer(env, _qstring_text, text);
	env->SetIntArrayRegion(replacedLength, 0, 1, (jint *) _int_replacedLength);
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_trinitydesktop_koala_KReplace_replace__Ljava_lang_StringBuffer_2Lorg_trinitydesktop_qt_QRegExp_2Ljava_lang_String_2IJ_3I(JNIEnv* env, jclass cls, jobject text, jobject pattern, jstring replacement, jint index, jlong options, jintArray replacedLength)
{
	(void) cls;
static TQString* _qstring_text = 0;
static TQString* _qstring_replacement = 0;
	int* _int_replacedLength = QtSupport::toIntPtr(env, replacedLength);
	jint xret = (jint) KReplaceJBridge::replace((TQString&)*(TQString*) QtSupport::toTQStringFromStringBuffer(env, text, &_qstring_text), (const TQRegExp&)*(const TQRegExp*) QtSupport::getQt(env, pattern), (const TQString&)*(TQString*) QtSupport::toTQString(env, replacement, &_qstring_replacement), (int) index, (long) options,  (int*) _int_replacedLength);
	QtSupport::fromTQStringToStringBuffer(env, _qstring_text, text);
	env->SetIntArrayRegion(replacedLength, 0, 1, (jint *) _int_replacedLength);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KReplace_resetCounts(JNIEnv* env, jobject obj)
{
	((KReplaceJBridge*) QtSupport::getQt(env, obj))->public_resetCounts();
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KReplace_shouldRestart__(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KReplace*) QtSupport::getQt(env, obj))->shouldRestart();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KReplace_shouldRestart__Z(JNIEnv* env, jobject obj, jboolean forceAsking)
{
	jboolean xret = (jboolean) ((KReplace*) QtSupport::getQt(env, obj))->shouldRestart((bool) forceAsking);
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_koala_KReplace_shouldRestart__ZZ(JNIEnv* env, jobject obj, jboolean forceAsking, jboolean showNumMatches)
{
	jboolean xret = (jboolean) ((KReplace*) QtSupport::getQt(env, obj))->shouldRestart((bool) forceAsking, (bool) showNumMatches);
	return xret;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KReplace_slotReplaceAll(JNIEnv* env, jobject obj)
{
	((KReplaceJBridge*) QtSupport::getQt(env, obj))->protected_slotReplaceAll();
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KReplace_slotReplace(JNIEnv* env, jobject obj)
{
	((KReplaceJBridge*) QtSupport::getQt(env, obj))->protected_slotReplace();
	return;
}

JNIEXPORT void JNICALL
Java_org_trinitydesktop_koala_KReplace_slotSkip(JNIEnv* env, jobject obj)
{
	((KReplaceJBridge*) QtSupport::getQt(env, obj))->protected_slotSkip();
	return;
}

