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

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

class KCompletionJBridge : public KCompletion
{
public:
	KCompletionJBridge() : KCompletion() {};
	void public_clear() {
		KCompletion::clear();
		return;
	}
	void protected_postProcessMatch(TQString* arg1) {
		KCompletion::postProcessMatch(arg1);
		return;
	}
	void protected_postProcessMatches(TQStringList* arg1) {
		KCompletion::postProcessMatches(arg1);
		return;
	}
	~KCompletionJBridge() {QtSupport::qtKeyDeleted(this);}
	void removeChild(TQObject* arg1) {
		if (!QtSupport::eventDelegate(this,"removeChild",(void*)arg1,"org.kde.qt.TQObject")) {
			TQObject::removeChild(arg1);
		}
		return;
	}
	void clear() {
		if (!QtSupport::voidDelegate(this,"org.kde.koala.KCompletion","clear")) {
			KCompletion::clear();
		}
		return;
	}
	void customEvent(TQCustomEvent* arg1) {
		if (!QtSupport::eventDelegate(this,"customEvent",(void*)arg1,"org.kde.qt.TQCustomEvent")) {
			TQObject::customEvent(arg1);
		}
		return;
	}
	void timerEvent(TQTimerEvent* arg1) {
		if (!QtSupport::eventDelegate(this,"timerEvent",(void*)arg1,"org.kde.qt.TQTimerEvent")) {
			TQObject::timerEvent(arg1);
		}
		return;
	}
	void childEvent(TQChildEvent* arg1) {
		if (!QtSupport::eventDelegate(this,"childEvent",(void*)arg1,"org.kde.qt.TQChildEvent")) {
			TQObject::childEvent(arg1);
		}
		return;
	}
	void insertChild(TQObject* arg1) {
		if (!QtSupport::eventDelegate(this,"insertChild",(void*)arg1,"org.kde.qt.TQObject")) {
			TQObject::insertChild(arg1);
		}
		return;
	}
	bool eventFilter(TQObject* object,TQEvent* event) {
		if (!QtSupport::eventFilterDelegate(this,"org.kde.koala.KCompletion",object,event)) {
			return TQObject::eventFilter(object,event);
		} else {
			return TRUE;
		}
	}
};

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_addItem__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring item)
{
static TQString* _qstring_item = 0;
	((KCompletion*) QtSupport::getQt(env, obj))->addItem((const TQString&)*(TQString*) QtSupport::toQString(env, item, &_qstring_item));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_addItem__Ljava_lang_String_2I(JNIEnv* env, jobject obj, jstring item, jint weight)
{
static TQString* _qstring_item = 0;
	((KCompletion*) QtSupport::getQt(env, obj))->addItem((const TQString&)*(TQString*) QtSupport::toQString(env, item, &_qstring_item), (uint) weight);
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KCompletion_allMatches__(JNIEnv* env, jobject obj)
{
	TQStringList  _qlist;
	_qlist = ((KCompletion*) QtSupport::getQt(env, obj))->allMatches();
	return (jobject) QtSupport::arrayWithQStringList(env, (TQStringList*) &_qlist);
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KCompletion_allMatches__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring string)
{
	TQStringList  _qlist;
static TQString* _qstring_string = 0;
	_qlist = ((KCompletion*) QtSupport::getQt(env, obj))->allMatches((const TQString&)*(TQString*) QtSupport::toQString(env, string, &_qstring_string));
	return (jobject) QtSupport::arrayWithQStringList(env, (TQStringList*) &_qlist);
}

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

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_clear(JNIEnv* env, jobject obj)
{
	((KCompletionJBridge*) QtSupport::getQt(env, obj))->public_clear();
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KCompletion_completionMode(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KCompletion*) QtSupport::getQt(env, obj))->completionMode();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_koala_KCompletion_finalize(env, obj);
	return;
}

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

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KCompletion_hasMultipleMatches(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KCompletion*) QtSupport::getQt(env, obj))->hasMultipleMatches();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KCompletion_ignoreCase(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KCompletion*) QtSupport::getQt(env, obj))->ignoreCase();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_insertItems(JNIEnv* env, jobject obj, jobjectArray items)
{
static TQStringList* _qlist_items = 0;
	((KCompletion*) QtSupport::getQt(env, obj))->insertItems((const TQStringList&)*(TQStringList*) QtSupport::toQStringList(env, items, &_qlist_items));
	return;
}

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

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KCompletion_isEmpty(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KCompletion*) QtSupport::getQt(env, obj))->isEmpty();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KCompletion_isSoundsEnabled(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((KCompletion*) QtSupport::getQt(env, obj))->isSoundsEnabled();
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KCompletion_items(JNIEnv* env, jobject obj)
{
	TQStringList  _qlist;
	_qlist = ((KCompletion*) QtSupport::getQt(env, obj))->items();
	return (jobject) QtSupport::arrayWithQStringList(env, (TQStringList*) &_qlist);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KCompletion_lastMatch(JNIEnv* env, jobject obj)
{
	TQString  _qstring;
	_qstring = ((KCompletion*) QtSupport::getQt(env, obj))->lastMatch();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KCompletion_makeCompletion(JNIEnv* env, jobject obj, jstring string)
{
	TQString  _qstring;
static TQString* _qstring_string = 0;
	_qstring = ((KCompletion*) QtSupport::getQt(env, obj))->makeCompletion((const TQString&)*(TQString*) QtSupport::toQString(env, string, &_qstring_string));
	return QtSupport::fromQString(env, &_qstring);
}

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

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

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KCompletion_nextMatch(JNIEnv* env, jobject obj)
{
	TQString  _qstring;
	_qstring = ((KCompletion*) QtSupport::getQt(env, obj))->nextMatch();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KCompletion_order(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((KCompletion*) QtSupport::getQt(env, obj))->order();
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_postProcessMatch(JNIEnv* env, jobject obj, jobject match)
{
static TQString* _qstring_match = 0;
	((KCompletionJBridge*) QtSupport::getQt(env, obj))->protected_postProcessMatch((TQString*) QtSupport::toQStringFromStringBuffer(env, match, &_qstring_match));
	QtSupport::fromQStringToStringBuffer(env, _qstring_match, match);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_postProcessMatches(JNIEnv* env, jobject obj, jobjectArray matches)
{
static TQStringList* _qlist_matches = 0;
	((KCompletionJBridge*) QtSupport::getQt(env, obj))->protected_postProcessMatches((TQStringList*) QtSupport::toQStringList(env, matches, &_qlist_matches));
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KCompletion_previousMatch(JNIEnv* env, jobject obj)
{
	TQString  _qstring;
	_qstring = ((KCompletion*) QtSupport::getQt(env, obj))->previousMatch();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_removeItem(JNIEnv* env, jobject obj, jstring item)
{
static TQString* _qstring_item = 0;
	((KCompletion*) QtSupport::getQt(env, obj))->removeItem((const TQString&)*(TQString*) QtSupport::toQString(env, item, &_qstring_item));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_setCompletionMode(JNIEnv* env, jobject obj, jint mode)
{
	((KCompletion*) QtSupport::getQt(env, obj))->setCompletionMode((KGlobalSettings::Completion) mode);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_setEnableSounds(JNIEnv* env, jobject obj, jboolean enable)
{
	((KCompletion*) QtSupport::getQt(env, obj))->setEnableSounds((bool) enable);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_setIgnoreCase(JNIEnv* env, jobject obj, jboolean ignoreCase)
{
	((KCompletion*) QtSupport::getQt(env, obj))->setIgnoreCase((bool) ignoreCase);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_setItems(JNIEnv* env, jobject obj, jobjectArray list)
{
static TQStringList* _qlist_list = 0;
	((KCompletion*) QtSupport::getQt(env, obj))->setItems((const TQStringList&)*(TQStringList*) QtSupport::toQStringList(env, list, &_qlist_list));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_setOrder(JNIEnv* env, jobject obj, jint order)
{
	((KCompletion*) QtSupport::getQt(env, obj))->setOrder((KCompletion::CompOrder) order);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_slotMakeCompletion(JNIEnv* env, jobject obj, jstring string)
{
static TQString* _qstring_string = 0;
	((KCompletion*) QtSupport::getQt(env, obj))->slotMakeCompletion((const TQString&)*(TQString*) QtSupport::toQString(env, string, &_qstring_string));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_slotNextMatch(JNIEnv* env, jobject obj)
{
	((KCompletion*) QtSupport::getQt(env, obj))->slotNextMatch();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KCompletion_slotPreviousMatch(JNIEnv* env, jobject obj)
{
	((KCompletion*) QtSupport::getQt(env, obj))->slotPreviousMatch();
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KCompletion_substringCompletion(JNIEnv* env, jobject obj, jstring string)
{
	TQStringList  _qlist;
static TQString* _qstring_string = 0;
	_qlist = ((KCompletion*) QtSupport::getQt(env, obj))->substringCompletion((const TQString&)*(TQString*) QtSupport::toQString(env, string, &_qstring_string));
	return (jobject) QtSupport::arrayWithQStringList(env, (TQStringList*) &_qlist);
}

