/***************************************************************************
 *   Copyright (C) 2004, 2005 Thomas Nagy                                  *
 *   tnagy2^8@yahoo.fr                                                     *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License version 2        *
 *   as published by the Free Software Foundation (see COPYING)            *
 *                                                                         *
 *   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.                          *
 ***************************************************************************/

#ifndef _KDISSGENERATORWIZARD_H
#define _KDISSGENERATORWIZARD_H

#include <kwizard.h>
#include <qvaluelist.h>

class DGenerator;
class QWidget;
class QListViewItem;
class generatorp1;
class generatorp2;
class DGenerator;
class DDataControl;
class KDissertPart;

class generatorwizard : public KWizard
{
	Q_OBJECT
	public:
		generatorwizard(KDissertPart* part);
		~generatorwizard();
		void setgeneratorlist(QValueList<DGenerator*> & genlist);
		void setgeneratordata(DDataControl*);

	private:
		generatorp1* m_page1;
		generatorp2* m_page2;

		bool isvalidlocation();

		QPtrList<DGenerator> m_selected;
		DDataControl* m_data;

		KDissertPart* m_part;
		
	private slots:
		void updatelocationlabel();
		void updatecurrenttemplate(QListViewItem*);
		void updateselectedtemplate();
		void checksteps();

	protected:
		virtual void accept();
};

#endif // _KDISSGENERATORWIZARD_H
