/***************************************************************************
 *   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 PERSPECTIVEINTERFACE_H
#define PERSPECTIVEINTERFACE_H

#include <QObject>
#include <QWidget>

namespace KalvaPlugin {

/**
 * This class describes the interface for kalva2 perspective plugins.
 *
 * Kalva perspective plugins have to implement this interface.
 *
 * The PerspectiveFactory reads in all plugins implementing the PerspectiveInterface
 * and constructs a Perspective for each perspective plugin. Perspectives are held
 * by the factory and can be accessed through Perspectives::perspectives();
 *
 * The Perspective can be enabled or disabled. When enabled the perspective appends
 * kalvaview and kalva's KConfigDialog by calling the plugins functions.
 *
 * The plugin can be accessed through Perspective::plugin().
 *
 * @short PerspectiveInterface
 * @author Andreas Silberstorff <ml@andreas-silberstorff.de>
 * @version 1.0.91
 */

class PerspectiveInterface
{
public:

	virtual ~PerspectiveInterface() {};

	/**
	 * Implementing plugins must overwrite this to
	 * provide a complex widget to be integrated in the manager QTabWidget.
	 * See kalvaview.
	 */
	virtual QWidget* createManager(QWidget *parent) = 0;

	/**
	 * Implementing plugins must overwrite this to
	 * provide a complex widget to be integrated in the mainView QStackedWidget.
	 * See kalvaview.
	 */
	virtual QWidget* createMainView(QWidget *parent) = 0;

};
}

Q_DECLARE_INTERFACE( KalvaPlugin::PerspectiveInterface, "org.kde.apps.kalva2.PerspectiveInterface/1.0" )

#endif // PERSPECTIVEINTERFACE_H
