/***************************************************************************
                            KFontDialog.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_QStringList.h>
#include <qtc/qt_QCString.h>
#include <kdec/kde_KFontDialog.h>
#include <kdeobjc/KDESupport.h>
#include <kdeobjc/KFontDialog.h>
#include <qtobjc/QFont.h>


@implementation  KFontDialog


//- initWithWidget: (QWidget *)parent name: (NSString *)name onlyFixed: (BOOL)onlyFixed modal: (BOOL)modal fontlist: (NSArray *)fontlist makeFrame: (BOOL)makeFrame diff: (BOOL)diff sizeIsRelativeState: (int*)sizeIsRelativeState
//{
//static qt_QStringList * _qlist_fontlist = 0L;
//	if ([self qt] == 0L) {
//		[self setQt: kde_new_KFontDialog((qt_QWidget *) [parent qt], (char*) [name cString], (int)onlyFixed, (int)modal, (qt_QStringList*) [fontlist toQStringList: (void *)&_qlist_fontlist], (int)makeFrame, (int)diff, (int*)sizeIsRelativeState)];
//		[self setAllocatedInObjcWorld: YES];
//		[QtSupport setObject: self forQtKey: [self qt]];
//	}
//	[super init];
//	return self;
//}

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

- setFont: (QFont *)font onlyFixed: (BOOL)onlyFixed
{
	kde_KFontDialog_setFont((kde_KFontDialog *)[self qt], (qt_QFont *) [font qt], (int)onlyFixed);
	return self;
}

- setFont: (QFont *)font 
{
	kde_KFontDialog_setFont((kde_KFontDialog *)[self qt], (qt_QFont *) [font qt], 0);
	return self;
}

- (QFont*) font
{
	return (QFont*) [QtSupport objectForQtKey: kde_KFontDialog_font((kde_KFontDialog *)[self qt]) withClass: [QFont class] allocatedInObjcWorld: YES];
}

//- setSizeIsRelative: (int)relative
//{
//	kde_KFontDialog_setSizeIsRelative((kde_KFontDialog *)[self qt], (int)relative);
//	return self;
//}

- (int) sizeIsRelative
{
	return (int) kde_KFontDialog_sizeIsRelative((kde_KFontDialog *)[self qt]);
}

//- setCharset: (NSString *)charset
//{
//static qt_QString * _qstring_charset = 0L;
//	kde_KFontDialog_setCharset((kde_KFontDialog *)[self qt], (qt_QString *) [charset toQString: &_qstring_charset]);
//	return self;
//}

//- (NSString *) charset
//{
//static qt_QString * _qstring = 0L;
//	_qstring = kde_KFontDialog_charset((kde_KFontDialog *)[self qt]);
//	return [NSString fromQString: _qstring];
//}

//+ (int) getFont: (QFont *)theFont onlyFixed: (BOOL)onlyFixed parent: (QWidget *)parent makeFrame: (BOOL)makeFrame sizeIsRelativeState: (int*)sizeIsRelativeState
//{
//	return (int) kde_KFontDialog_getFont((qt_QFont *) [theFont qt], (int)onlyFixed, (qt_QWidget *) [parent qt], (int)makeFrame, (int*)sizeIsRelativeState);
//}

//+ (int) getFont: (QFont *)theFont
//{
//	return (int) kde_KFontDialog_getFont((qt_QFont *) [theFont qt], 0, 0L, 1, 0L);
//}

//+ (int) getFontDiff: (QFont *)theFont diffFlags: (int)diffFlags onlyFixed: (BOOL)onlyFixed parent: (QWidget *)parent makeFrame: (BOOL)makeFrame sizeIsRelativeState: (int*)sizeIsRelativeState
//{
//	return (int) kde_KFontDialog_getFontDiff((qt_QFont *) [theFont qt], (int)diffFlags, (int)onlyFixed, (qt_QWidget *) [parent qt], (int)makeFrame, (int*)sizeIsRelativeState);
//}

//+ (int) getFontDiff: (QFont *)theFont diffFlags: (int)diffFlags
//{
//	return (int) kde_KFontDialog_getFontDiff((qt_QFont *) [theFont qt], (int)diffFlags, 0, 0L, 1, 0L);
//}

//+ (int) getFontAndText: (QFont *)theFont theString: (NSString *)theString onlyFixed: (BOOL)onlyFixed parent: (QWidget *)parent makeFrame: (BOOL)makeFrame sizeIsRelativeState: (int*)sizeIsRelativeState
//{
//static qt_QString * _qstring_theString = 0L;
//	return (int) kde_KFontDialog_getFontAndText((qt_QFont *) [theFont qt], (qt_QString *) [theString toQString: &_qstring_theString], (int)onlyFixed, (qt_QWidget *) [parent qt], (int)makeFrame, (int*)sizeIsRelativeState);
//}

//+ (int) getFontAndText: (QFont *)theFont theString: (NSString *)theString
//{
//static qt_QString * _qstring_theString = 0L;
//	return (int) kde_KFontDialog_getFontAndText((qt_QFont *) [theFont qt], (qt_QString *) [theString toQString: &_qstring_theString], 0, 0L, 1, 0L);
//}

@end
