]> git.sesse.net Git - kdenlive/blob - src/clipmanager.h
Fix undo/redo delete clip
[kdenlive] / src / clipmanager.h
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 #ifndef CLIPMANAGER_H
21 #define CLIPMANAGER_H
22
23 /**ClipManager manages the list of clips in a document
24   *@author Jean-Baptiste Mardelle
25   */
26
27 #include <qdom.h>
28 #include <QPixmap>
29 #include <QObject>
30
31 #include <KUrl>
32 #include <KUndoStack>
33 #include <klocale.h>
34
35 #include "gentime.h"
36 #include "definitions.h"
37 #include "docclipbase.h"
38
39 class KdenliveDoc;
40
41
42 class ClipManager:public QObject {
43   Q_OBJECT public:
44
45
46     ClipManager(KdenliveDoc *doc);
47     virtual ~ ClipManager();
48     void addClip(DocClipBase *clip);
49     DocClipBase *getClipAt(int pos);
50     void deleteClip(uint clipId);
51     void slotAddClipFile(const KUrl url, const QString group);
52     void slotAddColorClipFile(const QString name, const QString color, QString duration, const QString group);
53     DocClipBase *getClipById(int clipId);
54     void slotDeleteClip(uint clipId);
55
56   private:                      // Private attributes
57     /** the list of clips in the document */
58     QList <DocClipBase*> m_clipList;
59     /** the document undo stack*/
60     KdenliveDoc *m_doc;
61     int m_clipIdCounter;
62
63 };
64
65 #endif