]> git.sesse.net Git - kdenlive/blob - src/kdenlivedoc.h
Fix audio thumbs progress info when window was not focused
[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
30 #include <KUndoStack>
31 #include <kurl.h>
32
33 #include "gentime.h"
34 #include "timecode.h"
35 #include "renderer.h"
36 #include "clipmanager.h"
37
38 class KdenliveDoc:public QObject {
39   Q_OBJECT public:
40
41     KdenliveDoc(const KUrl &url, double fps, int width, int height, QWidget *parent = 0);
42     ~KdenliveDoc();
43     QString documentName();
44     QDomNodeList producersList();
45     double fps();
46     int width();
47     int height();
48     KUrl url();
49     void setProducers(QDomElement doc);
50     Timecode timecode();
51     QDomDocument toXml();
52     void setRenderer(Render *render);
53     KUndoStack *commandStack();
54     QString producerName(int id);
55     void setProducerDuration(int id, int duration);
56     int getProducerDuration(int id);
57     Render *renderer();
58     ClipManager *clipManager();
59     void addClip(const QDomElement &elem, const int clipId);
60     void slotAddClipFile(const KUrl url, const QString group);
61     void slotAddColorClipFile(const QString name, const QString color, QString duration, const QString group);
62     void deleteClip(const uint clipId);
63     int getFramePos(QString duration);
64     DocClipBase *getBaseClip(int clipId);
65     void updateClip(int id);
66     void deleteProjectClip(const uint clipId);
67     /** Inform application of the audio thumbnails generation progress */
68     void setThumbsProgress(KUrl url, int progress);
69
70   private:
71     KUrl m_url;
72     QDomDocument m_document;
73     QString m_projectName;
74     double m_fps;
75     int m_width;
76     int m_height;
77     Timecode m_timecode;
78     Render *m_render;
79     KUndoStack *m_commandStack;
80     QDomDocument generateSceneList();
81     ClipManager *m_clipManager;
82
83   public slots:
84     
85   signals:
86     void addProjectClip(DocClipBase *);
87     void signalDeleteProjectClip(int);
88     void updateClipDisplay(int);
89     void deletTimelineClip(int);
90     void thumbsProgress(KUrl, int);
91 };
92
93 #endif