/***************************************************************************
                            KFilePropsPlugin.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_KFilePropsPlugin.h>
#include <kdeobjc/KDESupport.h>
#include <kdeobjc/KFilePropsPlugin.h>
#include <kdeobjc/Job.h>
#include <kdeobjc/KPropertiesDialog.h>
#include <kdeobjc/KURL.h>


@implementation  KFilePropsPlugin


- initWithPropertiesDialog: (KPropertiesDialog*)_props
{
	if ([self qt] == 0L) {
		[self setQt: kde_new_KFilePropsPlugin((kde_KPropertiesDialog*) [_props qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- (void) dealloc
{
	if ([self qt] != 0L) {
		if ([self allocatedInObjcWorld] && [self parent] == nil) {
			kde_del_KFilePropsPlugin((kde_KFilePropsPlugin *)[self qt]);
		}
		[QtSupport removeQtKey: [self qt]];
		[self setQt: 0L];
	}
	[super dealloc];
}

- applyChanges
{
	kde_KFilePropsPlugin_applyChanges((kde_KFilePropsPlugin *)[self qt]);
	return self;
}

- postApplyChanges
{
	kde_KFilePropsPlugin_postApplyChanges((kde_KFilePropsPlugin *)[self qt]);
	return self;
}

+ (BOOL) supports: (NSArray *)_items
{
static kde_KFileItemList * _qlist__items = 0L;
	return (BOOL) kde_KFilePropsPlugin_supports((kde_KFileItemList*) [_items toKFileItemList: (void *)&_qlist__items]);
}

- slotCopyFinished: (Job*)arg1
{
	kde_KFilePropsPlugin_slotCopyFinished((kde_KFilePropsPlugin *)[self qt], (kde_Job*) [arg1 qt]);
	return self;
}

- slotFileRenamed: (Job*)arg1 url: (KURL*)arg2 url: (KURL*)arg3
{
	kde_KFilePropsPlugin_slotFileRenamed((kde_KFilePropsPlugin *)[self qt], (kde_Job*) [arg1 qt], (kde_KURL*) [arg2 qt], (kde_KURL*) [arg3 qt]);
	return self;
}

- slotDirSizeFinished: (Job*)arg1
{
	kde_KFilePropsPlugin_slotDirSizeFinished((kde_KFilePropsPlugin *)[self qt], (kde_Job*) [arg1 qt]);
	return self;
}

- slotFoundMountPoint: (NSString *)mp kBSize: (unsigned long)kBSize kBUsed: (unsigned long)kBUsed kBAvail: (unsigned long)kBAvail
{
static qt_QString * _qstring_mp = 0L;
	kde_KFilePropsPlugin_slotFoundMountPoint((kde_KFilePropsPlugin *)[self qt], (qt_QString *) [mp toQString: &_qstring_mp], (unsigned long)kBSize, (unsigned long)kBUsed, (unsigned long)kBAvail);
	return self;
}

- slotSizeStop
{
	kde_KFilePropsPlugin_slotSizeStop((kde_KFilePropsPlugin *)[self qt]);
	return self;
}

- slotSizeDetermine
{
	kde_KFilePropsPlugin_slotSizeDetermine((kde_KFilePropsPlugin *)[self qt]);
	return self;
}

@end
