/*
 * kxtodvdview.h
 *
 * Copyright (C) 2010 Drake Justice <djustice.kde@gmail.com>
 *
 * GPL n such
 *
 */


#ifndef KXTODVDVIEW_H
#define KXTODVDVIEW_H

#include <QWidget>
#include <QMenu>

#include "ui_kxtodvdview_base.h"
#include "encoderthread.h"
#include "authorthread.h"
#include "mkisothread.h"
#include "burnthread.h"

class QPainter;
class KUrl;

class KxToDvdView : public QWidget, public Ui::kxtodvdview_base
{
    Q_OBJECT
public:
    KxToDvdView(QWidget *parent);
    virtual ~KxToDvdView();

private:
    Ui::kxtodvdview_base ui_kxtodvdview_base;
    QStringList m_fileList;
    QStringList m_chapterStrings;
    QString m_videoMode;
    QString m_aspectRatio;
    QString m_tmpDir;
    QMenu* m_configMenu;
    QMenu* m_chapterDurationMenu;
    QActionGroup *m_chaptersGroup;
    QAction *m_chpOneMin;
    QAction *m_chpFiveMin;
    QAction *m_chpTenMin;
    QAction *m_chpFifteenMin;
    QAction *m_chpThirtyMin;
    QAction *m_pauseAfter;
    int m_currentProjectDuration;
    int m_currentFile;
    bool m_burning;
    EncoderThread *m_encoder;
    AuthorThread *m_authorer;
    MkISOThread *m_mkiso;
    BurnThread *m_burner;

signals:
    void signalChangeCaption(const QString& text);

private slots:
    void settingsChanged();
    void btnAddClicked();
    void btnDeleteClicked();
    void btnMoveUpClicked();
    void btnMoveDownClicked();
    void btnConfigureClicked();
    void btnCreateISOClicked();
    void btnBurnDVDClicked();
    void updateProgress(int);
    void updateProgressMax(int);
    void updateProgressFile(int);
    void createDVDStructure();
    void createISOImage();
    void imageCreated();
    void discBurned();
    void setChapterString(QAction*);
    void setPauseAfter(bool);
    void toggleConfigButton();
};

#endif // KXTODVDVIEW_H
