/***************************************************************************
                            QStyleSheetItem.m -  description
                             -------------------
    begin                : Wed Nov 21 12:08:37 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 12:08:37 2001, using kalyptus 0.9.
 ***************************************************************************/

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

#include <qtc/qt_QString.h>
#include <qtc/qt_QCString.h>
#include <qtc/qt_QStyleSheetItem.h>
#include <qtobjc/QStyleSheetItem.h>
#include <qtobjc/QStyleSheet.h>
#include <qtobjc/QColor.h>

@implementation  QStyleSheetItem


- initWithStyleSheet: (QStyleSheet*)parent name: (NSString *)name
{
static qt_QString * _qstring_name = 0L;
	if ([self qt] == 0L) {
		[self setQt: qt_new_QStyleSheetItem((qt_QStyleSheet*) [parent qt], (qt_QString *) [name toQString: &_qstring_name])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- copyWithZone: (NSZone *) zone
{
	QStyleSheetItem * aCopy;
	aCopy = [[(QStyleSheetItem *)[[self class] allocWithZone: zone] setQt: qt_new_QStyleSheetItem1([self qt])] init];
	[aCopy setAllocatedInObjcWorld: YES];
	[QtSupport setObject: aCopy forQtKey: [aCopy qt]];
	return aCopy;
}

- (void) dealloc
{
	if ([self qt] != 0L) {
		if ([self allocatedInObjcWorld]) {
			qt_del_QStyleSheetItem((qt_QStyleSheetItem *)[self qt]);
		}
		[QtSupport removeQtKey: [self qt]];
		[self setQt: 0L];
	}
	[super dealloc];
}

- (NSString *) name
{
static qt_QString * _qstring = 0L;
	_qstring = qt_QStyleSheetItem_name((qt_QStyleSheetItem *)[self qt]);
	return [NSString fromQString: _qstring];
}

- (QStyleSheet*) styleSheet
{
	return (QStyleSheet*) [QtSupport objectForQtKey: qt_QStyleSheetItem_styleSheet((qt_QStyleSheetItem *)[self qt]) withClass: [QStyleSheet class] allocatedInObjcWorld: YES];
}

//- (QStyleSheet*) styleSheet
//{
//	return (QStyleSheet*) [QtSupport objectForQtKey: qt_QStyleSheetItem_styleSheet1((qt_QStyleSheetItem *)[self qt]) withClass: [QStyleSheet class] allocatedInObjcWorld: YES];
//}

- (int) displayMode
{
	return (int) qt_QStyleSheetItem_displayMode((qt_QStyleSheetItem *)[self qt]);
}

- setDisplayMode: (int)m
{
	qt_QStyleSheetItem_setDisplayMode((qt_QStyleSheetItem *)[self qt], (int)m);
	return self;
}

- (int) alignment
{
	return (int) qt_QStyleSheetItem_alignment((qt_QStyleSheetItem *)[self qt]);
}

- setAlignment: (int)f
{
	qt_QStyleSheetItem_setAlignment((qt_QStyleSheetItem *)[self qt], (int)f);
	return self;
}

- (int) verticalAlignment
{
	return (int) qt_QStyleSheetItem_verticalAlignment((qt_QStyleSheetItem *)[self qt]);
}

- setVerticalAlignment: (int)valign
{
	qt_QStyleSheetItem_setVerticalAlignment((qt_QStyleSheetItem *)[self qt], (int)valign);
	return self;
}

- (int) fontWeight
{
	return (int) qt_QStyleSheetItem_fontWeight((qt_QStyleSheetItem *)[self qt]);
}

- setFontWeight: (int)w
{
	qt_QStyleSheetItem_setFontWeight((qt_QStyleSheetItem *)[self qt], (int)w);
	return self;
}

- (int) logicalFontSize
{
	return (int) qt_QStyleSheetItem_logicalFontSize((qt_QStyleSheetItem *)[self qt]);
}

- setLogicalFontSize: (int)s
{
	qt_QStyleSheetItem_setLogicalFontSize((qt_QStyleSheetItem *)[self qt], (int)s);
	return self;
}

- (int) logicalFontSizeStep
{
	return (int) qt_QStyleSheetItem_logicalFontSizeStep((qt_QStyleSheetItem *)[self qt]);
}

- setLogicalFontSizeStep: (int)s
{
	qt_QStyleSheetItem_setLogicalFontSizeStep((qt_QStyleSheetItem *)[self qt], (int)s);
	return self;
}

- (int) fontSize
{
	return (int) qt_QStyleSheetItem_fontSize((qt_QStyleSheetItem *)[self qt]);
}

- setFontSize: (int)s
{
	qt_QStyleSheetItem_setFontSize((qt_QStyleSheetItem *)[self qt], (int)s);
	return self;
}

- (NSString *) fontFamily
{
static qt_QString * _qstring = 0L;
	_qstring = qt_QStyleSheetItem_fontFamily((qt_QStyleSheetItem *)[self qt]);
	return [NSString fromQString: _qstring];
}

- setFontFamily: (NSString *)arg1
{
static qt_QString * _qstring_arg1 = 0L;
	qt_QStyleSheetItem_setFontFamily((qt_QStyleSheetItem *)[self qt], (qt_QString *) [arg1 toQString: &_qstring_arg1]);
	return self;
}

- (int) numberOfColumns
{
	return (int) qt_QStyleSheetItem_numberOfColumns((qt_QStyleSheetItem *)[self qt]);
}

- setNumberOfColumns: (int)ncols
{
	qt_QStyleSheetItem_setNumberOfColumns((qt_QStyleSheetItem *)[self qt], (int)ncols);
	return self;
}

- (QColor*) color
{
	return (QColor*) [QtSupport objectForQtKey: qt_QStyleSheetItem_color((qt_QStyleSheetItem *)[self qt]) withClass: [QColor class] allocatedInObjcWorld: YES];
}

- setColor: (QColor *)arg1
{
	qt_QStyleSheetItem_setColor((qt_QStyleSheetItem *)[self qt], (qt_QColor *) [arg1 qt]);
	return self;
}

- (BOOL) fontItalic
{
	return (BOOL) qt_QStyleSheetItem_fontItalic((qt_QStyleSheetItem *)[self qt]);
}

- setFontItalic: (BOOL)arg1
{
	qt_QStyleSheetItem_setFontItalic((qt_QStyleSheetItem *)[self qt], (int)arg1);
	return self;
}

- (BOOL) definesFontItalic
{
	return (BOOL) qt_QStyleSheetItem_definesFontItalic((qt_QStyleSheetItem *)[self qt]);
}

- (BOOL) fontUnderline
{
	return (BOOL) qt_QStyleSheetItem_fontUnderline((qt_QStyleSheetItem *)[self qt]);
}

- setFontUnderline: (BOOL)arg1
{
	qt_QStyleSheetItem_setFontUnderline((qt_QStyleSheetItem *)[self qt], (int)arg1);
	return self;
}

- (BOOL) definesFontUnderline
{
	return (BOOL) qt_QStyleSheetItem_definesFontUnderline((qt_QStyleSheetItem *)[self qt]);
}

- (BOOL) isAnchor
{
	return (BOOL) qt_QStyleSheetItem_isAnchor((qt_QStyleSheetItem *)[self qt]);
}

- setAnchor: (BOOL)anc
{
	qt_QStyleSheetItem_setAnchor((qt_QStyleSheetItem *)[self qt], (int)anc);
	return self;
}

- (int) whiteSpaceMode
{
	return (int) qt_QStyleSheetItem_whiteSpaceMode((qt_QStyleSheetItem *)[self qt]);
}

- setWhiteSpaceMode: (int)m
{
	qt_QStyleSheetItem_setWhiteSpaceMode((qt_QStyleSheetItem *)[self qt], (int)m);
	return self;
}

- (int) margin: (int)m
{
	return (int) qt_QStyleSheetItem_margin((qt_QStyleSheetItem *)[self qt], (int)m);
}

- setMargin: (int)arg1 int: (int)arg2
{
	qt_QStyleSheetItem_setMargin((qt_QStyleSheetItem *)[self qt], (int)arg1, (int)arg2);
	return self;
}

- (int) listStyle
{
	return (int) qt_QStyleSheetItem_listStyle((qt_QStyleSheetItem *)[self qt]);
}

- setListStyle: (int)arg1
{
	qt_QStyleSheetItem_setListStyle((qt_QStyleSheetItem *)[self qt], (int)arg1);
	return self;
}

- (NSString *) contexts
{
static qt_QString * _qstring = 0L;
	_qstring = qt_QStyleSheetItem_contexts((qt_QStyleSheetItem *)[self qt]);
	return [NSString fromQString: _qstring];
}

- setContexts: (NSString *)arg1
{
static qt_QString * _qstring_arg1 = 0L;
	qt_QStyleSheetItem_setContexts((qt_QStyleSheetItem *)[self qt], (qt_QString *) [arg1 toQString: &_qstring_arg1]);
	return self;
}

- (BOOL) allowedInContext: (QStyleSheetItem*)arg1
{
	return (BOOL) qt_QStyleSheetItem_allowedInContext((qt_QStyleSheetItem *)[self qt], (qt_QStyleSheetItem*) [arg1 qt]);
}

- (BOOL) selfNesting
{
	return (BOOL) qt_QStyleSheetItem_selfNesting((qt_QStyleSheetItem *)[self qt]);
}

- setSelfNesting: (BOOL)arg1
{
	qt_QStyleSheetItem_setSelfNesting((qt_QStyleSheetItem *)[self qt], (int)arg1);
	return self;
}

- setLineSpacing: (int)ls
{
	qt_QStyleSheetItem_setLineSpacing((qt_QStyleSheetItem *)[self qt], (int)ls);
	return self;
}

- (int) lineSpacing
{
	return (int) qt_QStyleSheetItem_lineSpacing((qt_QStyleSheetItem *)[self qt]);
}

+ (int) Undefined
{
	return (int) QSTYLESHEETITEM_Undefined;
}

+ (int) DisplayBlock
{
	return (int) QSTYLESHEETITEM_DisplayBlock;
}

+ (int) DisplayInline
{
	return (int) QSTYLESHEETITEM_DisplayInline;
}

+ (int) DisplayListItem
{
	return (int) QSTYLESHEETITEM_DisplayListItem;
}

+ (int) DisplayNone
{
	return (int) QSTYLESHEETITEM_DisplayNone;
}

+ (int) VAlignBaseline
{
	return (int) QSTYLESHEETITEM_VAlignBaseline;
}

+ (int) VAlignSub
{
	return (int) QSTYLESHEETITEM_VAlignSub;
}

+ (int) VAlignSuper
{
	return (int) QSTYLESHEETITEM_VAlignSuper;
}

+ (int) WhiteSpaceNormal
{
	return (int) QSTYLESHEETITEM_WhiteSpaceNormal;
}

+ (int) WhiteSpacePre
{
	return (int) QSTYLESHEETITEM_WhiteSpacePre;
}

+ (int) WhiteSpaceNoWrap
{
	return (int) QSTYLESHEETITEM_WhiteSpaceNoWrap;
}

+ (int) MarginLeft
{
	return (int) QSTYLESHEETITEM_MarginLeft;
}

+ (int) MarginRight
{
	return (int) QSTYLESHEETITEM_MarginRight;
}

+ (int) MarginTop
{
	return (int) QSTYLESHEETITEM_MarginTop;
}

+ (int) MarginBottom
{
	return (int) QSTYLESHEETITEM_MarginBottom;
}

+ (int) MarginFirstLine
{
	return (int) QSTYLESHEETITEM_MarginFirstLine;
}

+ (int) MarginAll
{
	return (int) QSTYLESHEETITEM_MarginAll;
}

+ (int) MarginVertical
{
	return (int) QSTYLESHEETITEM_MarginVertical;
}

+ (int) MarginHorizontal
{
	return (int) QSTYLESHEETITEM_MarginHorizontal;
}

+ (int) ListDisc
{
	return (int) QSTYLESHEETITEM_ListDisc;
}

+ (int) ListCircle
{
	return (int) QSTYLESHEETITEM_ListCircle;
}

+ (int) ListSquare
{
	return (int) QSTYLESHEETITEM_ListSquare;
}

+ (int) ListDecimal
{
	return (int) QSTYLESHEETITEM_ListDecimal;
}

+ (int) ListLowerAlpha
{
	return (int) QSTYLESHEETITEM_ListLowerAlpha;
}

+ (int) ListUpperAlpha
{
	return (int) QSTYLESHEETITEM_ListUpperAlpha;
}

@end
