//
// C++ Interface: kmfruleoptioneditiip
//
// Description:
//
//
// Author: Christian Hubinger <chubinger@gmail.com>, (C) 2004
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef KMFRULETARGETOPTIONEDITMARK_H
#define KMFRULETARGETOPTIONEDITMARK_H

#include "../../interfaces/kmfruletargetoptioneditinterface.h"

// KDE includes
#include <kparts/part.h>
#include <kparts/plugin.h>
#include <kparts/factory.h>
#include <kxmlgui.h>


class IPTRule;
class KMFRuleEditTargetMark;
/**
@author Christian Hubinger
*/
class KMFRuleTargetOptionEditMark : public KMFRuleTargetOptionEditInterface {
	Q_OBJECT
public:
	KMFRuleTargetOptionEditMark(QObject *parent = 0, const char *name = 0);

	~KMFRuleTargetOptionEditMark();
	void loadRule( IPTRule* rule );	
	QWidget* editWidget();
	const QString& optionEditName() const;
	const QString& description() const;
	bool setTarget( const QString& );

private slots:
	void slotAddRuleOption(QString*, QPtrList< QString >* );
	void slotAddTargetOption(QString*, QPtrList< QString >* );
	void slotShowOverview();

private:
	KMFRuleEditTargetMark *m_edit;
	IPTRule *m_rule;
	
};

class KInstance;

class KMFRuleTargetOptionEditMarkFactory : public KLibFactory {
	Q_OBJECT
public:
	KMFRuleTargetOptionEditMarkFactory( QObject *parent = 0, const char *name = 0 );
	virtual ~KMFRuleTargetOptionEditMarkFactory() {
/* 		delete s_instance; */
	};
	virtual QObject* createObject( QObject* parent = 0, const char* pname = 0,
	                               const char* name = "QObject",
	                               const QStringList &args = QStringList() );
	/*     static KInstance* instance(); */

/*private:
	static KInstance* s_instance;*/
};









#endif
