/*
Copyright (c) 2010 by Drake Justice <djustice.kde@gmail.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

*/

#ifndef AUTHORTHREAD_H
#define AUTHORTHREAD_H

#include <QProcess>
#include <QThread>
#include <QTimer>
#include <QStringList>

class AuthorThread : public QThread
{
  Q_OBJECT
  public:
      AuthorThread(const QStringList& fileList, const QStringList& chapterStrings, const QList< bool >& pauseList, const QString& tmpDir);
      void run();

  private:
      QStringList m_fileList;
      QStringList m_chapterStrings;
      QList<bool> m_pauseList;
      QString m_tmpDir;
      QProcess *m_process;
      QTimer *m_timer;
      int m_currentFile;
      
  signals:
      void progress(int p);
      void progressMax(int p);
      void progressFile(int p);
      void finished();
    
  public slots:
      void updateProgress();
      void dvdFinished();
};

#endif // AUTHORTHREAD_H
