/* 
 * This file is part of DesktopBSD, see the README file.
 *
 * Author: Peter Hofer <ph@desktopbsd.net>
 *         (C) 2004, 2005
 *
 * Copyright: BSD, see the COPYING file included in this distribution
 *
 */

#include <qlayout.h>

#include <klocale.h>
#include <kglobal.h>
#include <kparts/genericfactory.h>

#include <moddiskpart.h>
#include <dbsdinitglobal.h>

#include "dbsddiskpart.h"

typedef KGenericFactory<DBSDDiskPart, QWidget> DBSDDiskPartFactory;
K_EXPORT_COMPONENT_FACTORY(kcm_DBSDDiskPart, DBSDDiskPartFactory("kcm_dbsddiskpart"))

extern "C"
{
	KCModule *create_dbsddiskpart(QWidget  *parent, const char  *name)
	{
		DBSDGlobalInitializer::initGlobal();
		return  new DBSDDiskPart(parent, name);
	};
}

DBSDDiskPart::DBSDDiskPart(QWidget  *parent, const char  *name,  __unused  const QStringList &  list)
	:	DBSDRootOnlyKCModule((geteuid() == 0) ? (new modDiskPart) : NULL, parent, name, list)
{
}

DBSDDiskPart::~DBSDDiskPart() {
}

QString  DBSDDiskPart::kcmoduleName() {
	return  "dbsddiskpart";
}
