/***************************************************************************
                            QVariant.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_QVariant.h>
#include <qtc/qt_QStringList.h>

#include <qtobjc/QtSupport.h>
#include <qtobjc/QVariant.h>
#include <qtobjc/QBitArray.h>
#include <qtobjc/QByteArray.h>
#include <qtobjc/QKeySequence.h>
#include <qtobjc/QDataStream.h>
#include <qtobjc/QFont.h>
#include <qtobjc/QPixmap.h>
#include <qtobjc/QImage.h>
#include <qtobjc/QBrush.h>
#include <qtobjc/QPoint.h>
#include <qtobjc/QRect.h>
#include <qtobjc/QSize.h>
#include <qtobjc/QColor.h>
#include <qtobjc/QPalette.h>
#include <qtobjc/QColorGroup.h>
#include <qtobjc/QIconSet.h>
#include <qtobjc/QRegion.h>
#include <qtobjc/QBitmap.h>
#include <qtobjc/QCursor.h>
#include <qtobjc/QSizePolicy.h>
#include <qtobjc/QPointArray.h>

@implementation  QVariant

- (void *) qt
{
	return _qt;
}

- setQt: (void *) qt
{
	_qt = qt;
	return self;
}

- (BOOL) allocatedInObjcWorld
{
	return _allocatedInObjcWorld;
}

- setAllocatedInObjcWorld: (BOOL) yn
{
	_allocatedInObjcWorld = yn;
	return self;
}


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

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

- copyWithZone: (NSZone *) zone
{
	QVariant * aCopy;
	aCopy = [[(QVariant *)[[self class] allocWithZone: zone] setQt: qt_new_QVariant1([self qt])] init];
	[aCopy setAllocatedInObjcWorld: YES];
	[QtSupport setObject: aCopy forQtKey: [aCopy qt]];
	return aCopy;
}

- initWithDataStream: (QDataStream *)s
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant2((qt_QDataStream *) [s qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithText: (NSString *)arg1
{
static qt_QString * _qstring_arg1 = 0L;
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant3((qt_QString *) [arg1 toQString: &_qstring_arg1])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

//- initWithText: (NSString *)arg1
//{
//static qt_QCString * _qcstring_arg1 = 0L;
//	if ([self qt] == 0L) {
//		[self setQt: qt_new_QVariant4((qt_QCString*) [arg1 toQCString: &_qcstring_arg1])];
//		[self setAllocatedInObjcWorld: YES];
//		[QtSupport setObject: self forQtKey: [self qt]];
//	}
//	[super init];
//	return self;
//}

//- initWithText: (NSString *)arg1
//{
//	if ([self qt] == 0L) {
//		[self setQt: qt_new_QVariant5((char*) [arg1 cString])];
//		[self setAllocatedInObjcWorld: YES];
//		[QtSupport setObject: self forQtKey: [self qt]];
//	}
//	[super init];
//	return self;
//}

- initWithArray: (NSArray *)arg1
{
static qt_QStringList * _qlist_arg1 = 0L;
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant6((qt_QStringList*) [arg1 toQStringList: (void *)&_qlist_arg1])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithFont: (QFont *)arg1
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant7((qt_QFont *) [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_QVariant8((qt_QPixmap *) [arg1 qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithImage: (QImage *)arg1
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant9((qt_QImage *) [arg1 qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithBrush: (QBrush *)arg1
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant10((qt_QBrush *) [arg1 qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithPoint: (QPoint*)arg1
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant11((qt_QPoint*) [arg1 qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithRect: (QRect*)arg1
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant12((qt_QRect*) [arg1 qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithSize: (QSize *)arg1
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant13((qt_QSize *) [arg1 qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithColor: (QColor *)arg1
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant14((qt_QColor *) [arg1 qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithPalette: (QPalette *)arg1
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant15((qt_QPalette *) [arg1 qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithColorGroup: (QColorGroup *)arg1
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant16((qt_QColorGroup *) [arg1 qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithIconSet: (QIconSet*)arg1
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant17((qt_QIconSet*) [arg1 qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithPointArray: (QPointArray*)arg1
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant18((qt_QPointArray*) [arg1 qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithRegion: (QRegion *)arg1
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant19((qt_QRegion *) [arg1 qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithBitmap: (QBitmap *)arg1
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant20((qt_QBitmap *) [arg1 qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithCursor: (QCursor *)arg1
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant21((qt_QCursor *) [arg1 qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithDate: (NSDate *)arg1
{
static qt_QDate * _qdate_arg1 = 0L;
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant22((qt_QDate *) [arg1 toQDate: (qt_QDate **)&_qdate_arg1])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

//- initWithDate: (NSDate *)arg1
//{
//static qt_QTime * _qdate_arg1 = 0L;
//	if ([self qt] == 0L) {
//		[self setQt: qt_new_QVariant23((qt_QTime *) [arg1 toQTime: (qt_QTime **)&_qdate_arg1])];
//		[self setAllocatedInObjcWorld: YES];
//		[QtSupport setObject: self forQtKey: [self qt]];
//	}
//	[super init];
//	return self;
//}

//- initWithDate: (NSDate *)arg1
//{
//static qt_QDateTime * _qdate_arg1 = 0L;
//	if ([self qt] == 0L) {
//		[self setQt: qt_new_QVariant24((qt_QDateTime *) [arg1 toQDateTime: (qt_QDateTime **)&_qdate_arg1])];
//		[self setAllocatedInObjcWorld: YES];
//		[QtSupport setObject: self forQtKey: [self qt]];
//	}
//	[super init];
//	return self;
//}

- initWithByteArray: (QByteArray*)arg1
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant25((qt_QByteArray*) [arg1 qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithBitArray: (QBitArray*)arg1
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant26((qt_QBitArray*) [arg1 qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithKeySequence: (QKeySequence*)arg1
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant27((qt_QKeySequence*) [arg1 qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

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

- initWithUnsigned: (unsigned int)arg1
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant31((unsigned int)arg1)];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithBOOL: (BOOL)arg1 int: (int)arg2
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant32((int)arg1, (int)arg2)];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

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

- initWithSizePolicy: (QSizePolicy*)arg1
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QVariant34((qt_QSizePolicy*) [arg1 qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- (int) type
{
	return (int) qt_QVariant_type((qt_QVariant *)[self qt]);
}

- (NSString *) typeName
{
	return (NSString *) [NSString stringWithCString: qt_QVariant_typeName((qt_QVariant *)[self qt])];
}

- (BOOL) canCast: (int)arg1
{
	return (BOOL) qt_QVariant_canCast((qt_QVariant *)[self qt], (int)arg1);
}

- (BOOL) cast: (int)arg1
{
	return (BOOL) qt_QVariant_cast((qt_QVariant *)[self qt], (int)arg1);
}

- (BOOL) isValid
{
	return (BOOL) qt_QVariant_isValid((qt_QVariant *)[self qt]);
}

- clear
{
	qt_QVariant_clear((qt_QVariant *)[self qt]);
	return self;
}

- (NSString *) toString
{
static qt_QString * _qstring = 0L;
	_qstring = qt_QVariant_toString((qt_QVariant *)[self qt]);
	return [NSString fromQString: _qstring];
}

- (NSString *) toCString
{
static qt_QCString * _qcstring = 0L;
	_qcstring = qt_QVariant_toCString((qt_QVariant *)[self qt]);
	return [NSString fromQCString: _qcstring];
}

- (NSArray *) toStringList
{
static qt_QStringList * _qlist = 0L;
	_qlist = qt_QVariant_toStringList((qt_QVariant *)[self qt]);
	return (NSArray *) [NSMutableArray arrayWithQStringList: _qlist];
}

- (QFont*) toFont
{
	return (QFont*) [QtSupport objectForQtKey: qt_QVariant_toFont((qt_QVariant *)[self qt]) withClass: [QFont class] allocatedInObjcWorld: YES];
}

- (QPixmap*) toPixmap
{
	return (QPixmap*) [QtSupport objectForQtKey: qt_QVariant_toPixmap((qt_QVariant *)[self qt]) withClass: [QPixmap class] allocatedInObjcWorld: YES];
}

- (QImage*) toImage
{
	return (QImage*) [QtSupport objectForQtKey: qt_QVariant_toImage((qt_QVariant *)[self qt]) withClass: [QImage class] allocatedInObjcWorld: YES];
}

- (QBrush*) toBrush
{
	return (QBrush*) [QtSupport objectForQtKey: qt_QVariant_toBrush((qt_QVariant *)[self qt]) withClass: [QBrush class] allocatedInObjcWorld: YES];
}

- (QPoint*) toPoint
{
	return (QPoint*) [QtSupport objectForQtKey: qt_QVariant_toPoint((qt_QVariant *)[self qt]) withClass: [QPoint class] allocatedInObjcWorld: YES];
}

- (QRect*) toRect
{
	return (QRect*) [QtSupport objectForQtKey: qt_QVariant_toRect((qt_QVariant *)[self qt]) withClass: [QRect class] allocatedInObjcWorld: YES];
}

- (QSize*) toSize
{
	return (QSize*) [QtSupport objectForQtKey: qt_QVariant_toSize((qt_QVariant *)[self qt]) withClass: [QSize class] allocatedInObjcWorld: YES];
}

- (QColor*) toColor
{
	return (QColor*) [QtSupport objectForQtKey: qt_QVariant_toColor((qt_QVariant *)[self qt]) withClass: [QColor class] allocatedInObjcWorld: YES];
}

- (QPalette*) toPalette
{
	return (QPalette*) [QtSupport objectForQtKey: qt_QVariant_toPalette((qt_QVariant *)[self qt]) withClass: [QPalette class] allocatedInObjcWorld: YES];
}

- (QColorGroup*) toColorGroup
{
	return (QColorGroup*) [QtSupport objectForQtKey: qt_QVariant_toColorGroup((qt_QVariant *)[self qt]) withClass: [QColorGroup class] allocatedInObjcWorld: YES];
}

- (QIconSet*) toIconSet
{
	return (QIconSet*) [QtSupport objectForQtKey: qt_QVariant_toIconSet((qt_QVariant *)[self qt]) withClass: [QIconSet class] allocatedInObjcWorld: YES];
}

- (QPointArray*) toPointArray
{
	return (QPointArray*) [QtSupport objectForQtKey: qt_QVariant_toPointArray((qt_QVariant *)[self qt]) withClass: [QPointArray class] allocatedInObjcWorld: YES];
}

- (QBitmap*) toBitmap
{
	return (QBitmap*) [QtSupport objectForQtKey: qt_QVariant_toBitmap((qt_QVariant *)[self qt]) withClass: [QBitmap class] allocatedInObjcWorld: YES];
}

- (QRegion*) toRegion
{
	return (QRegion*) [QtSupport objectForQtKey: qt_QVariant_toRegion((qt_QVariant *)[self qt]) withClass: [QRegion class] allocatedInObjcWorld: YES];
}

- (QCursor*) toCursor
{
	return (QCursor*) [QtSupport objectForQtKey: qt_QVariant_toCursor((qt_QVariant *)[self qt]) withClass: [QCursor class] allocatedInObjcWorld: YES];
}

- (NSDate *) toDate
{
static qt_QDate * _qdate = 0L;
	_qdate = qt_QVariant_toDate((qt_QVariant *)[self qt]);
	return (NSDate *) [[NSDate alloc] initWithQDate: _qdate];
}

- (NSDate *) toTime
{
static qt_QTime * _qdate = 0L;
	_qdate = qt_QVariant_toTime((qt_QVariant *)[self qt]);
	return (NSDate *) [[NSDate alloc] initWithQTime: _qdate];
}

- (NSDate *) toDateTime
{
static qt_QDateTime * _qdate = 0L;
	_qdate = qt_QVariant_toDateTime((qt_QVariant *)[self qt]);
	return (NSDate *) [[NSDate alloc] initWithQDateTime: _qdate];
}

- (QByteArray*) toByteArray
{
	return (QByteArray*) [QtSupport objectForQtKey: qt_QVariant_toByteArray((qt_QVariant *)[self qt]) withClass: [QByteArray class] allocatedInObjcWorld: YES];
}

- (QBitArray*) toBitArray
{
	return (QBitArray*) [QtSupport objectForQtKey: qt_QVariant_toBitArray((qt_QVariant *)[self qt]) withClass: [QBitArray class] allocatedInObjcWorld: YES];
}

- (QKeySequence*) toKeySequence
{
	return (QKeySequence*) [QtSupport objectForQtKey: qt_QVariant_toKeySequence((qt_QVariant *)[self qt]) withClass: [QKeySequence class] allocatedInObjcWorld: YES];
}

- (int) toInt: (int*)ok
{
	return (int) qt_QVariant_toInt((qt_QVariant *)[self qt], (int*)ok);
}

- (int) toInt
{
	return (int) qt_QVariant_toInt((qt_QVariant *)[self qt], 0);
}

- (unsigned int) toUInt: (int*)ok
{
	return (unsigned int) qt_QVariant_toUInt((qt_QVariant *)[self qt], (int*)ok);
}

- (unsigned int) toUInt
{
	return (unsigned int) qt_QVariant_toUInt((qt_QVariant *)[self qt], 0);
}

- (BOOL) toBool
{
	return (BOOL) qt_QVariant_toBool((qt_QVariant *)[self qt]);
}

- (double) toDouble: (int*)ok
{
	return (double) qt_QVariant_toDouble((qt_QVariant *)[self qt], (int*)ok);
}

- (double) toDouble
{
	return (double) qt_QVariant_toDouble((qt_QVariant *)[self qt], 0);
}

- (QSizePolicy*) toSizePolicy
{
	return (QSizePolicy*) [QtSupport objectForQtKey: qt_QVariant_toSizePolicy((qt_QVariant *)[self qt]) withClass: [QSizePolicy class] allocatedInObjcWorld: YES];
}

- (NSString *) asString
{
static qt_QString * _qstring = 0L;
	_qstring = qt_QVariant_asString((qt_QVariant *)[self qt]);
	return [NSString fromQString: _qstring];
}

- (NSString *) asCString
{
static qt_QCString * _qcstring = 0L;
	_qcstring = qt_QVariant_asCString((qt_QVariant *)[self qt]);
	return [NSString fromQCString: _qcstring];
}

- (NSArray *) asStringList
{
static qt_QStringList * _qlist = 0L;
	_qlist = qt_QVariant_asStringList((qt_QVariant *)[self qt]);
	return (NSArray *) [NSMutableArray arrayWithQStringList: _qlist];
}

- (QFont*) asFont
{
	return (QFont*) [QtSupport objectForQtKey: qt_QVariant_asFont((qt_QVariant *)[self qt]) withClass: [QFont class] allocatedInObjcWorld: YES];
}

- (QPixmap*) asPixmap
{
	return (QPixmap*) [QtSupport objectForQtKey: qt_QVariant_asPixmap((qt_QVariant *)[self qt]) withClass: [QPixmap class] allocatedInObjcWorld: YES];
}

- (QImage*) asImage
{
	return (QImage*) [QtSupport objectForQtKey: qt_QVariant_asImage((qt_QVariant *)[self qt]) withClass: [QImage class] allocatedInObjcWorld: YES];
}

- (QBrush*) asBrush
{
	return (QBrush*) [QtSupport objectForQtKey: qt_QVariant_asBrush((qt_QVariant *)[self qt]) withClass: [QBrush class] allocatedInObjcWorld: YES];
}

- (QPoint*) asPoint
{
	return (QPoint*) [QtSupport objectForQtKey: qt_QVariant_asPoint((qt_QVariant *)[self qt]) withClass: [QPoint class] allocatedInObjcWorld: YES];
}

- (QRect*) asRect
{
	return (QRect*) [QtSupport objectForQtKey: qt_QVariant_asRect((qt_QVariant *)[self qt]) withClass: [QRect class] allocatedInObjcWorld: YES];
}

- (QSize*) asSize
{
	return (QSize*) [QtSupport objectForQtKey: qt_QVariant_asSize((qt_QVariant *)[self qt]) withClass: [QSize class] allocatedInObjcWorld: YES];
}

- (QColor*) asColor
{
	return (QColor*) [QtSupport objectForQtKey: qt_QVariant_asColor((qt_QVariant *)[self qt]) withClass: [QColor class] allocatedInObjcWorld: YES];
}

- (QPalette*) asPalette
{
	return (QPalette*) [QtSupport objectForQtKey: qt_QVariant_asPalette((qt_QVariant *)[self qt]) withClass: [QPalette class] allocatedInObjcWorld: YES];
}

- (QColorGroup*) asColorGroup
{
	return (QColorGroup*) [QtSupport objectForQtKey: qt_QVariant_asColorGroup((qt_QVariant *)[self qt]) withClass: [QColorGroup class] allocatedInObjcWorld: YES];
}

- (QIconSet*) asIconSet
{
	return (QIconSet*) [QtSupport objectForQtKey: qt_QVariant_asIconSet((qt_QVariant *)[self qt]) withClass: [QIconSet class] allocatedInObjcWorld: YES];
}

- (QPointArray*) asPointArray
{
	return (QPointArray*) [QtSupport objectForQtKey: qt_QVariant_asPointArray((qt_QVariant *)[self qt]) withClass: [QPointArray class] allocatedInObjcWorld: YES];
}

- (QBitmap*) asBitmap
{
	return (QBitmap*) [QtSupport objectForQtKey: qt_QVariant_asBitmap((qt_QVariant *)[self qt]) withClass: [QBitmap class] allocatedInObjcWorld: YES];
}

- (QRegion*) asRegion
{
	return (QRegion*) [QtSupport objectForQtKey: qt_QVariant_asRegion((qt_QVariant *)[self qt]) withClass: [QRegion class] allocatedInObjcWorld: YES];
}

- (QCursor*) asCursor
{
	return (QCursor*) [QtSupport objectForQtKey: qt_QVariant_asCursor((qt_QVariant *)[self qt]) withClass: [QCursor class] allocatedInObjcWorld: YES];
}

- (NSDate *) asDate
{
static qt_QDate * _qdate = 0L;
	_qdate = qt_QVariant_asDate((qt_QVariant *)[self qt]);
	return (NSDate *) [[NSDate alloc] initWithQDate: _qdate];
}

- (NSDate *) asTime
{
static qt_QTime * _qdate = 0L;
	_qdate = qt_QVariant_asTime((qt_QVariant *)[self qt]);
	return (NSDate *) [[NSDate alloc] initWithQTime: _qdate];
}

- (NSDate *) asDateTime
{
static qt_QDateTime * _qdate = 0L;
	_qdate = qt_QVariant_asDateTime((qt_QVariant *)[self qt]);
	return (NSDate *) [[NSDate alloc] initWithQDateTime: _qdate];
}

- (QByteArray*) asByteArray
{
	return (QByteArray*) [QtSupport objectForQtKey: qt_QVariant_asByteArray((qt_QVariant *)[self qt]) withClass: [QByteArray class] allocatedInObjcWorld: YES];
}

- (QBitArray*) asBitArray
{
	return (QBitArray*) [QtSupport objectForQtKey: qt_QVariant_asBitArray((qt_QVariant *)[self qt]) withClass: [QBitArray class] allocatedInObjcWorld: YES];
}

- (QKeySequence*) asKeySequence
{
	return (QKeySequence*) [QtSupport objectForQtKey: qt_QVariant_asKeySequence((qt_QVariant *)[self qt]) withClass: [QKeySequence class] allocatedInObjcWorld: YES];
}

- (int) asInt
{
	return (int) qt_QVariant_asInt((qt_QVariant *)[self qt]);
}

- (unsigned int) asUInt
{
	return (unsigned int) qt_QVariant_asUInt((qt_QVariant *)[self qt]);
}

- (BOOL) asBool
{
	return (BOOL) qt_QVariant_asBool((qt_QVariant *)[self qt]);
}

- (double) asDouble
{
	return (double) qt_QVariant_asDouble((qt_QVariant *)[self qt]);
}

- (QSizePolicy*) asSizePolicy
{
	return (QSizePolicy*) [QtSupport objectForQtKey: qt_QVariant_asSizePolicy((qt_QVariant *)[self qt]) withClass: [QSizePolicy class] allocatedInObjcWorld: YES];
}

- load: (QDataStream *)arg1
{
	qt_QVariant_load((qt_QVariant *)[self qt], (qt_QDataStream *) [arg1 qt]);
	return self;
}

- save: (QDataStream *)arg1
{
	qt_QVariant_save((qt_QVariant *)[self qt], (qt_QDataStream *) [arg1 qt]);
	return self;
}

+ (NSString *) typeToName: (int)typ
{
	return (NSString *) [NSString stringWithCString: qt_QVariant_typeToName((int)typ)];
}

+ (int) nameToType: (NSString *)name
{
	return (int) qt_QVariant_nameToType((char*) [name cString]);
}

+ (int) Invalid
{
	return (int) QVARIANT_Invalid;
}

+ (int) Map
{
	return (int) QVARIANT_Map;
}

+ (int) List
{
	return (int) QVARIANT_List;
}

+ (int) String
{
	return (int) QVARIANT_String;
}

+ (int) StringList
{
	return (int) QVARIANT_StringList;
}

+ (int) Font
{
	return (int) QVARIANT_Font;
}

+ (int) Pixmap
{
	return (int) QVARIANT_Pixmap;
}

+ (int) Brush
{
	return (int) QVARIANT_Brush;
}

+ (int) Rect
{
	return (int) QVARIANT_Rect;
}

+ (int) Size
{
	return (int) QVARIANT_Size;
}

+ (int) Color
{
	return (int) QVARIANT_Color;
}

+ (int) Palette
{
	return (int) QVARIANT_Palette;
}

+ (int) ColorGroup
{
	return (int) QVARIANT_ColorGroup;
}

+ (int) IconSet
{
	return (int) QVARIANT_IconSet;
}

+ (int) Point
{
	return (int) QVARIANT_Point;
}

+ (int) Image
{
	return (int) QVARIANT_Image;
}

+ (int) Int
{
	return (int) QVARIANT_Int;
}

+ (int) UInt
{
	return (int) QVARIANT_UInt;
}

+ (int) Bool
{
	return (int) QVARIANT_Bool;
}

+ (int) Double
{
	return (int) QVARIANT_Double;
}

+ (int) CString
{
	return (int) QVARIANT_CString;
}

+ (int) PointArray
{
	return (int) QVARIANT_PointArray;
}

+ (int) Region
{
	return (int) QVARIANT_Region;
}

+ (int) Bitmap
{
	return (int) QVARIANT_Bitmap;
}

+ (int) Cursor
{
	return (int) QVARIANT_Cursor;
}

+ (int) SizePolicy
{
	return (int) QVARIANT_SizePolicy;
}

+ (int) Date
{
	return (int) QVARIANT_Date;
}

+ (int) Time
{
	return (int) QVARIANT_Time;
}

+ (int) DateTime
{
	return (int) QVARIANT_DateTime;
}

+ (int) ByteArray
{
	return (int) QVARIANT_ByteArray;
}

+ (int) BitArray
{
	return (int) QVARIANT_BitArray;
}

+ (int) KeySequence
{
	return (int) QVARIANT_KeySequence;
}

@end
