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