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

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

class QStyleSheetItemJBridge : public QStyleSheetItem
{
public:
	QStyleSheetItemJBridge(QStyleSheet* parent, const QString& name) : QStyleSheetItem(parent, name) {}
	QStyleSheetItemJBridge(const QStyleSheetItem& arg1) : QStyleSheetItem(arg1) {}
	~QStyleSheetItemJBridge() {QtSupport::qtKeyDeleted(this);}
};


JNIEXPORT void JNICALL
Java_org_kde_qt_QStyleSheetItem_newQStyleSheetItem__Lorg_kde_qt_QStyleSheet_2Ljava_lang_String_2(JNIEnv *env, jobject obj, jobject parent, jstring name)
{
static QString * _qstring_name = 0;
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QStyleSheetItemJBridge((QStyleSheet*) QtSupport::getQt(env, parent), (QString&) * (QString *) QtSupport::toQString(env, name, &_qstring_name)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QStyleSheetItem_newQStyleSheetItem__Lorg_kde_qt_QStyleSheetItem_2(JNIEnv *env, jobject obj, jobject arg1)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QStyleSheetItemJBridge((QStyleSheetItem&) *(QStyleSheetItem *) QtSupport::getQt(env, arg1)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

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

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

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QStyleSheetItem_styleSheet(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->styleSheet(), "org.kde.qt.QStyleSheet");
}

//JNIEXPORT jobject JNICALL
//Java_org_kde_qt_QStyleSheetItem_styleSheet__(JNIEnv *env, jobject obj)
//{
//	return (jobject) QtSupport::objectForQtKey(env, (void *)((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->styleSheet(), "org.kde.qt.QStyleSheet");
//}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QStyleSheetItem_displayMode(JNIEnv *env, jobject obj)
{
	return (jint) ((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->displayMode();
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QStyleSheetItem_setDisplayMode(JNIEnv *env, jobject obj, jint m)
{
	((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->setDisplayMode((QStyleSheetItem::DisplayMode) m);
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QStyleSheetItem_alignment(JNIEnv *env, jobject obj)
{
	return (jint) ((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->alignment();
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QStyleSheetItem_setAlignment(JNIEnv *env, jobject obj, jint f)
{
	((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->setAlignment((int) f);
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QStyleSheetItem_verticalAlignment(JNIEnv *env, jobject obj)
{
	return (jint) ((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->verticalAlignment();
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QStyleSheetItem_setVerticalAlignment(JNIEnv *env, jobject obj, jint valign)
{
	((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->setVerticalAlignment((QStyleSheetItem::VerticalAlignment) valign);
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QStyleSheetItem_fontWeight(JNIEnv *env, jobject obj)
{
	return (jint) ((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->fontWeight();
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QStyleSheetItem_setFontWeight(JNIEnv *env, jobject obj, jint w)
{
	((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->setFontWeight((int) w);
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QStyleSheetItem_logicalFontSize(JNIEnv *env, jobject obj)
{
	return (jint) ((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->logicalFontSize();
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QStyleSheetItem_setLogicalFontSize(JNIEnv *env, jobject obj, jint s)
{
	((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->setLogicalFontSize((int) s);
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QStyleSheetItem_logicalFontSizeStep(JNIEnv *env, jobject obj)
{
	return (jint) ((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->logicalFontSizeStep();
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QStyleSheetItem_setLogicalFontSizeStep(JNIEnv *env, jobject obj, jint s)
{
	((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->setLogicalFontSizeStep((int) s);
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QStyleSheetItem_fontSize(JNIEnv *env, jobject obj)
{
	return (jint) ((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->fontSize();
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QStyleSheetItem_setFontSize(JNIEnv *env, jobject obj, jint s)
{
	((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->setFontSize((int) s);
	return;
}

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

JNIEXPORT void JNICALL
Java_org_kde_qt_QStyleSheetItem_setFontFamily(JNIEnv *env, jobject obj, jstring arg1)
{
static QString * _qstring_arg1 = 0;
	((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->setFontFamily((QString&) * (QString *) QtSupport::toQString(env, arg1, &_qstring_arg1));
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QStyleSheetItem_numberOfColumns(JNIEnv *env, jobject obj)
{
	return (jint) ((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->numberOfColumns();
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QStyleSheetItem_setNumberOfColumns(JNIEnv *env, jobject obj, jint ncols)
{
	((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->setNumberOfColumns((int) ncols);
	return;
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QStyleSheetItem_color(JNIEnv *env, jobject obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QColor (((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->color()), "org.kde.qt.QColor", TRUE);
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QStyleSheetItem_setColor(JNIEnv *env, jobject obj, jobject arg1)
{
	((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->setColor((QColor&) *(QColor *) QtSupport::getQt(env, arg1));
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QStyleSheetItem_fontItalic(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->fontItalic();
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QStyleSheetItem_setFontItalic(JNIEnv *env, jobject obj, jboolean arg1)
{
	((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->setFontItalic((bool) arg1);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QStyleSheetItem_definesFontItalic(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->definesFontItalic();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QStyleSheetItem_fontUnderline(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->fontUnderline();
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QStyleSheetItem_setFontUnderline(JNIEnv *env, jobject obj, jboolean arg1)
{
	((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->setFontUnderline((bool) arg1);
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QStyleSheetItem_definesFontUnderline(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->definesFontUnderline();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QStyleSheetItem_isAnchor(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->isAnchor();
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QStyleSheetItem_setAnchor(JNIEnv *env, jobject obj, jboolean anc)
{
	((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->setAnchor((bool) anc);
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QStyleSheetItem_whiteSpaceMode(JNIEnv *env, jobject obj)
{
	return (jint) ((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->whiteSpaceMode();
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QStyleSheetItem_setWhiteSpaceMode(JNIEnv *env, jobject obj, jint m)
{
	((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->setWhiteSpaceMode((QStyleSheetItem::WhiteSpaceMode) m);
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QStyleSheetItem_margin(JNIEnv *env, jobject obj, jint m)
{
	return (jint) ((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->margin((QStyleSheetItem::Margin) m);
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QStyleSheetItem_setMargin(JNIEnv *env, jobject obj, jint arg1, jint arg2)
{
	((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->setMargin((QStyleSheetItem::Margin) arg1, (int) arg2);
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QStyleSheetItem_listStyle(JNIEnv *env, jobject obj)
{
	return (jint) ((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->listStyle();
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QStyleSheetItem_setListStyle(JNIEnv *env, jobject obj, jint arg1)
{
	((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->setListStyle((QStyleSheetItem::ListStyle) arg1);
	return;
}

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

JNIEXPORT void JNICALL
Java_org_kde_qt_QStyleSheetItem_setContexts(JNIEnv *env, jobject obj, jstring arg1)
{
static QString * _qstring_arg1 = 0;
	((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->setContexts((QString&) * (QString *) QtSupport::toQString(env, arg1, &_qstring_arg1));
	return;
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QStyleSheetItem_allowedInContext(JNIEnv *env, jobject obj, jobject arg1)
{
	return (jboolean) ((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->allowedInContext((QStyleSheetItem*) QtSupport::getQt(env, arg1));
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QStyleSheetItem_selfNesting(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->selfNesting();
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QStyleSheetItem_setSelfNesting(JNIEnv *env, jobject obj, jboolean arg1)
{
	((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->setSelfNesting((bool) arg1);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QStyleSheetItem_setLineSpacing(JNIEnv *env, jobject obj, jint ls)
{
	((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->setLineSpacing((int) ls);
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QStyleSheetItem_lineSpacing(JNIEnv *env, jobject obj)
{
	return (jint) ((QStyleSheetItemJBridge*) QtSupport::getQt(env, obj))->lineSpacing();
}

