/***************************************************************************
                            QMetaProperty.cpp -  description
                             -------------------
    begin                : Wed Nov 21 17:05:56 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Nov 21 17:05:56 2001, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
***************************************************************************/

#define _BOOL_H_
#include <qmetaobject.h>
#include <qstring.h>
#include <qcstring.h>

#include <qtjava/QtSupport.h>
#include <qtjava/QMetaProperty.h>

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QMetaProperty_type(JNIEnv *env, jobject obj)
{
	const char*  _qcstring;
	_qcstring = (const char *)((QMetaProperty*) QtSupport::getQt(env, obj))->type();
	return QtSupport::fromCharString(env, (char *) _qcstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QMetaProperty_name(JNIEnv *env, jobject obj)
{
	const char*  _qcstring;
	_qcstring = (const char *)((QMetaProperty*) QtSupport::getQt(env, obj))->name();
	return QtSupport::fromCharString(env, (char *) _qcstring);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QMetaProperty_writable(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QMetaProperty*) QtSupport::getQt(env, obj))->writable();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QMetaProperty_isValid(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QMetaProperty*) QtSupport::getQt(env, obj))->isValid();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QMetaProperty_isSetType(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QMetaProperty*) QtSupport::getQt(env, obj))->isSetType();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QMetaProperty_isEnumType(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QMetaProperty*) QtSupport::getQt(env, obj))->isEnumType();
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QMetaProperty_enumKeys(JNIEnv *env, jobject obj)
{
	QStrList  _qlist;
	_qlist = ((QMetaProperty*) QtSupport::getQt(env, obj))->enumKeys();
	return (jobject) QtSupport::arrayWithQStrList(env, (QStrList *) &_qlist);
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QMetaProperty_keyToValue(JNIEnv *env, jobject obj, jstring key)
{
static QCString * _qstring_key = 0;
	return (jint) ((QMetaProperty*) QtSupport::getQt(env, obj))->keyToValue((char*) QtSupport::toCharString(env, key, &_qstring_key));
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QMetaProperty_valueToKey(JNIEnv *env, jobject obj, jint value)
{
	const char*  _qcstring;
	_qcstring = (const char *)((QMetaProperty*) QtSupport::getQt(env, obj))->valueToKey((int) value);
	return QtSupport::fromCharString(env, (char *) _qcstring);
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QMetaProperty_keysToValue(JNIEnv *env, jobject obj, jobjectArray keys)
{
static QStrList * _qlist_keys = 0;
	return (jint) ((QMetaProperty*) QtSupport::getQt(env, obj))->keysToValue((QStrList&) * (QStrList *) QtSupport::toQStrList(env, keys, &_qlist_keys));
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QMetaProperty_valueToKeys(JNIEnv *env, jobject obj, jint value)
{
	QStrList  _qlist;
	_qlist = ((QMetaProperty*) QtSupport::getQt(env, obj))->valueToKeys((int) value);
	return (jobject) QtSupport::arrayWithQStrList(env, (QStrList *) &_qlist);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QMetaProperty_designable(JNIEnv *env, jobject obj, jobject arg1)
{
	return (jboolean) ((QMetaProperty*) QtSupport::getQt(env, obj))->designable((QObject*) QtSupport::getQt(env, arg1));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QMetaProperty_scriptable(JNIEnv *env, jobject obj, jobject arg1)
{
	return (jboolean) ((QMetaProperty*) QtSupport::getQt(env, obj))->scriptable((QObject*) QtSupport::getQt(env, arg1));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QMetaProperty_stored(JNIEnv *env, jobject obj, jobject arg1)
{
	return (jboolean) ((QMetaProperty*) QtSupport::getQt(env, obj))->stored((QObject*) QtSupport::getQt(env, arg1));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QMetaProperty_reset(JNIEnv *env, jobject obj, jobject arg1)
{
	return (jboolean) ((QMetaProperty*) QtSupport::getQt(env, obj))->reset((QObject*) QtSupport::getQt(env, arg1));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QMetaProperty_testFlags(JNIEnv *env, jobject obj, jint f)
{
	return (jboolean) ((QMetaProperty*) QtSupport::getQt(env, obj))->testFlags((uint) f);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QMetaProperty_stdSet(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QMetaProperty*) QtSupport::getQt(env, obj))->stdSet();
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QMetaProperty_id(JNIEnv *env, jobject obj)
{
	return (jint) ((QMetaProperty*) QtSupport::getQt(env, obj))->id();
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QMetaProperty_clear(JNIEnv *env, jobject obj)
{
	((QMetaProperty*) QtSupport::getQt(env, obj))->clear();
	return;
}

