/***************************************************************************
                            QSpacerItem.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_QSpacerItem.h>
#include <qtobjc/QSpacerItem.h>
#include <qtobjc/QRect.h>
#include <qtobjc/QSizePolicy.h>

@implementation  QSpacerItem


- initWithInt: (int)w h: (int)h hData: (int)hData vData: (int)vData
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QSpacerItem((int)w, (int)h, (int)hData, (int)vData)];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithInt: (int)w h: (int)h 
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QSpacerItem((int)w, (int)h, [QSizePolicy Minimum], [QSizePolicy Minimum])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- changeSize: (int)w h: (int)h hData: (int)hData vData: (int)vData
{
	qt_QSpacerItem_changeSize((qt_QSpacerItem *)[self qt], (int)w, (int)h, (int)hData, (int)vData);
	return self;
}

- changeSize: (int)w h: (int)h 
{
	qt_QSpacerItem_changeSize((qt_QSpacerItem *)[self qt], (int)w, (int)h, [QSizePolicy Minimum], [QSizePolicy Minimum]);
	return self;
}

- (QSize*) sizeHint
{
	return (QSize*) [QtSupport objectForQtKey: qt_QSpacerItem_sizeHint((qt_QSpacerItem *)[self qt]) withClass: [QSize class] allocatedInObjcWorld: YES];
}

- (QSize*) minimumSize
{
	return (QSize*) [QtSupport objectForQtKey: qt_QSpacerItem_minimumSize((qt_QSpacerItem *)[self qt]) withClass: [QSize class] allocatedInObjcWorld: YES];
}

- (QSize*) maximumSize
{
	return (QSize*) [QtSupport objectForQtKey: qt_QSpacerItem_maximumSize((qt_QSpacerItem *)[self qt]) withClass: [QSize class] allocatedInObjcWorld: YES];
}

- (int) expanding
{
	return (int) qt_QSpacerItem_expanding((qt_QSpacerItem *)[self qt]);
}

- (BOOL) isEmpty
{
	return (BOOL) qt_QSpacerItem_isEmpty((qt_QSpacerItem *)[self qt]);
}

- setGeometry: (QRect*)arg1
{
	qt_QSpacerItem_setGeometry((qt_QSpacerItem *)[self qt], (qt_QRect*) [arg1 qt]);
	return self;
}

- (QRect*) geometry
{
	return (QRect*) [QtSupport objectForQtKey: qt_QSpacerItem_geometry((qt_QSpacerItem *)[self qt]) withClass: [QRect class] allocatedInObjcWorld: YES];
}

- (QSpacerItem*) spacerItem
{
	return (QSpacerItem*) [QtSupport objectForQtKey: qt_QSpacerItem_spacerItem((qt_QSpacerItem *)[self qt]) withClass: [QSpacerItem class] allocatedInObjcWorld: YES];
}

@end
