/***************************************************************************
                            QWizard.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_QWizard.h>
#include <qtobjc/QWizard.h>
#include <qtobjc/QFont.h>

#include <qtobjc/QPushButton.h>
#include <qtobjc/QHBoxLayout.h>

@implementation  QWizard


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

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

- (void) dealloc
{
	if ([self qt] != 0L) {
		if ([self allocatedInObjcWorld] && [self parentWidget: YES] == nil) {
			qt_del_QWizard((qt_QWizard *)[self qt]);
		}
		[QtSupport removeQtKey: [self qt]];
		[self setQt: 0L];
	}
	[super dealloc];
}

- show
{
	qt_QWizard_show((qt_QWizard *)[self qt]);
	return self;
}

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

- addPage: (QWidget *)arg1 string: (NSString *)arg2
{
static qt_QString * _qstring_arg2 = 0L;
	qt_QWizard_addPage((qt_QWizard *)[self qt], (qt_QWidget *) [arg1 qt], (qt_QString *) [arg2 toQString: &_qstring_arg2]);
	return self;
}

- insertPage: (QWidget *)arg1 string: (NSString *)arg2 int: (int)arg3
{
static qt_QString * _qstring_arg2 = 0L;
	qt_QWizard_insertPage((qt_QWizard *)[self qt], (qt_QWidget *) [arg1 qt], (qt_QString *) [arg2 toQString: &_qstring_arg2], (int)arg3);
	return self;
}

- removePage: (QWidget *)arg1
{
	qt_QWizard_removePage((qt_QWizard *)[self qt], (qt_QWidget *) [arg1 qt]);
	return self;
}

- (NSString *) title: (QWidget *)arg1
{
static qt_QString * _qstring = 0L;
	_qstring = qt_QWizard_title((qt_QWizard *)[self qt], (qt_QWidget *) [arg1 qt]);
	return [NSString fromQString: _qstring];
}

- setTitle: (QWidget *)arg1 string: (NSString *)arg2
{
static qt_QString * _qstring_arg2 = 0L;
	qt_QWizard_setTitle((qt_QWizard *)[self qt], (qt_QWidget *) [arg1 qt], (qt_QString *) [arg2 toQString: &_qstring_arg2]);
	return self;
}

- (QFont*) titleFont
{
	return (QFont*) [QtSupport objectForQtKey: qt_QWizard_titleFont((qt_QWizard *)[self qt]) withClass: [QFont class] allocatedInObjcWorld: YES];
}

- setTitleFont: (QFont *)arg1
{
	qt_QWizard_setTitleFont((qt_QWizard *)[self qt], (qt_QFont *) [arg1 qt]);
	return self;
}

- showPage: (QWidget *)arg1
{
	qt_QWizard_showPage((qt_QWizard *)[self qt], (qt_QWidget *) [arg1 qt]);
	return self;
}

- (QWidget*) currentPage
{
	return (QWidget*) [QtSupport objectForQtKey: qt_QWizard_currentPage((qt_QWizard *)[self qt]) withClass: [QWidget class] allocatedInObjcWorld: YES];
}

- (QWidget*) page: (int)arg1
{
	return (QWidget*) [QtSupport objectForQtKey: qt_QWizard_page((qt_QWizard *)[self qt], (int)arg1) withClass: [QWidget class] allocatedInObjcWorld: YES];
}

- (int) pageCount
{
	return (int) qt_QWizard_pageCount((qt_QWizard *)[self qt]);
}

- (int) indexOf: (QWidget *)arg1
{
	return (int) qt_QWizard_indexOf((qt_QWizard *)[self qt], (qt_QWidget *) [arg1 qt]);
}

- (BOOL) appropriate: (QWidget *)arg1
{
	return (BOOL) qt_QWizard_appropriate((qt_QWizard *)[self qt], (qt_QWidget *) [arg1 qt]);
}

- setAppropriate: (QWidget *)arg1 bool: (BOOL)arg2
{
	qt_QWizard_setAppropriate((qt_QWizard *)[self qt], (qt_QWidget *) [arg1 qt], (int)arg2);
	return self;
}

- (QPushButton*) backButton
{
	return (QPushButton*) [QtSupport objectForQtKey: qt_QWizard_backButton((qt_QWizard *)[self qt]) withClass: [QPushButton class] allocatedInObjcWorld: YES];
}

- (QPushButton*) nextButton
{
	return (QPushButton*) [QtSupport objectForQtKey: qt_QWizard_nextButton((qt_QWizard *)[self qt]) withClass: [QPushButton class] allocatedInObjcWorld: YES];
}

- (QPushButton*) finishButton
{
	return (QPushButton*) [QtSupport objectForQtKey: qt_QWizard_finishButton((qt_QWizard *)[self qt]) withClass: [QPushButton class] allocatedInObjcWorld: YES];
}

- (QPushButton*) cancelButton
{
	return (QPushButton*) [QtSupport objectForQtKey: qt_QWizard_cancelButton((qt_QWizard *)[self qt]) withClass: [QPushButton class] allocatedInObjcWorld: YES];
}

- (QPushButton*) helpButton
{
	return (QPushButton*) [QtSupport objectForQtKey: qt_QWizard_helpButton((qt_QWizard *)[self qt]) withClass: [QPushButton class] allocatedInObjcWorld: YES];
}

- (BOOL) eventFilter: (QObject *)arg1 event: (QEvent *)arg2
{
	return (BOOL) qt_QWizard_eventFilter((qt_QWizard *)[self qt], (qt_QObject *) [arg1 qt], (qt_QEvent *) [arg2 qt]);
}

- setBackEnabled: (QWidget *)arg1 bool: (BOOL)arg2
{
	qt_QWizard_setBackEnabled((qt_QWizard *)[self qt], (qt_QWidget *) [arg1 qt], (int)arg2);
	return self;
}

- setNextEnabled: (QWidget *)arg1 bool: (BOOL)arg2
{
	qt_QWizard_setNextEnabled((qt_QWizard *)[self qt], (qt_QWidget *) [arg1 qt], (int)arg2);
	return self;
}

- setFinishEnabled: (QWidget *)arg1 bool: (BOOL)arg2
{
	qt_QWizard_setFinishEnabled((qt_QWizard *)[self qt], (qt_QWidget *) [arg1 qt], (int)arg2);
	return self;
}

- setHelpEnabled: (QWidget *)arg1 bool: (BOOL)arg2
{
	qt_QWizard_setHelpEnabled((qt_QWizard *)[self qt], (qt_QWidget *) [arg1 qt], (int)arg2);
	return self;
}

- setFinish: (QWidget *)arg1 bool: (BOOL)arg2
{
	qt_QWizard_setFinish((qt_QWizard *)[self qt], (qt_QWidget *) [arg1 qt], (int)arg2);
	return self;
}

- layOutButtonRow: (QHBoxLayout*)arg1
{
	qt_QWizard_layOutButtonRow((qt_QWizard *)[self qt], (qt_QHBoxLayout*) [arg1 qt]);
	return self;
}

- layOutTitleRow: (QHBoxLayout*)arg1 string: (NSString *)arg2
{
static qt_QString * _qstring_arg2 = 0L;
	qt_QWizard_layOutTitleRow((qt_QWizard *)[self qt], (qt_QHBoxLayout*) [arg1 qt], (qt_QString *) [arg2 toQString: &_qstring_arg2]);
	return self;
}

- back
{
	qt_QWizard_back((qt_QWizard *)[self qt]);
	return self;
}

- next
{
	qt_QWizard_next((qt_QWizard *)[self qt]);
	return self;
}

- help
{
	qt_QWizard_help((qt_QWizard *)[self qt]);
	return self;
}

@end
