/***************************************************************************
                            KCursor.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_KCursor.h>
#include <kdeobjc/KDESupport.h>
#include <kdeobjc/KCursor.h>
#include <qtobjc/QEvent.h>
#include <qtobjc/QObject.h>
#include <qtobjc/QWidget.h>


@implementation  KCursor


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

+ (QCursor*) handCursor
{
	return (QCursor*) [QtSupport objectForQtKey: kde_KCursor_handCursor() withClass: [QCursor class] allocatedInObjcWorld: YES];
}

+ (QCursor*) workingCursor
{
	return (QCursor*) [QtSupport objectForQtKey: kde_KCursor_workingCursor() withClass: [QCursor class] allocatedInObjcWorld: YES];
}

+ (QCursor*) arrowCursor
{
	return (QCursor*) [QtSupport objectForQtKey: kde_KCursor_arrowCursor() withClass: [QCursor class] allocatedInObjcWorld: YES];
}

+ (QCursor*) upArrowCursor
{
	return (QCursor*) [QtSupport objectForQtKey: kde_KCursor_upArrowCursor() withClass: [QCursor class] allocatedInObjcWorld: YES];
}

+ (QCursor*) crossCursor
{
	return (QCursor*) [QtSupport objectForQtKey: kde_KCursor_crossCursor() withClass: [QCursor class] allocatedInObjcWorld: YES];
}

+ (QCursor*) waitCursor
{
	return (QCursor*) [QtSupport objectForQtKey: kde_KCursor_waitCursor() withClass: [QCursor class] allocatedInObjcWorld: YES];
}

+ (QCursor*) ibeamCursor
{
	return (QCursor*) [QtSupport objectForQtKey: kde_KCursor_ibeamCursor() withClass: [QCursor class] allocatedInObjcWorld: YES];
}

+ (QCursor*) sizeVerCursor
{
	return (QCursor*) [QtSupport objectForQtKey: kde_KCursor_sizeVerCursor() withClass: [QCursor class] allocatedInObjcWorld: YES];
}

+ (QCursor*) sizeHorCursor
{
	return (QCursor*) [QtSupport objectForQtKey: kde_KCursor_sizeHorCursor() withClass: [QCursor class] allocatedInObjcWorld: YES];
}

+ (QCursor*) sizeBDiagCursor
{
	return (QCursor*) [QtSupport objectForQtKey: kde_KCursor_sizeBDiagCursor() withClass: [QCursor class] allocatedInObjcWorld: YES];
}

+ (QCursor*) sizeFDiagCursor
{
	return (QCursor*) [QtSupport objectForQtKey: kde_KCursor_sizeFDiagCursor() withClass: [QCursor class] allocatedInObjcWorld: YES];
}

+ (QCursor*) sizeAllCursor
{
	return (QCursor*) [QtSupport objectForQtKey: kde_KCursor_sizeAllCursor() withClass: [QCursor class] allocatedInObjcWorld: YES];
}

+ (QCursor*) blankCursor
{
	return (QCursor*) [QtSupport objectForQtKey: kde_KCursor_blankCursor() withClass: [QCursor class] allocatedInObjcWorld: YES];
}

+ (QCursor*) whatsThisCursor
{
	return (QCursor*) [QtSupport objectForQtKey: kde_KCursor_whatsThisCursor() withClass: [QCursor class] allocatedInObjcWorld: YES];
}

+ setAutoHideCursor: (QWidget *)w enable: (BOOL)enable
{
	kde_KCursor_setAutoHideCursor((qt_QWidget *) [w qt], (int)enable);
	return self;
}

+ setAutoHideCursor: (QWidget *)w enable: (BOOL)enable customEventFilter: (BOOL)customEventFilter
{
	kde_KCursor_setAutoHideCursor1((qt_QWidget *) [w qt], (int)enable, (int)customEventFilter);
	return self;
}

+ setHideCursorDelay: (int)ms
{
	kde_KCursor_setHideCursorDelay((int)ms);
	return self;
}

+ (int) hideCursorDelay
{
	return (int) kde_KCursor_hideCursorDelay();
}

+ autoHideEventFilter: (QObject *)arg1 event: (QEvent *)arg2
{
	kde_KCursor_autoHideEventFilter((qt_QObject *) [arg1 qt], (qt_QEvent *) [arg2 qt]);
	return self;
}

@end
