/***************************************************************************
 *   Copyright (C) 2008 by Andreas Silberstorff   *
 *   taki@Rivendell   *
 *                                                                         *
 *   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.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#ifndef KALVACHANNELLISTPROVIDERSCHEDULER_H
#define KALVACHANNELLISTPROVIDERSCHEDULER_H

#include <PluginInterface>
#include <ChannellistProviderInterface>
#include <Util/PropertyLoader>

#include <QObject>
#include <QString>
#include <QList>
#include <QVariant>

#include <KConfigDialog>

namespace KalvaChannellistProvider {

/**
 * The KalvaChannellistProvider implements a channellist provider plugin for kalva2
 * that supports the channellists provided for former kalva (see
 * http://www.kde-files.org/index.php?xcontentmode=655).
 *
 * TODO
 *
 * @short KalvaChannellistProvider
 * @author Andreas Silberstorff <ml@andreas-silberstorff.de>
 * @version 1.91
 */
class Plugin
 : public QObject,
   public KalvaPlugin::PluginInterface,
   public KalvaPlugin::ChannellistProviderInterface
{
	Q_OBJECT
	Q_INTERFACES( KalvaPlugin::PluginInterface KalvaPlugin::ChannellistProviderInterface )

public:

     Plugin();

     virtual ~Plugin();

     /**
      * @see KalvaPlugin::PluginInterface
      */
     QString title();

     /**
      * @see KalvaPlugin::PluginInterface
      */
     QString toolTip();

     /**
      * @see KalvaPlugin::PluginInterface
      */
     QString whatsThis();

     /**
      * @see KalvaPlugin::PluginInterface
      */
     void settingsChanged();

     /**
      * @see KalvaPlugin::PluginInterface
      */
     void addToConfigDialog( KConfigDialog *dialog );

     /**
      * @see KalvaPlugin::ChannellistProviderInterface
      */
     void loadChannellist();

     /**
      * @see KalvaPlugin::ChannellistProviderInterface
      */
     void setChannellist(const QList<KalvaData::Channel*> & list = QList<KalvaData::Channel*>());

     /**
      * @see KalvaPlugin::ChannellistProviderInterface
      */
     const QList<KalvaData::Channel*>& getChannellist();

     /**
      * @see KalvaPlugin::ChannellistProviderInterface
      */
     void addChannel(KalvaData::Channel * channel);

     /**
      * @see KalvaPlugin::ChannellistProviderInterface
      */
     void removeChannel(KalvaData::Channel * channel);

private:
	QList<KalvaData::Channel*>* m_channellist;
	bool m_changed;
	const KalvaUtil::PropertyLoader* m_PropertyLoader;
};
}

#endif
