/***************************************************************************
                            QListBoxPixmap.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_QListBoxPixmap.h>
#include <qtobjc/QListBoxPixmap.h>
#include <qtobjc/QListBox.h>
#include <qtobjc/QPixmap.h>
#include <qtobjc/QPainter.h>

@implementation  QListBoxPixmap


- initWithListBox: (QListBox *)listbox pixmap: (QPixmap *)arg1
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QListBoxPixmap((qt_QListBox *) [listbox qt], (qt_QPixmap *) [arg1 qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithPixmap: (QPixmap *)arg1
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QListBoxPixmap1((qt_QPixmap *) [arg1 qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithListBox: (QListBox *)listbox pix: (QPixmap *)pix after: (QListBoxItem *)after
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QListBoxPixmap2((qt_QListBox *) [listbox qt], (qt_QPixmap *) [pix qt], (qt_QListBoxItem *) [after qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithListBox: (QListBox *)listbox pixmap: (QPixmap *)arg1 string: (NSString *)arg2
{
static qt_QString * _qstring_arg2 = 0L;
	if ([self qt] == 0L) {
		[self setQt: qt_new_QListBoxPixmap3((qt_QListBox *) [listbox qt], (qt_QPixmap *) [arg1 qt], (qt_QString *) [arg2 toQString: &_qstring_arg2])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithPixmap: (QPixmap *)arg1 string: (NSString *)arg2
{
static qt_QString * _qstring_arg2 = 0L;
	if ([self qt] == 0L) {
		[self setQt: qt_new_QListBoxPixmap4((qt_QPixmap *) [arg1 qt], (qt_QString *) [arg2 toQString: &_qstring_arg2])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithListBox: (QListBox *)listbox pix: (QPixmap *)pix string: (NSString *)arg1 after: (QListBoxItem *)after
{
static qt_QString * _qstring_arg1 = 0L;
	if ([self qt] == 0L) {
		[self setQt: qt_new_QListBoxPixmap5((qt_QListBox *) [listbox qt], (qt_QPixmap *) [pix qt], (qt_QString *) [arg1 toQString: &_qstring_arg1], (qt_QListBoxItem *) [after qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

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

- (QPixmap*) pixmap
{
	return (QPixmap*) [QtSupport objectForQtKey: qt_QListBoxPixmap_pixmap((qt_QListBoxPixmap *)[self qt]) withClass: [QPixmap class] allocatedInObjcWorld: YES];
}

- (int) height: (QListBox *)arg1
{
	return (int) qt_QListBoxPixmap_height((qt_QListBoxPixmap *)[self qt], (qt_QListBox *) [arg1 qt]);
}

- (int) width: (QListBox *)arg1
{
	return (int) qt_QListBoxPixmap_width((qt_QListBoxPixmap *)[self qt], (qt_QListBox *) [arg1 qt]);
}

- (int) rtti
{
	return (int) qt_QListBoxPixmap_rtti((qt_QListBoxPixmap *)[self qt]);
}

- paint: (QPainter *)arg1
{
	qt_QListBoxPixmap_paint((qt_QListBoxPixmap *)[self qt], (qt_QPainter *) [arg1 qt]);
	return self;
}

@end
