/***************************************************************************
                            KAboutDialog.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_KAboutDialog.h>
#include <kdeobjc/KDESupport.h>
#include <kdeobjc/KAboutDialog.h>
#include <qtobjc/QPixmap.h>


@implementation  KAboutDialog


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

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

- initWithInt: (int)dialogLayout caption: (NSString *)caption buttonMask: (int)buttonMask defaultButton: (int)defaultButton parent: (QWidget *)parent name: (NSString *)name modal: (BOOL)modal separator: (BOOL)separator user1: (NSString *)user1 user2: (NSString *)user2 user3: (NSString *)user3
{
static qt_QString * _qstring_user3 = 0L;
static qt_QString * _qstring_user2 = 0L;
static qt_QString * _qstring_user1 = 0L;
static qt_QString * _qstring_caption = 0L;
	if ([self qt] == 0L) {
		[self setQt: kde_new_KAboutDialog1((int)dialogLayout, (qt_QString *) [caption toQString: &_qstring_caption], (int)buttonMask, (int)defaultButton, (qt_QWidget *) [parent qt], (char*) [name cString], (int)modal, (int)separator, (qt_QString *) [user1 toQString: &_qstring_user1], (qt_QString *) [user2 toQString: &_qstring_user2], (qt_QString *) [user3 toQString: &_qstring_user3])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithInt: (int)dialogLayout caption: (NSString *)caption buttonMask: (int)buttonMask defaultButton: (int)defaultButton 
{
static qt_QString * _qstring_caption = 0L;
	if ([self qt] == 0L) {
		[self setQt: kde_new_KAboutDialog1((int)dialogLayout, (qt_QString *) [caption toQString: &_qstring_caption], (int)buttonMask, (int)defaultButton, 0, 0, 0, 0, qt_QString_null(), qt_QString_null(), qt_QString_null())];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- adjust
{
	kde_KAboutDialog_adjust((kde_KAboutDialog *)[self qt]);
	return self;
}

- show
{
	kde_KAboutDialog_show((kde_KAboutDialog *)[self qt]);
	return self;
}

- show: (QWidget *)centerParent
{
	kde_KAboutDialog_show1((kde_KAboutDialog *)[self qt], (qt_QWidget *) [centerParent qt]);
	return self;
}

- setTitle: (NSString *)title
{
static qt_QString * _qstring_title = 0L;
	kde_KAboutDialog_setTitle((kde_KAboutDialog *)[self qt], (qt_QString *) [title toQString: &_qstring_title]);
	return self;
}

- setImage: (NSString *)fileName
{
static qt_QString * _qstring_fileName = 0L;
	kde_KAboutDialog_setImage((kde_KAboutDialog *)[self qt], (qt_QString *) [fileName toQString: &_qstring_fileName]);
	return self;
}

- setImageBackgroundColor: (QColor *)color
{
	kde_KAboutDialog_setImageBackgroundColor((kde_KAboutDialog *)[self qt], (qt_QColor *) [color qt]);
	return self;
}

- setImageFrame: (BOOL)state
{
	kde_KAboutDialog_setImageFrame((kde_KAboutDialog *)[self qt], (int)state);
	return self;
}

- setProduct: (NSString *)appName version: (NSString *)version author: (NSString *)author year: (NSString *)year
{
static qt_QString * _qstring_year = 0L;
static qt_QString * _qstring_author = 0L;
static qt_QString * _qstring_version = 0L;
static qt_QString * _qstring_appName = 0L;
	kde_KAboutDialog_setProduct((kde_KAboutDialog *)[self qt], (qt_QString *) [appName toQString: &_qstring_appName], (qt_QString *) [version toQString: &_qstring_version], (qt_QString *) [author toQString: &_qstring_author], (qt_QString *) [year toQString: &_qstring_year]);
	return self;
}

- (QFrame*) addTextPage: (NSString *)title text: (NSString *)text richText: (BOOL)richText numLines: (int)numLines
{
static qt_QString * _qstring_text = 0L;
static qt_QString * _qstring_title = 0L;
	return (QFrame*) [QtSupport objectForQtKey: kde_KAboutDialog_addTextPage((kde_KAboutDialog *)[self qt], (qt_QString *) [title toQString: &_qstring_title], (qt_QString *) [text toQString: &_qstring_text], (int)richText, (int)numLines) withClass: [QFrame class] allocatedInObjcWorld: YES];
}

- (QFrame*) addTextPage: (NSString *)title text: (NSString *)text 
{
static qt_QString * _qstring_text = 0L;
static qt_QString * _qstring_title = 0L;
	return (QFrame*) [QtSupport objectForQtKey: kde_KAboutDialog_addTextPage((kde_KAboutDialog *)[self qt], (qt_QString *) [title toQString: &_qstring_title], (qt_QString *) [text toQString: &_qstring_text], 0, 10) withClass: [QFrame class] allocatedInObjcWorld: YES];
}

- (QFrame*) addLicensePage: (NSString *)title text: (NSString *)text numLines: (int)numLines
{
static qt_QString * _qstring_text = 0L;
static qt_QString * _qstring_title = 0L;
	return (QFrame*) [QtSupport objectForQtKey: kde_KAboutDialog_addLicensePage((kde_KAboutDialog *)[self qt], (qt_QString *) [title toQString: &_qstring_title], (qt_QString *) [text toQString: &_qstring_text], (int)numLines) withClass: [QFrame class] allocatedInObjcWorld: YES];
}

- (QFrame*) addLicensePage: (NSString *)title text: (NSString *)text 
{
static qt_QString * _qstring_text = 0L;
static qt_QString * _qstring_title = 0L;
	return (QFrame*) [QtSupport objectForQtKey: kde_KAboutDialog_addLicensePage((kde_KAboutDialog *)[self qt], (qt_QString *) [title toQString: &_qstring_title], (qt_QString *) [text toQString: &_qstring_text], 10) withClass: [QFrame class] allocatedInObjcWorld: YES];
}

- (KAboutContainer*) addContainerPage: (NSString *)title childAlignment: (int)childAlignment innerAlignment: (int)innerAlignment
{
static qt_QString * _qstring_title = 0L;
	return (KAboutContainer*) [QtSupport objectForQtKey: kde_KAboutDialog_addContainerPage((kde_KAboutDialog *)[self qt], (qt_QString *) [title toQString: &_qstring_title], (int)childAlignment, (int)innerAlignment) withClass: [KAboutContainer class] allocatedInObjcWorld: YES];
}

- (KAboutContainer*) addContainerPage: (NSString *)title 
{
static qt_QString * _qstring_title = 0L;
	return (KAboutContainer*) [QtSupport objectForQtKey: kde_KAboutDialog_addContainerPage((kde_KAboutDialog *)[self qt], (qt_QString *) [title toQString: &_qstring_title], [KAboutDialog AlignCenter], [KAboutDialog AlignCenter]) withClass: [KAboutContainer class] allocatedInObjcWorld: YES];
}

- (KAboutContainer*) addScrolledContainerPage: (NSString *)title childAlignment: (int)childAlignment innerAlignment: (int)innerAlignment
{
static qt_QString * _qstring_title = 0L;
	return (KAboutContainer*) [QtSupport objectForQtKey: kde_KAboutDialog_addScrolledContainerPage((kde_KAboutDialog *)[self qt], (qt_QString *) [title toQString: &_qstring_title], (int)childAlignment, (int)innerAlignment) withClass: [KAboutContainer class] allocatedInObjcWorld: YES];
}

- (KAboutContainer*) addScrolledContainerPage: (NSString *)title 
{
static qt_QString * _qstring_title = 0L;
	return (KAboutContainer*) [QtSupport objectForQtKey: kde_KAboutDialog_addScrolledContainerPage((kde_KAboutDialog *)[self qt], (qt_QString *) [title toQString: &_qstring_title], [KAboutDialog AlignCenter], [KAboutDialog AlignCenter]) withClass: [KAboutContainer class] allocatedInObjcWorld: YES];
}

- (KAboutContainer*) addContainer: (int)childAlignment innerAlignment: (int)innerAlignment
{
	return (KAboutContainer*) [QtSupport objectForQtKey: kde_KAboutDialog_addContainer((kde_KAboutDialog *)[self qt], (int)childAlignment, (int)innerAlignment) withClass: [KAboutContainer class] allocatedInObjcWorld: YES];
}

- (QFrame*) addPage: (NSString *)title
{
static qt_QString * _qstring_title = 0L;
	return (QFrame*) [QtSupport objectForQtKey: kde_KAboutDialog_addPage((kde_KAboutDialog *)[self qt], (qt_QString *) [title toQString: &_qstring_title]) withClass: [QFrame class] allocatedInObjcWorld: YES];
}

- setLogo: (QPixmap *)arg1
{
	kde_KAboutDialog_setLogo((kde_KAboutDialog *)[self qt], (qt_QPixmap *) [arg1 qt]);
	return self;
}

- setAuthor: (NSString *)name email: (NSString *)email url: (NSString *)url work: (NSString *)work
{
static qt_QString * _qstring_work = 0L;
static qt_QString * _qstring_url = 0L;
static qt_QString * _qstring_email = 0L;
static qt_QString * _qstring_name = 0L;
	kde_KAboutDialog_setAuthor((kde_KAboutDialog *)[self qt], (qt_QString *) [name toQString: &_qstring_name], (qt_QString *) [email toQString: &_qstring_email], (qt_QString *) [url toQString: &_qstring_url], (qt_QString *) [work toQString: &_qstring_work]);
	return self;
}

- setMaintainer: (NSString *)name email: (NSString *)email url: (NSString *)url work: (NSString *)work
{
static qt_QString * _qstring_work = 0L;
static qt_QString * _qstring_url = 0L;
static qt_QString * _qstring_email = 0L;
static qt_QString * _qstring_name = 0L;
	kde_KAboutDialog_setMaintainer((kde_KAboutDialog *)[self qt], (qt_QString *) [name toQString: &_qstring_name], (qt_QString *) [email toQString: &_qstring_email], (qt_QString *) [url toQString: &_qstring_url], (qt_QString *) [work toQString: &_qstring_work]);
	return self;
}

- addContributor: (NSString *)name email: (NSString *)email url: (NSString *)url work: (NSString *)work
{
static qt_QString * _qstring_work = 0L;
static qt_QString * _qstring_url = 0L;
static qt_QString * _qstring_email = 0L;
static qt_QString * _qstring_name = 0L;
	kde_KAboutDialog_addContributor((kde_KAboutDialog *)[self qt], (qt_QString *) [name toQString: &_qstring_name], (qt_QString *) [email toQString: &_qstring_email], (qt_QString *) [url toQString: &_qstring_url], (qt_QString *) [work toQString: &_qstring_work]);
	return self;
}

- setVersion: (NSString *)name
{
static qt_QString * _qstring_name = 0L;
	kde_KAboutDialog_setVersion((kde_KAboutDialog *)[self qt], (qt_QString *) [name toQString: &_qstring_name]);
	return self;
}

+ imageURL: (QWidget *)parent caption: (NSString *)caption path: (NSString *)path imageColor: (QColor *)imageColor url: (NSString *)url
{
static qt_QString * _qstring_url = 0L;
static qt_QString * _qstring_path = 0L;
static qt_QString * _qstring_caption = 0L;
	kde_KAboutDialog_imageURL((qt_QWidget *) [parent qt], (qt_QString *) [caption toQString: &_qstring_caption], (qt_QString *) [path toQString: &_qstring_path], (qt_QColor *) [imageColor qt], (qt_QString *) [url toQString: &_qstring_url]);
	return self;
}

- sendEmailSlot: (NSString *)name email: (NSString *)email
{
static qt_QString * _qstring_email = 0L;
static qt_QString * _qstring_name = 0L;
	kde_KAboutDialog_sendEmailSlot((kde_KAboutDialog *)[self qt], (qt_QString *) [name toQString: &_qstring_name], (qt_QString *) [email toQString: &_qstring_email]);
	return self;
}

- openURLSlot: (NSString *)url
{
static qt_QString * _qstring_url = 0L;
	kde_KAboutDialog_openURLSlot((kde_KAboutDialog *)[self qt], (qt_QString *) [url toQString: &_qstring_url]);
	return self;
}

- mouseTrackSlot: (int)mode e: (QMouseEvent*)e
{
	kde_KAboutDialog_mouseTrackSlot((kde_KAboutDialog *)[self qt], (int)mode, (qt_QMouseEvent*) [e qt]);
	return self;
}

+ (int) AbtPlain
{
	return (int) KABOUTDIALOG_AbtPlain;
}

+ (int) AbtTabbed
{
	return (int) KABOUTDIALOG_AbtTabbed;
}

+ (int) AbtTitle
{
	return (int) KABOUTDIALOG_AbtTitle;
}

+ (int) AbtImageLeft
{
	return (int) KABOUTDIALOG_AbtImageLeft;
}

+ (int) AbtImageRight
{
	return (int) KABOUTDIALOG_AbtImageRight;
}

+ (int) AbtImageOnly
{
	return (int) KABOUTDIALOG_AbtImageOnly;
}

+ (int) AbtProduct
{
	return (int) KABOUTDIALOG_AbtProduct;
}

+ (int) AbtKDEStandard
{
	return (int) KABOUTDIALOG_AbtKDEStandard;
}

+ (int) AbtAppStandard
{
	return (int) KABOUTDIALOG_AbtAppStandard;
}

+ (int) AbtImageAndTitle
{
	return (int) KABOUTDIALOG_AbtImageAndTitle;
}

@end
