//Auto-generated by kalyptus. DO NOT EDIT.
#include <qrect.h>
#include <qstring.h>
#include <qpicture.h>

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

class QPictureJBridge : public QPicture
{
public:
	QPictureJBridge(int arg1) : QPicture(arg1) {};
	QPictureJBridge() : QPicture() {};
	QPictureJBridge(const QPicture& arg1) : QPicture(arg1) {};
	int protected_metric(int arg1) {
		return (int) QPicture::metric(arg1);
	}
	void protected_detach() {
		QPicture::detach();
		return;
	}
	QPicture protected_copy() {
		return (QPicture) QPicture::copy();
	}
	~QPictureJBridge() {QtSupport::qtKeyDeleted(this);}
};

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QPicture_boundingRect(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new QRect(((QPicture*) QtSupport::getQt(env, obj))->boundingRect()), "org.kde.qt.QRect", TRUE);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QPicture_copy(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new QPicture(((QPictureJBridge*) QtSupport::getQt(env, obj))->protected_copy()), "org.kde.qt.QPicture", TRUE);
	return xret;
}

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

JNIEXPORT void JNICALL
Java_org_kde_qt_QPicture_detach(JNIEnv* env, jobject obj)
{
	((QPictureJBridge*) QtSupport::getQt(env, obj))->protected_detach();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPicture_dispose(JNIEnv* env, jobject obj)
{
	Java_org_kde_qt_QPicture_finalize(env, obj);
	return;
}

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

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

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPicture_isNull(JNIEnv* env, jobject obj)
{
	jboolean xret = (jboolean) ((QPicture*) QtSupport::getQt(env, obj))->isNull();
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPicture_load__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring fileName)
{
static QString* _qstring_fileName = 0;
	jboolean xret = (jboolean) ((QPicture*) QtSupport::getQt(env, obj))->load((const QString&)*(QString*) QtSupport::toQString(env, fileName, &_qstring_fileName));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPicture_load__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring fileName, jstring format)
{
static QString* _qstring_fileName = 0;
static QCString* _qstring_format = 0;
	jboolean xret = (jboolean) ((QPicture*) QtSupport::getQt(env, obj))->load((const QString&)*(QString*) QtSupport::toQString(env, fileName, &_qstring_fileName), (const char*) QtSupport::toCharString(env, format, &_qstring_format));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPicture_load__Lorg_kde_qt_QIODeviceInterface_2(JNIEnv* env, jobject obj, jobject dev)
{
	jboolean xret = (jboolean) ((QPicture*) QtSupport::getQt(env, obj))->load((QIODevice*) QtSupport::getQt(env, dev));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPicture_load__Lorg_kde_qt_QIODeviceInterface_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jobject dev, jstring format)
{
static QCString* _qstring_format = 0;
	jboolean xret = (jboolean) ((QPicture*) QtSupport::getQt(env, obj))->load((QIODevice*) QtSupport::getQt(env, dev), (const char*) QtSupport::toCharString(env, format, &_qstring_format));
	return xret;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPicture_metric(JNIEnv* env, jobject obj, jint arg1)
{
	jint xret = (jint) ((QPictureJBridge*) QtSupport::getQt(env, obj))->protected_metric((int) arg1);
	return xret;
}

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

JNIEXPORT void JNICALL
Java_org_kde_qt_QPicture_newQPicture__I(JNIEnv* env, jobject obj, jint formatVersion)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QPictureJBridge((int) formatVersion));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPicture_newQPicture__Lorg_kde_qt_QPicture_2(JNIEnv* env, jobject obj, jobject arg1)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QPictureJBridge((const QPicture&)*(const QPicture*) QtSupport::getQt(env, arg1)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPicture_play(JNIEnv* env, jobject obj, jobject arg1)
{
	jboolean xret = (jboolean) ((QPicture*) QtSupport::getQt(env, obj))->play((QPainter*) QtSupport::getQt(env, arg1));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPicture_save__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring fileName)
{
static QString* _qstring_fileName = 0;
	jboolean xret = (jboolean) ((QPicture*) QtSupport::getQt(env, obj))->save((const QString&)*(QString*) QtSupport::toQString(env, fileName, &_qstring_fileName));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPicture_save__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring fileName, jstring format)
{
static QString* _qstring_fileName = 0;
static QCString* _qstring_format = 0;
	jboolean xret = (jboolean) ((QPicture*) QtSupport::getQt(env, obj))->save((const QString&)*(QString*) QtSupport::toQString(env, fileName, &_qstring_fileName), (const char*) QtSupport::toCharString(env, format, &_qstring_format));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPicture_save__Lorg_kde_qt_QIODeviceInterface_2(JNIEnv* env, jobject obj, jobject dev)
{
	jboolean xret = (jboolean) ((QPicture*) QtSupport::getQt(env, obj))->save((QIODevice*) QtSupport::getQt(env, dev));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QPicture_save__Lorg_kde_qt_QIODeviceInterface_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jobject dev, jstring format)
{
static QCString* _qstring_format = 0;
	jboolean xret = (jboolean) ((QPicture*) QtSupport::getQt(env, obj))->save((QIODevice*) QtSupport::getQt(env, dev), (const char*) QtSupport::toCharString(env, format, &_qstring_format));
	return xret;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPicture_setBoundingRect(JNIEnv* env, jobject obj, jobject r)
{
	((QPicture*) QtSupport::getQt(env, obj))->setBoundingRect((const QRect&)*(const QRect*) QtSupport::getQt(env, r));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QPicture_setData(JNIEnv* env, jobject obj, jstring data, jint size)
{
static QCString* _qstring_data = 0;
	((QPicture*) QtSupport::getQt(env, obj))->setData((const char*) QtSupport::toCharString(env, data, &_qstring_data), (uint) size);
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QPicture_size(JNIEnv* env, jobject obj)
{
	jint xret = (jint) ((QPicture*) QtSupport::getQt(env, obj))->size();
	return xret;
}

