/***************************************************************************
                            KFileTreeViewItem.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_KFileTreeViewItem.h>
#include <kdeobjc/KDESupport.h>
#include <kdeobjc/KFileTreeViewItem.h>
#include <kdeobjc/KFileItem.h>
#include <kdeobjc/KFileTreeBranch.h>
#include <kdeobjc/KFileTreeView.h>


@implementation  KFileTreeViewItem


- initWithFileTreeViewItem: (KFileTreeViewItem*)arg1 fileitem: (KFileItem*)arg2 filetreebranch: (KFileTreeBranch*)arg3
{
	if ([self qt] == 0L) {
		[self setQt: kde_new_KFileTreeViewItem((kde_KFileTreeViewItem*) [arg1 qt], (kde_KFileItem*) [arg2 qt], (kde_KFileTreeBranch*) [arg3 qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- initWithFileTreeView: (KFileTreeView*)arg1 fileitem: (KFileItem*)arg2 filetreebranch: (KFileTreeBranch*)arg3
{
	if ([self qt] == 0L) {
		[self setQt: kde_new_KFileTreeViewItem1((kde_KFileTreeView*) [arg1 qt], (kde_KFileItem*) [arg2 qt], (kde_KFileTreeBranch*) [arg3 qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- (KFileTreeBranch*) branch
{
	return (KFileTreeBranch*) [QtSupport objectForQtKey: kde_KFileTreeViewItem_branch((kde_KFileTreeViewItem *)[self qt]) withClass: [KFileTreeBranch class] allocatedInObjcWorld: YES];
}

- (KFileItem*) fileItem
{
	return (KFileItem*) [QtSupport objectForQtKey: kde_KFileTreeViewItem_fileItem((kde_KFileTreeViewItem *)[self qt]) withClass: [KFileItem class] allocatedInObjcWorld: YES];
}

- (NSString *) path
{
static qt_QString * _qstring = 0L;
	_qstring = kde_KFileTreeViewItem_path((kde_KFileTreeViewItem *)[self qt]);
	return [NSString fromQString: _qstring];
}

- (KURL*) url
{
	return (KURL*) [QtSupport objectForQtKey: kde_KFileTreeViewItem_url((kde_KFileTreeViewItem *)[self qt]) withClass: [KURL class] allocatedInObjcWorld: YES];
}

- (BOOL) isDir
{
	return (BOOL) kde_KFileTreeViewItem_isDir((kde_KFileTreeViewItem *)[self qt]);
}

//- middleButtonPressed
//{
//	kde_KFileTreeViewItem_middleButtonPressed((kde_KFileTreeViewItem *)[self qt]);
//	return self;
//}

//- rightButtonPressed
//{
//	kde_KFileTreeViewItem_rightButtonPressed((kde_KFileTreeViewItem *)[self qt]);
//	return self;
//}

@end
