/*
 * This file is part of DesktopBSD, see the README file.
 *
 * Author: Pieringer Johannes <jpieringer@desktopbsd.net>
 *         (C) 2006
 *
 * Copyright: BSD, see the COPYING file included in this distribution
 *
 */

#include <qlayout.h>

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

#include <modgrubconf.h>
#include <dbsdinitglobal.h>

#include "dbsdgrubconf.h"

typedef KGenericFactory<DBSDGrubConf, QWidget> DBSDGrubConfFactory;
K_EXPORT_COMPONENT_FACTORY(kcm_DBSDGrubConf, DBSDGrubConfFactory("kcm_dbsdgrubconf"))

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

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

/** The module is deleted automatically here,
 * no need to do this in inherited classes.
 */
DBSDGrubConf::~DBSDGrubConf() {

}

QString  DBSDGrubConf::kcmoduleName() {
	return  "dbsdgrubconf";
}
