/***************************************************************************
                            QCheckListItem.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 <qlistview.h>
#include <qstring.h>
#include <qcstring.h>

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

class QCheckListItemJBridge : public QCheckListItem
{
public:
	QCheckListItemJBridge(QCheckListItem* parent, const QString& text, Type arg1) : QCheckListItem(parent, text, arg1) {}
	QCheckListItemJBridge(QListViewItem* parent, const QString& text, Type arg1) : QCheckListItem(parent, text, arg1) {}
	QCheckListItemJBridge(QListView* parent, const QString& text, Type arg1) : QCheckListItem(parent, text, arg1) {}
	QCheckListItemJBridge(QListViewItem* parent, const QString& text, const QPixmap& arg1) : QCheckListItem(parent, text, arg1) {}
	QCheckListItemJBridge(QListView* parent, const QString& text, const QPixmap& arg1) : QCheckListItem(parent, text, arg1) {}
	~QCheckListItemJBridge() {QtSupport::qtKeyDeleted(this);}
	void protected_activate() {
		QCheckListItem::activate();
		return;
	}
	void protected_turnOffChild() {
		QCheckListItem::turnOffChild();
		return;
	}
	void protected_stateChange(bool arg1) {
		QCheckListItem::stateChange(arg1);
		return;
	}
};


JNIEXPORT void JNICALL
Java_org_kde_qt_QCheckListItem_newQCheckListItem__Lorg_kde_qt_QCheckListItem_2Ljava_lang_String_2I(JNIEnv *env, jobject obj, jobject parent, jstring text, jint arg1)
{
static QString * _qstring_text = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QCheckListItemJBridge((QCheckListItem*) QtSupport::getQt(env, parent), (QString&) * (QString *) QtSupport::toQString(env, text, &_qstring_text), (QCheckListItem::Type) arg1));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QCheckListItem_newQCheckListItem__Lorg_kde_qt_QCheckListItem_2Ljava_lang_String_2(JNIEnv *env, jobject obj, jobject parent, jstring text)
{
static QString * _qstring_text = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QCheckListItemJBridge((QCheckListItem*) QtSupport::getQt(env, parent), (QString&) * (QString *) QtSupport::toQString(env, text, &_qstring_text), QCheckListItem::Controller));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QCheckListItem_newQCheckListItem__Lorg_kde_qt_QListViewItem_2Ljava_lang_String_2I(JNIEnv *env, jobject obj, jobject parent, jstring text, jint arg1)
{
static QString * _qstring_text = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QCheckListItemJBridge((QListViewItem*) QtSupport::getQt(env, parent), (QString&) * (QString *) QtSupport::toQString(env, text, &_qstring_text), (QCheckListItem::Type) arg1));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QCheckListItem_newQCheckListItem__Lorg_kde_qt_QListViewItem_2Ljava_lang_String_2(JNIEnv *env, jobject obj, jobject parent, jstring text)
{
static QString * _qstring_text = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QCheckListItemJBridge((QListViewItem*) QtSupport::getQt(env, parent), (QString&) * (QString *) QtSupport::toQString(env, text, &_qstring_text), QCheckListItem::Controller));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QCheckListItem_newQCheckListItem__Lorg_kde_qt_QListView_2Ljava_lang_String_2I(JNIEnv *env, jobject obj, jobject parent, jstring text, jint arg1)
{
static QString * _qstring_text = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QCheckListItemJBridge((QListView*) QtSupport::getQt(env, parent), (QString&) * (QString *) QtSupport::toQString(env, text, &_qstring_text), (QCheckListItem::Type) arg1));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QCheckListItem_newQCheckListItem__Lorg_kde_qt_QListView_2Ljava_lang_String_2(JNIEnv *env, jobject obj, jobject parent, jstring text)
{
static QString * _qstring_text = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QCheckListItemJBridge((QListView*) QtSupport::getQt(env, parent), (QString&) * (QString *) QtSupport::toQString(env, text, &_qstring_text), QCheckListItem::Controller));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QCheckListItem_newQCheckListItem__Lorg_kde_qt_QListViewItem_2Ljava_lang_String_2Lorg_kde_qt_QPixmap_2(JNIEnv *env, jobject obj, jobject parent, jstring text, jobject arg1)
{
static QString * _qstring_text = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QCheckListItemJBridge((QListViewItem*) QtSupport::getQt(env, parent), (QString&) * (QString *) QtSupport::toQString(env, text, &_qstring_text), (QPixmap&) *(QPixmap *) QtSupport::getQt(env, arg1)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QCheckListItem_newQCheckListItem__Lorg_kde_qt_QListView_2Ljava_lang_String_2Lorg_kde_qt_QPixmap_2(JNIEnv *env, jobject obj, jobject parent, jstring text, jobject arg1)
{
static QString * _qstring_text = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QCheckListItemJBridge((QListView*) QtSupport::getQt(env, parent), (QString&) * (QString *) QtSupport::toQString(env, text, &_qstring_text), (QPixmap&) *(QPixmap *) QtSupport::getQt(env, arg1)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

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

JNIEXPORT void JNICALL
Java_org_kde_qt_QCheckListItem_paintCell(JNIEnv *env, jobject obj, jobject arg1, jobject cg, jint column, jint width, jint alignment)
{
	((QCheckListItemJBridge*) QtSupport::getQt(env, obj))->paintCell((QPainter*) QtSupport::getQt(env, arg1), (QColorGroup&) *(QColorGroup *) QtSupport::getQt(env, cg), (int) column, (int) width, (int) alignment);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QCheckListItem_paintFocus(JNIEnv *env, jobject obj, jobject arg1, jobject cg, jobject r)
{
	((QCheckListItemJBridge*) QtSupport::getQt(env, obj))->paintFocus((QPainter*) QtSupport::getQt(env, arg1), (QColorGroup&) *(QColorGroup *) QtSupport::getQt(env, cg), (QRect&) *(QRect *) QtSupport::getQt(env, r));
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QCheckListItem_width(JNIEnv *env, jobject obj, jobject arg1, jobject arg2, jint column)
{
	return (jint) ((QCheckListItemJBridge*) QtSupport::getQt(env, obj))->width((QFontMetrics&) *(QFontMetrics *) QtSupport::getQt(env, arg1), (QListView*) QtSupport::getQt(env, arg2), (int) column);
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QCheckListItem_setup(JNIEnv *env, jobject obj)
{
	((QCheckListItemJBridge*) QtSupport::getQt(env, obj))->setup();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QCheckListItem_setOn(JNIEnv *env, jobject obj, jboolean arg1)
{
	((QCheckListItemJBridge*) QtSupport::getQt(env, obj))->setOn((bool) arg1);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QCheckListItem_isOn(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QCheckListItemJBridge*) QtSupport::getQt(env, obj))->isOn();
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QCheckListItem_type(JNIEnv *env, jobject obj)
{
	return (jint) ((QCheckListItemJBridge*) QtSupport::getQt(env, obj))->type();
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QCheckListItem_text__(JNIEnv *env, jobject obj)
{
	QString  _qstring;
	_qstring = ((QCheckListItemJBridge*) QtSupport::getQt(env, obj))->text();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QCheckListItem_text__I(JNIEnv *env, jobject obj, jint n)
{
	QString  _qstring;
	_qstring = ((QCheckListItemJBridge*) QtSupport::getQt(env, obj))->text((int) n);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QCheckListItem_rtti(JNIEnv *env, jobject obj)
{
	return (jint) ((QCheckListItemJBridge*) QtSupport::getQt(env, obj))->rtti();
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QCheckListItem_activate(JNIEnv *env, jobject obj)
{
	((QCheckListItemJBridge*) QtSupport::getQt(env, obj))->protected_activate();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QCheckListItem_turnOffChild(JNIEnv *env, jobject obj)
{
	((QCheckListItemJBridge*) QtSupport::getQt(env, obj))->protected_turnOffChild();
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QCheckListItem_stateChange(JNIEnv *env, jobject obj, jboolean arg1)
{
	((QCheckListItemJBridge*) QtSupport::getQt(env, obj))->protected_stateChange((bool) arg1);
	return;
}

