]> git.sesse.net Git - kdenlive/blob - src/projectlist.h
start implementing folders in project view
[kdenlive] / src / projectlist.h
1 #ifndef PRJECTLIST_H
2 #define PRJECTLIST_H
3
4 #include <QDomNodeList>
5 #include <QToolBar>
6 #include <QTreeWidget>
7
8 #include <KUndoStack>
9 #include <KTreeWidgetSearchLine>
10
11 #include "docclipbase.h"
12 #include "kdenlivedoc.h"
13 #include "renderer.h"
14 #include "timecode.h"
15
16 class ProjectItem;
17
18 class ProjectList : public QWidget
19 {
20   Q_OBJECT
21   
22   public:
23     ProjectList(QWidget *parent=0);
24
25     QDomElement producersList();
26     void setRenderer(Render *projectRender);
27
28     void addClip(const QStringList &name, const QDomElement &elem, const int clipId, const KUrl &url = KUrl());
29     void deleteClip(const int clipId);
30
31   public slots:
32     void setDocument(KdenliveDoc *doc);
33     void addProducer(QDomElement producer);
34     void slotReplyGetImage(int clipId, int pos, const QPixmap &pix, int w, int h);
35     void slotReplyGetFileProperties(int clipId, const QMap < QString, QString > &properties, const QMap < QString, QString > &metadata);
36
37
38   private:
39     QTreeWidget *listView;
40     KTreeWidgetSearchLine *searchView;
41     Render *m_render;
42     Timecode m_timecode;
43     double m_fps;
44     QToolBar *m_toolbar;
45     KUndoStack *m_commandStack;
46     int m_clipIdCounter;
47     void selectItemById(const int clipId);
48     ProjectItem *getItemById(int id);
49
50   private slots:
51     void slotAddClip();
52     void slotRemoveClip();
53     void slotEditClip();
54     void slotClipSelected();
55     void slotAddColorClip();
56
57   signals:
58     void clipSelected(const QDomElement &);
59     void getFileProperties(const QDomElement&, int);
60 };
61
62 #endif