/****************************************************************************
** Form interface generated from reading ui file 'dialogfilter.ui'
**
** Created: Tue Jan 27 22:06:50 2004
**      by: The User Interface Compiler ($Id: dialogcreate.h,v 1.85 2005/11/24 22:01:05 qdvdauthor Exp $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#ifndef DIALOGCREATE_H
#define DIALOGCREATE_H

#include "uidialogcreate.h"
#include "xml_slideshow.h"

class QProcess;

class DialogCreate : public uiDialogCreate
{
	Q_OBJECT
public:
	 DialogCreate (QWidget * parent = 0, const char * name = 0, WFlags f = 0 );
	~DialogCreate ();

	void findDVDSlideshow();

	void setXmlSlideshow (CXmlSlideshow *, QString);
	QString & getOutputFileName ();
	void setOutputFileName (QString &);

signals:
	void signalSetSlideshowEntry(QString);
	void signalSlideshowDone    (QString, QString);
	
private:
	void    renderImage ( CXmlSlideshow::img_struct *, QString, bool );
	void    verifySlideshowExists  ( bool b=true );
	QString getUniqueTempFile      ( QString );
	bool    sanityCheck            ();
	void    preprocessSlideshow    ();
	void    createDVDSlideshowFile ();
	void    executeDVDSlideshow    ();

public slots:
	virtual void slotGenerate      ();
	virtual void slotBack          ();
	// callbacks for the QProcess ...
	virtual void slotReadFromStdout();
	virtual void slotReadFromStderr();
	virtual void slotProcessExited ();


private:
	QString m_qsOutputFileName;
	QString m_qsTempPath;
	CXmlSlideshow	m_Slideshow;	// This is a copy of the orig to hold the
		// names of the preprocessed images rather then the original ones.
	QProcess *m_pNewProcess;
	uint m_iProgressCounter;
	QWidget *m_pMainDialog;
};

#endif // DIALOGCREATE
