+ ProjectItem *item = ((ProjectItem *)listView->currentItem());
+ AddClipCommand *command = new AddClipCommand(this, item->names(), item->toXml(), item->clipId(), KUrl(item->data(1, FullPathRole).toString()), false);
+ m_commandStack->push(command);
+
+}
+
+void ProjectList::addClip(const QStringList &name, const QDomElement &elem, const int clipId, const KUrl &url)
+{
+ ProjectItem *item = new ProjectItem(listView, name, elem, clipId);
+ if (!url.isEmpty()) {
+ item->setData(1, FullPathRole, url.path());
+ emit getFileProperties(url, elem.attribute("frame_thumbnail", 0).toInt());
+ }
+}
+
+void ProjectList::deleteClip(const int clipId)
+{
+ QTreeWidgetItem *parent = 0;
+ int count =
+ parent ? parent->childCount() : listView->topLevelItemCount();
+
+ for (int i = 0; i < count; i++)
+ {
+ QTreeWidgetItem *item =
+ parent ? parent->child(i) : listView->topLevelItem(i);
+ if (((ProjectItem *)item)->clipId() == clipId) {
+ delete item;
+ break;
+ }
+ }