1/***************************************************************************
2 * Copyright (C) 2008 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
18 ***************************************************************************/
19
20
21#ifndef DVDWIZARD_H
22#define DVDWIZARD_H
23
24#include "dvdwizard/dvdwizardvob.h"
25#include "dvdwizard/dvdwizardmenu.h"
26#include "dvdwizard/dvdwizardchapters.h"
27#include "ui_dvdwizardstatus_ui.h"
28#include "ui_dvdwizardchapters_ui.h"
29
30#include <QWizard>
31#include <QPainter>
32#include <QProcess>
33
34#include <KDebug>
35#include <KTemporaryFile>
36
37typedef QMap <QString, QRect> stringRectMap;
38
39class DvdWizard : public QWizard
40{
41 Q_OBJECT
42public:
43 explicit DvdWizard(MonitorManager *manager, const QString &url = QString(), QWidget * parent = 0);
44 virtual ~DvdWizard();
45 void processSpumux();
46
47private:
48 DvdWizardVob *m_pageVob;
49 DvdWizardMenu *m_pageMenu;
50 Ui::DvdWizardStatus_UI m_status;
51
52#if KDE_IS_VERSION(4,7,0)
53 KMessageWidget *m_isoMessage;
54#endif
55
56 DvdWizardChapters *m_pageChapters;
57 KTemporaryFile m_authorFile;
58 KTemporaryFile m_menuFile;
59 KTemporaryFile m_menuVobFile;
60 KTemporaryFile m_letterboxMovie;
61 QProcess *m_dvdauthor;
62 QProcess *m_mkiso;
63 QProcess m_menuJob;
64 QString m_creationLog;
65 QListWidgetItem *m_vobitem;
66 KTemporaryFile m_selectedImage;
67 KTemporaryFile m_selectedLetterImage;
68 KTemporaryFile m_highlightedImage;
69 KTemporaryFile m_highlightedLetterImage;
70 KTemporaryFile m_menuVideo;
71 KTemporaryFile m_menuFinalVideo;
72 KTemporaryFile m_menuImageBackground;
73 QMenu *m_burnMenu;
74 void cleanup();
75 void errorMessage(const QString &text);
76 void infoMessage(const QString &text);
77 void processDvdauthor(const QString &menuMovieUrl = QString(), const stringRectMap &buttons = stringRectMap(), const QStringList &buttonsTarget = QStringList());
78
79private slots:
80 void slotPageChanged(int page);
81 void slotRenderFinished(int exitCode, QProcess::ExitStatus status);
82 void slotIsoFinished(int exitCode, QProcess::ExitStatus status);
83 void generateDvd();
84 void slotPreview();
85 void slotBurn();
86 void slotGenerate();
87 void slotAbort();
88 void slotLoad();
89 void slotSave();
90 void slotShowRenderInfo();
91 void slotShowIsoInfo();
92 void slotProcessMenuStatus(int, QProcess::ExitStatus status);
93 void slotprepareMonitor();
94};
95
96#endif
97
98