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 ***************************************************************************/
24 #include <QDomNodeList>
26 #include <QTreeWidget>
29 #include <KTreeWidgetSearchLine>
31 #include "docclipbase.h"
32 #include "kdenlivedoc.h"
35 #include "projectlistview.h"
39 class ProjectList : public QWidget
44 ProjectList(QWidget *parent=0);
45 virtual ~ProjectList();
47 QDomElement producersList();
48 void setRenderer(Render *projectRender);
50 void addClip(const QStringList &name, const QDomElement &elem, const int clipId, const KUrl &url = KUrl(), const QString &group = QString::null, int parentId = -1);
51 void deleteClip(const int clipId);
54 void setDocument(KdenliveDoc *doc);
55 void addProducer(QDomElement producer, int parentId = -1);
56 void slotReplyGetImage(int clipId, int pos, const QPixmap &pix, int w, int h);
57 void slotReplyGetFileProperties(int clipId, const QMap < QString, QString > &properties, const QMap < QString, QString > &metadata);
61 ProjectListView *listView;
62 KTreeWidgetSearchLine *searchView;
68 KUndoStack *m_commandStack;
70 void selectItemById(const int clipId);
71 ProjectItem *getItemById(int id);
72 QAction *m_editAction;
73 QAction *m_deleteAction;
76 void slotAddClip(QUrl givenUrl = QUrl(), const QString &group = QString::null);
77 void slotRemoveClip();
79 void slotClipSelected();
80 void slotAddColorClip();
81 void slotEditClip(QTreeWidgetItem *, int);
82 void slotContextMenu( const QPoint &pos, QTreeWidgetItem * );
84 //void slotShowMenu(const QPoint &pos);
89 void clipSelected(const QDomElement &);
90 void getFileProperties(const QDomElement&, int);
91 void receivedClipDuration(int, int);