/*
* kview.h -- Declaration of class KView.
* Generated by newclass on Wed Oct 15 01:26:27 EST 1997.
*/
#ifndef SSK_KVIEW_H
#define SSK_KVIEW_H

#include<qlist.h>
#include<qptrdict.h>
#include<kapp.h>

class KFilterList;
class KFiltMenuFactory;
class KHelpIndex;
class KImageViewer;
#include "viewer.h" //gcc-2.7.2
#include "filtmenu.h" //gcc-2.7.2

/**
* KView application object.
* @author Sirtaj Singh Kang (taj@kde.org)
* @version $Id: kview.h,v 1.5 1999/01/10 18:16:50 ssk Exp $
*/
class KView : public QObject
{
	Q_OBJECT
public:
	/**
	* KView Constructor
	*/
	KView(int argc, char **argv);

	/**
	* KView Destructor
	*/
	virtual ~KView();

	/**
	* Execute the application.
	*/
	virtual int exec();

	const QImage *currentSelection() const;

private slots:

	void help( const char *tag );

	void newViewer();
	void closeViewer( KImageViewer * );

	void setCutBuffer( QPixmap * );

	void updateAllAccels();

protected:
	/**
	* Create and initialize a new viewer widget and
	* return it.
	*/
	KImageViewer *makeViewer();

private:
	KApplication _app;

	void registerBuiltinFilters();

	KFilterList *_filters;

	KHelpIndex  *_helper;

	QList<KImageViewer> *_viewers;
	QPtrDict<KFiltMenuFactory> *_filtMenus;

	QPixmap *_cutBuffer;
};

#endif // SSK_KVIEW_H
