/***************************************************************************
                            KAboutContainer.m -  description
                             -------------------
    begin                : Fri Mar  8 13:55:08 2002
    copyright            : (C) 2000-2002 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Fri Mar  8 13:55:08 2002, 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 <kdec/kde_KAboutContainer.h>
#include <kdeobjc/KDESupport.h>
#include <kdeobjc/KAboutContainer.h>

@implementation  KAboutContainer


- initWithWidget: (QWidget *)parent name: (NSString *)name margin: (int)margin spacing: (int)spacing childAlignment: (int)childAlignment innerAlignment: (int)innerAlignment
{
	if ([self qt] == 0L) {
		[self setQt: kde_new_KAboutContainer((qt_QWidget *) [parent qt], (char*) [name cString], (int)margin, (int)spacing, (int)childAlignment, (int)innerAlignment)];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- init
{
	if ([self qt] == 0L) {
		[self setQt: kde_new_KAboutContainer(0, 0, 0, 0, [KAboutContainer AlignCenter], [KAboutContainer AlignCenter])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- addWidget: (QWidget *)widget
{
	kde_KAboutContainer_addWidget((kde_KAboutContainer *)[self qt], (qt_QWidget *) [widget qt]);
	return self;
}

- addPerson: (NSString *)name email: (NSString *)email url: (NSString *)url task: (NSString *)task showHeader: (BOOL)showHeader showframe: (BOOL)showframe showBold: (BOOL)showBold
{
static qt_QString * _qstring_task = 0L;
static qt_QString * _qstring_url = 0L;
static qt_QString * _qstring_email = 0L;
static qt_QString * _qstring_name = 0L;
	kde_KAboutContainer_addPerson((kde_KAboutContainer *)[self qt], (qt_QString *) [name toQString: &_qstring_name], (qt_QString *) [email toQString: &_qstring_email], (qt_QString *) [url toQString: &_qstring_url], (qt_QString *) [task toQString: &_qstring_task], (int)showHeader, (int)showframe, (int)showBold);
	return self;
}

- addPerson: (NSString *)name email: (NSString *)email url: (NSString *)url task: (NSString *)task 
{
static qt_QString * _qstring_task = 0L;
static qt_QString * _qstring_url = 0L;
static qt_QString * _qstring_email = 0L;
static qt_QString * _qstring_name = 0L;
	kde_KAboutContainer_addPerson((kde_KAboutContainer *)[self qt], (qt_QString *) [name toQString: &_qstring_name], (qt_QString *) [email toQString: &_qstring_email], (qt_QString *) [url toQString: &_qstring_url], (qt_QString *) [task toQString: &_qstring_task], 0, 0, 0);
	return self;
}

- addTitle: (NSString *)title alignment: (int)alignment showframe: (BOOL)showframe showBold: (BOOL)showBold
{
static qt_QString * _qstring_title = 0L;
	kde_KAboutContainer_addTitle((kde_KAboutContainer *)[self qt], (qt_QString *) [title toQString: &_qstring_title], (int)alignment, (int)showframe, (int)showBold);
	return self;
}

- addTitle: (NSString *)title 
{
static qt_QString * _qstring_title = 0L;
	kde_KAboutContainer_addTitle((kde_KAboutContainer *)[self qt], (qt_QString *) [title toQString: &_qstring_title], [KAboutContainer AlignLeft], 0, 0);
	return self;
}

- addImage: (NSString *)fileName alignment: (int)alignment
{
static qt_QString * _qstring_fileName = 0L;
	kde_KAboutContainer_addImage((kde_KAboutContainer *)[self qt], (qt_QString *) [fileName toQString: &_qstring_fileName], (int)alignment);
	return self;
}

- addImage: (NSString *)fileName 
{
static qt_QString * _qstring_fileName = 0L;
	kde_KAboutContainer_addImage((kde_KAboutContainer *)[self qt], (qt_QString *) [fileName toQString: &_qstring_fileName], [KAboutContainer AlignLeft]);
	return self;
}

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

- (QSize*) minimumSizeHint
{
	return (QSize*) [QtSupport objectForQtKey: kde_KAboutContainer_minimumSizeHint((kde_KAboutContainer *)[self qt]) withClass: [QSize class] allocatedInObjcWorld: YES];
}

@end
