/****************************************************************************
** Interface to the GUI.
**
** Created: Wed Mar 18 22:48:00 2004
**      by: Varol Okan using kate editor
**
**
****************************************************************************/

#ifndef DIALOGFRAME_H
#define DIALOGFRAME_H

#include <qframe.h>

// Okay this is stupid but I could not create a template class from a QFrame class.
// I needed this in order to have the Preview of the Line around the inner box
// updated correctly. If I am using QFrame I can not guarantee a correct update
// hence I create a derived class but this I could no incorporate into the .ui File
// So I use the created source, modify it sligthly and be hapy with it.
// Note: I am leaving the uidialogframe.ui file in the source tree but I removed it from the
// project file for qdvdauthor.
//
// here is the derived QFrame class which I simply substitute in the uidialogframe - class.

/*
// forward declaration
class DialogFrame;
class FramePreview : public QFrame
{
public:
	 FramePreview(QWidget *p=0, const char *n=0, WFlags f=0);
	~FramePreview();
	virtual void setDialog(DialogFrame *);
	void paintEvent(QPaintEvent *pPaintE);
protected:
	DialogFrame *m_pDialogFrame;
};
*/
#include "uidialogframe.h"
#include "frameobject.h"
#include "dialoganimation.h"

class QColor;
class QPaintEvent;
class QPainter;

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

	void initMe(FrameObject *);

	int      frameWidth ();
	int      style      ();
	int      join       ();
	QColor   color      ();
	QString &animation  ();

protected:
	virtual void paintEvent  (QPaintEvent *);
	void   drawPreview();

protected slots:
	virtual void slotColor     ();
	virtual void slotImage     ();
	virtual void slotPicture   ();
	virtual void slotAnimation ();
	virtual void slotImage     (bool);
	virtual void slotPicture   (bool);
	virtual void slotWidth     (int);
	virtual void slotStyle     (int);
	virtual void slotJoin      (int);

private:
	QColor  m_colorFrame;
	int     m_iFrameWidth;
	int     m_iFrameStyle;
	int     m_iFrameJoin;
	QString m_qsAnimation;
};

#endif // DIALOGFRAME_H
