/* 
 * 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
 *
 */

#ifndef __DBSDKCMODULE_H
#define __DBSDKCMODULE_H

#include <kcmodule.h>

#include <qapplication.h>
#include <qtranslator.h>

class QLayout;
class	DBSDModule;
class LoadingError;

/** 
 * @brief A KCModule wrapper for DBSDModules.
 *
 * This class displays a given DBSDModule or an error
 * message when the DBSDModule pointer in the constructor is NULL.
 */
 
class  DBSDKCModule : public KCModule {
	Q_OBJECT

public:
	DBSDKCModule(DBSDModule * = NULL, QWidget * = NULL,  const char * = NULL,  const QStringList & = QStringList());
	~DBSDKCModule();
	
	void	load();
	void	defaults();
	void	save();

private slots:
	void	dbsdChanged(bool);

protected:
	DBSDKCModule(QWidget * = NULL,  const char * = NULL,  const QStringList & = QStringList());

	QLayout			*layout;
	DBSDModule		*module;
	LoadingError	*loadingError;
};

#endif /* __DBSDKCMODULE_H */
