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

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

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

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_qt_QPicture_boundingRect(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new TQRect(((TQPicture*) QtSupport::getQt(env, obj))->boundingRect()), "org.trinitydesktop.qt.TQRect", true);
	return xret;
}

JNIEXPORT jobject JNICALL
Java_org_trinitydesktop_qt_QPicture_copy(JNIEnv* env, jobject obj)
{
	jobject xret = QtSupport::objectForQtKey(env, (void*)new TQPicture(((TQPictureJBridge*) QtSupport::getQt(env, obj))->protected_copy()), "org.trinitydesktop.qt.TQPicture", true);
	return xret;
}

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

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

JNIEXPORT void JNICALL
Java_org_trinitydesktop_qt_QPicture_dispose(JNIEnv* env, jobject obj)
{
	Java_org_trinitydesktop_qt_QPicture_finalize(env, obj);
	return;
}

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

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

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

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QPicture_load__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring fileName)
{
static TQString* _qstring_fileName = 0;
	jboolean xret = (jboolean) ((TQPicture*) QtSupport::getQt(env, obj))->load((const TQString&)*(TQString*) QtSupport::toTQString(env, fileName, &_qstring_fileName));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QPicture_load__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring fileName, jstring format)
{
static TQString* _qstring_fileName = 0;
static TQCString* _qstring_format = 0;
	jboolean xret = (jboolean) ((TQPicture*) QtSupport::getQt(env, obj))->load((const TQString&)*(TQString*) QtSupport::toTQString(env, fileName, &_qstring_fileName), (const char*) QtSupport::toCharString(env, format, &_qstring_format));
	return xret;
}

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

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

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

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

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

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

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

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QPicture_save__Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring fileName)
{
static TQString* _qstring_fileName = 0;
	jboolean xret = (jboolean) ((TQPicture*) QtSupport::getQt(env, obj))->save((const TQString&)*(TQString*) QtSupport::toTQString(env, fileName, &_qstring_fileName));
	return xret;
}

JNIEXPORT jboolean JNICALL
Java_org_trinitydesktop_qt_QPicture_save__Ljava_lang_String_2Ljava_lang_String_2(JNIEnv* env, jobject obj, jstring fileName, jstring format)
{
static TQString* _qstring_fileName = 0;
static TQCString* _qstring_format = 0;
	jboolean xret = (jboolean) ((TQPicture*) QtSupport::getQt(env, obj))->save((const TQString&)*(TQString*) QtSupport::toTQString(env, fileName, &_qstring_fileName), (const char*) QtSupport::toCharString(env, format, &_qstring_format));
	return xret;
}

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

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

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

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

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

