]> git.sesse.net Git - kdenlive/blob - src/kdenlivedoc.h
User can now save & delete custom export profiles
[kdenlive] / src / kdenlivedoc.h
1 /***************************************************************************
2  *   Copyright (C) 2007 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 KDENLIVEDOC_H
22 #define KDENLIVEDOC_H
23
24 #include <qdom.h>
25 #include <qstring.h>
26 #include <qmap.h>
27 #include <QList>
28 #include <QObject>
29 #include <QUndoGroup>
30
31 #include <KUndoStack>
32 #include <kurl.h>
33
34 #include "gentime.h"
35 #include "timecode.h"
36 #include "renderer.h"
37 #include "clipmanager.h"
38 #include "definitions.h"
39
40 class KdenliveDoc: public QObject {
41 Q_OBJECT public:
42
43     KdenliveDoc(const KUrl &url, MltVideoProfile profile, QUndoGroup *undoGroup, QWidget *parent = 0);
44     ~KdenliveDoc();
45     QDomNodeList producersList();
46     double fps() const;
47     int width() const;
48     int height() const;
49     KUrl url() const;
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);
58     Render *renderer();
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
75 private:
76     KUrl m_url;
77     QDomDocument m_document;
78     QString m_projectName;
79     double m_fps;
80     int m_width;
81     int m_height;
82     Timecode m_timecode;
83     Render *m_render;
84     KUndoStack *m_commandStack;
85     QDomDocument generateSceneList();
86     ClipManager *m_clipManager;
87     MltVideoProfile m_profile;
88     QString m_scenelist;
89
90 public slots:
91
92 signals:
93     void addProjectClip(DocClipBase *);
94     void signalDeleteProjectClip(int);
95     void updateClipDisplay(int);
96     void deletTimelineClip(int);
97     void thumbsProgress(KUrl, int);
98 };
99
100 #endif