/***************************************************************************
                            QCustomMenuItem.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_QCustomMenuItem.h>
#include <qtobjc/QCustomMenuItem.h>
#include <qtobjc/QPainter.h>
#include <qtobjc/QColorGroup.h>
#include <qtobjc/QFont.h>

@implementation  QCustomMenuItem


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

- (BOOL) fullSpan
{
	return (BOOL) qt_QCustomMenuItem_fullSpan((qt_QCustomMenuItem *)[self qt]);
}

- (BOOL) isSeparator
{
	return (BOOL) qt_QCustomMenuItem_isSeparator((qt_QCustomMenuItem *)[self qt]);
}

- setFont: (QFont *)font
{
	qt_QCustomMenuItem_setFont((qt_QCustomMenuItem *)[self qt], (qt_QFont *) [font qt]);
	return self;
}

- paint: (QPainter *)p cg: (QColorGroup *)cg act: (BOOL)act enabled: (BOOL)enabled x: (int)x y: (int)y w: (int)w h: (int)h
{
	qt_QCustomMenuItem_paint((qt_QCustomMenuItem *)[self qt], (qt_QPainter *) [p qt], (qt_QColorGroup *) [cg qt], (int)act, (int)enabled, (int)x, (int)y, (int)w, (int)h);
	return self;
}

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

@end
