1 /***************************************************************************
2 * Copyright (C) 2007 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
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. *
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. *
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 ***************************************************************************/
36 #include "definitions.h"
42 class KdenliveDoc: public QObject {
45 KdenliveDoc(const KUrl &url, MltVideoProfile profile, QUndoGroup *undoGroup, QWidget *parent = 0);
47 QDomNodeList producersList();
52 void backupMltPlaylist();
53 Timecode timecode() const;
54 QDomDocument toXml() const;
55 void setRenderer(Render *render);
56 KUndoStack *commandStack();
57 QString producerName(int id);
58 void setProducerDuration(int id, int duration);
59 int getProducerDuration(int id);
61 ClipManager *clipManager();
62 void addClip(const QDomElement &elem, const int clipId);
63 void slotAddClipFile(const KUrl url, const QString group);
64 void slotAddColorClipFile(const QString name, const QString color, QString duration, const QString group);
65 void deleteClip(const uint clipId);
66 int getFramePos(QString duration);
67 DocClipBase *getBaseClip(int clipId);
68 void updateClip(int id);
69 void deleteProjectClip(const uint clipId);
70 /** Inform application of the audio thumbnails generation progress */
71 void setThumbsProgress(KUrl url, int progress);
72 QString profilePath() const;
73 QString description() const;
74 /** Returns the document format: PAL or NTSC */
75 QString getDocumentStandard();
76 void setUrl(KUrl url);
77 QDomElement documentInfoXml();
78 void setProfilePath(QString path);
79 /** Set to true if document needs saving, false otherwise */
80 void setModified(bool mod);
84 QDomDocument m_document;
85 QString m_projectName;
91 KUndoStack *m_commandStack;
92 QDomDocument generateSceneList();
93 ClipManager *m_clipManager;
94 MltVideoProfile m_profile;
96 /** tells whether current doc has been changed since last save event */
102 void addProjectClip(DocClipBase *);
103 void signalDeleteProjectClip(int);
104 void updateClipDisplay(int);
105 void deletTimelineClip(int);
106 void thumbsProgress(KUrl, int);
107 /** emited when the document state has been modified (= needs saving or not) */
108 void docModified(bool);