#ifndef CPROGRESSDIALOG_H
#define CPROGRESSDIALOG_H

#include <qprogressdialog.h>

class CRenderObj;
class QString;
class CRunThread;
class QTimer;

class CProgressDialog : public QProgressDialog
{
 Q_OBJECT

 public:
  CProgressDialog(const CRenderObj& surfaceobj,
                  const QString& filename,
                  const QString& labelText,
                  const QString& cancelButtonText,
                  int totalSteps,
                  QWidget *creator = 0,
                  const char *name = 0,
                  bool modal = false,
                  WFlags f = 0);
  ~CProgressDialog();

 private:
  CRenderObj * m_pSurfaceObj;
  CRunThread * m_pRunThread;
  QTimer     * m_pTimer;

 public slots:
  void Update(void);

 private slots:
  void Closed() { emit canceled(this); }

 signals:
  void canceled(CProgressDialog *);
};


#endif // CPROGRESSDIALOG
