/***************************************************************************
                            QWheelEvent.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_QWheelEvent.h>
#include <qtobjc/QWheelEvent.h>
#include <qtobjc/QPoint.h>

@implementation  QWheelEvent


- initWithPoint: (QPoint*)pos delta: (int)delta state: (int)state orient: (int)orient
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QWheelEvent((qt_QPoint*) [pos qt], (int)delta, (int)state, (int)orient)];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithPoint: (QPoint*)pos delta: (int)delta state: (int)state 
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QWheelEvent((qt_QPoint*) [pos qt], (int)delta, (int)state, [QWheelEvent Vertical])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithPoint: (QPoint*)pos globalPos: (QPoint*)globalPos delta: (int)delta state: (int)state orient: (int)orient
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QWheelEvent1((qt_QPoint*) [pos qt], (qt_QPoint*) [globalPos qt], (int)delta, (int)state, (int)orient)];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithPoint: (QPoint*)pos globalPos: (QPoint*)globalPos delta: (int)delta state: (int)state 
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QWheelEvent1((qt_QPoint*) [pos qt], (qt_QPoint*) [globalPos qt], (int)delta, (int)state, [QWheelEvent Vertical])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- (int) delta
{
	return (int) qt_QWheelEvent_delta((qt_QWheelEvent *)[self qt]);
}

- (QPoint*) pos
{
	return (QPoint*) [QtSupport objectForQtKey: qt_QWheelEvent_pos((qt_QWheelEvent *)[self qt]) withClass: [QPoint class] allocatedInObjcWorld: YES];
}

- (QPoint*) globalPos
{
	return (QPoint*) [QtSupport objectForQtKey: qt_QWheelEvent_globalPos((qt_QWheelEvent *)[self qt]) withClass: [QPoint class] allocatedInObjcWorld: YES];
}

- (int) x
{
	return (int) qt_QWheelEvent_x((qt_QWheelEvent *)[self qt]);
}

- (int) y
{
	return (int) qt_QWheelEvent_y((qt_QWheelEvent *)[self qt]);
}

- (int) globalX
{
	return (int) qt_QWheelEvent_globalX((qt_QWheelEvent *)[self qt]);
}

- (int) globalY
{
	return (int) qt_QWheelEvent_globalY((qt_QWheelEvent *)[self qt]);
}

- (int) state
{
	return (int) qt_QWheelEvent_state((qt_QWheelEvent *)[self qt]);
}

- (int) orientation
{
	return (int) qt_QWheelEvent_orientation((qt_QWheelEvent *)[self qt]);
}

- (BOOL) isAccepted
{
	return (BOOL) qt_QWheelEvent_isAccepted((qt_QWheelEvent *)[self qt]);
}

- accept
{
	qt_QWheelEvent_accept((qt_QWheelEvent *)[self qt]);
	return self;
}

- ignore
{
	qt_QWheelEvent_ignore((qt_QWheelEvent *)[self qt]);
	return self;
}

@end
