/***************************************************************************
                            QWidgetItem.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_QWidgetItem.h>
#include <qtobjc/QWidgetItem.h>
#include <qtobjc/QWidget.h>
#include <qtobjc/QRect.h>

@implementation  QWidgetItem


- initWithWidget: (QWidget *)w
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QWidgetItem((qt_QWidget *) [w qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

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

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

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

- (int) expanding
{
	return (int) qt_QWidgetItem_expanding((qt_QWidgetItem *)[self qt]);
}

- (BOOL) isEmpty
{
	return (BOOL) qt_QWidgetItem_isEmpty((qt_QWidgetItem *)[self qt]);
}

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

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

- (QWidget*) widget
{
	return (QWidget*) [QtSupport objectForQtKey: qt_QWidgetItem_widget((qt_QWidgetItem *)[self qt]) withClass: [QWidget class] allocatedInObjcWorld: YES];
}

- (BOOL) hasHeightForWidth
{
	return (BOOL) qt_QWidgetItem_hasHeightForWidth((qt_QWidgetItem *)[self qt]);
}

- (int) heightForWidth: (int)arg1
{
	return (int) qt_QWidgetItem_heightForWidth((qt_QWidgetItem *)[self qt], (int)arg1);
}

//- (QSize*) widgetSizeHint
//{
//	return (QSize*) [QtSupport objectForQtKey: qt_QWidgetItem_widgetSizeHint((qt_QWidgetItem *)[self qt]) withClass: [QSize class] allocatedInObjcWorld: YES];
//}

@end
