/***************************************************************************
 *   Copyright (C) 2005 by xavier helluy                                   *
 *   xavier.helluy@web.de                                                  *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA.             *
 ***************************************************************************/

#ifndef INDEXESMANAGERWIDGET_H
#define INDEXESMANAGERWIDGET_H

#include "indexesmanagerwidget_base.h"

#include "settings.h"
#include <qmap.h>
#include <kconfigdialog.h>


class IndexesManagerWidget : public IndexManagerWidgetBase
{
  Q_OBJECT

	public:
		IndexesManagerWidget(
				KDialogBase * , Settings *, 
				QMap< QString ,QString >*,
			        QWidget* parent = 0, 
				const char* name = 0, WFlags fl = 0 );
		
		  ~IndexesManagerWidget();
  
  	bool wakeDCOP();

	public slots:
		//deletes an index and its config without WARNING
		void slotEraser();
		
		void updateEntriesInWidget(const QString & indexGroup);
		void slotNewIndex(const QString & newName);
		void someIndexSelected(const QString & indexName);
		//not implemented
		void slotMerge();
		//TODO: only the dcop interface is implemented, 
		void slotDeleteHits();

	signals:
		void indexRemoved(const QString &);	
	
	private:
		//pointer to cluceneindexsettingsrc config kconfigskeleton
		Settings *m_settings;
		KDialogBase *  m_dialog;
		//map of stored index names and corresponding path to the index database
		QMap<QString , QString > * m_indexMap;
};

#endif

