]> git.sesse.net Git - kdenlive/blob - src/kdenlivedoc.cpp
Fix loading & saving of markers, some indent fixes
[kdenlive] / src / kdenlivedoc.cpp
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 #include <KDebug>
21 #include <KStandardDirs>
22 #include <KMessageBox>
23 #include <KLocale>
24 #include <KFileDialog>
25 #include <KIO/NetAccess>
26
27
28 #include "kdenlivedoc.h"
29 #include "docclipbase.h"
30 #include "profilesdialog.h"
31 #include "kdenlivesettings.h"
32 #include "renderer.h"
33 #include "clipmanager.h"
34 #include "addfoldercommand.h"
35 #include "editfoldercommand.h"
36 #include "titlewidget.h"
37 #include "mainwindow.h"
38
39 KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, MltVideoProfile profile, QUndoGroup *undoGroup, MainWindow *parent): QObject(parent), m_render(NULL), m_url(url), m_projectFolder(projectFolder), m_profile(profile), m_fps((double)profile.frame_rate_num / profile.frame_rate_den), m_width(profile.width), m_height(profile.height), m_commandStack(new KUndoStack(undoGroup)), m_modified(false), m_documentLoadingProgress(0), m_documentLoadingStep(0.0) {
40     m_clipManager = new ClipManager(this);
41     if (!url.isEmpty()) {
42         QString tmpFile;
43         if (KIO::NetAccess::download(url.path(), tmpFile, parent)) {
44             QFile file(tmpFile);
45             m_document.setContent(&file, false);
46             file.close();
47             QDomNode infoXmlNode = m_document.elementsByTagName("kdenlivedoc").at(0);
48             QDomNode westley = m_document.elementsByTagName("westley").at(0);
49             if (!infoXmlNode.isNull()) {
50                 QDomElement infoXml = infoXmlNode.toElement();
51                 QString profilePath = infoXml.attribute("profile");
52                 if (!profilePath.isEmpty()) setProfilePath(profilePath);
53                 double version = infoXml.attribute("version").toDouble();
54                 if (version < 0.7) convertDocument(version);
55                 else {
56                     //delete all mlt producers and instead, use Kdenlive saved producers
57                     QDomNodeList prods = m_document.elementsByTagName("producer");
58                     int maxprod = prods.count();
59                     int pos = 0;
60                     for (int i = 0; i < maxprod; i++) {
61                         QDomNode m = prods.at(pos);
62                         if (m.toElement().attribute("id") == "black")
63                             pos = 1;
64                         else westley.removeChild(m);
65                     }
66                     prods = m_document.elementsByTagName("kdenlive_producer");
67                     maxprod = prods.count();
68                     for (int i = 0; i < maxprod; i++) {
69                         prods.at(0).toElement().setTagName("producer");
70                         westley.insertBefore(prods.at(0), QDomNode());
71                     }
72                 }
73                 QDomElement e;
74                 QDomNodeList producers = m_document.elementsByTagName("producer");
75                 const int max = producers.count();
76                 if (max > 0) {
77                     m_documentLoadingStep = 100.0 / (max + m_document.elementsByTagName("entry").count());
78                     parent->slotGotProgressInfo(i18n("Loading project clips"), (int) m_documentLoadingProgress);
79                 }
80
81                 for (int i = 0; i < max; i++) {
82                     e = producers.item(i).cloneNode().toElement();
83                     if (m_documentLoadingStep > 0) {
84                         m_documentLoadingProgress += m_documentLoadingStep;
85                         parent->slotGotProgressInfo(QString(), (int) m_documentLoadingProgress);
86                         qApp->processEvents();
87                     }
88                     if (!e.isNull() && e.attribute("id") != "black") {
89                         addClip(e, e.attribute("id").toInt());
90                     }
91                 }
92
93                 QDomNode markers = m_document.elementsByTagName("markers").at(0);
94                 if (!markers.isNull()) {
95                     QDomNodeList markerslist = markers.childNodes();
96                     int maxchild = markerslist.count();
97                     for (int k = 0; k < maxchild; k++) {
98                         e = markerslist.at(k).toElement();
99                         if (e.tagName() == "marker") {
100                             int id = e.attribute("id").toInt();
101                             m_clipManager->getClipById(id)->addSnapMarker(GenTime(e.attribute("time").toDouble()), e.attribute("comment"));
102                         }
103                     }
104                     m_document.removeChild(markers);
105                 }
106                 m_document.removeChild(infoXmlNode);
107
108                 kDebug() << "Reading file: " << url.path() << ", found clips: " << producers.count();
109             } else kWarning() << "  NO KDENLIVE INFO FOUND IN FILE: " << url.path();
110             KIO::NetAccess::removeTempFile(tmpFile);
111         } else {
112             KMessageBox::error(parent, KIO::NetAccess::lastErrorString());
113         }
114     } else {
115         // Creating new document
116         QDomElement westley = m_document.createElement("westley");
117         m_document.appendChild(westley);
118
119         QDomElement tractor = m_document.createElement("tractor");
120         tractor.setAttribute("id", "maintractor");
121         QDomElement multitrack = m_document.createElement("multitrack");
122         QDomElement playlist = m_document.createElement("playlist");
123         playlist.setAttribute("id", "black_track");
124         westley.appendChild(playlist);
125
126
127         // create playlists
128         int audiotracks = 2;
129         int videotracks = 3;
130         int total = audiotracks + videotracks + 1;
131
132         for (int i = 1; i < total; i++) {
133             QDomElement playlist = m_document.createElement("playlist");
134             playlist.setAttribute("id", "playlist" + QString::number(i));
135             westley.appendChild(playlist);
136         }
137
138         QDomElement track0 = m_document.createElement("track");
139         track0.setAttribute("producer", "black_track");
140         tractor.appendChild(track0);
141
142         // create audio tracks
143         for (int i = 1; i < audiotracks + 1; i++) {
144             QDomElement track = m_document.createElement("track");
145             track.setAttribute("producer", "playlist" + QString::number(i));
146             track.setAttribute("hide", "video");
147             tractor.appendChild(track);
148         }
149
150         // create video tracks
151         for (int i = audiotracks + 1; i < total; i++) {
152             QDomElement track = m_document.createElement("track");
153             track.setAttribute("producer", "playlist" + QString::number(i));
154             tractor.appendChild(track);
155         }
156
157         for (uint i = 2; i < total ; i++) {
158             QDomElement transition = m_document.createElement("transition");
159             transition.setAttribute("in", "0");
160             //TODO: Make audio mix last for all project duration
161             transition.setAttribute("out", "15000");
162
163             QDomElement property = m_document.createElement("property");
164             property.setAttribute("name", "a_track");
165             QDomText value = m_document.createTextNode(QString::number(1));
166             property.appendChild(value);
167             transition.appendChild(property);
168
169             property = m_document.createElement("property");
170             property.setAttribute("name", "b_track");
171             value = m_document.createTextNode(QString::number(i));
172             property.appendChild(value);
173             transition.appendChild(property);
174
175             property = m_document.createElement("property");
176             property.setAttribute("name", "mlt_service");
177             value = m_document.createTextNode("mix");
178             property.appendChild(value);
179             transition.appendChild(property);
180
181             property = m_document.createElement("property");
182             property.setAttribute("name", "combine");
183             value = m_document.createTextNode("1");
184             property.appendChild(value);
185             transition.appendChild(property);
186
187             property = m_document.createElement("property");
188             property.setAttribute("name", "internal_added");
189             value = m_document.createTextNode("237");
190             property.appendChild(value);
191             transition.appendChild(property);
192             tractor.appendChild(transition);
193         }
194         westley.appendChild(tractor);
195     }
196     m_scenelist = m_document.toString();
197     // kDebug() << "scenelist" << m_scenelist;
198     if (m_fps == 30000.0 / 1001.0) m_timecode.setFormat(30, true);
199     else m_timecode.setFormat((int) m_fps);
200 }
201
202 KdenliveDoc::~KdenliveDoc() {
203     delete m_commandStack;
204     delete m_clipManager;
205 }
206
207 void KdenliveDoc::convertDocument(double version) {
208     // Opening a old Kdenlive document
209     QDomNode westley = m_document.elementsByTagName("westley").at(1);
210     QDomNode tractor = m_document.elementsByTagName("tractor").at(0);
211     QDomNode kdenlivedoc = m_document.elementsByTagName("kdenlivedoc").at(0);
212     QDomNode multitrack = m_document.elementsByTagName("multitrack").at(0);
213     QDomNodeList playlists = m_document.elementsByTagName("playlist");
214
215     QDomNode props = m_document.elementsByTagName("properties").at(0).toElement();
216     QString profile = props.toElement().attribute("videoprofile");
217     if (profile == "dv_wide") profile = "dv_pal_wide";
218     if (!profile.isEmpty()) {
219         setProfilePath(profile);
220     } else setProfilePath("dv_pal");
221
222     // move playlists outside of tractor and add the tracks instead
223     int max = playlists.count();
224     for (int i = 0; i < max; i++) {
225         QDomNode n = playlists.at(i);
226         westley.insertBefore(n, QDomNode());
227         QDomElement track = m_document.createElement("track");
228         QString playlist_id =  n.toElement().attribute("id");
229         if (playlist_id.isEmpty()) {
230             playlist_id = "black_track";
231             n.toElement().setAttribute("id", playlist_id);
232         }
233         track.setAttribute("producer", playlist_id);
234         tractor.appendChild(track);
235     }
236     tractor.removeChild(multitrack);
237
238     // audio track mixing transitions should not be added to track view, so add required attribute
239     QDomNodeList transitions = m_document.elementsByTagName("transition");
240     max = transitions.count();
241     for (int i = 0; i < max; i++) {
242         QDomElement tr = transitions.at(i).toElement();
243         if (tr.attribute("combine") == "1" && tr.attribute("mlt_service") == "mix") {
244             QDomElement property = m_document.createElement("property");
245             property.setAttribute("name", "internal_added");
246             QDomText value = m_document.createTextNode("237");
247             property.appendChild(value);
248             tr.appendChild(property);
249         } else {
250             // convert transition
251             QDomNamedNodeMap attrs = tr.attributes();
252             for (unsigned int j = 0; j < attrs.count(); j++) {
253                 QString attrName = attrs.item(j).nodeName();
254                 if (attrName != "in" && attrName != "out" && attrName != "id") {
255                     QDomElement property = m_document.createElement("property");
256                     property.setAttribute("name", attrName);
257                     QDomText value = m_document.createTextNode(attrs.item(j).nodeValue());
258                     property.appendChild(value);
259                     tr.appendChild(property);
260                 }
261             }
262         }
263     }
264
265     // move transitions after tracks
266     for (int i = 0; i < max; i++) {
267         tractor.insertAfter(transitions.at(0), QDomNode());
268     }
269
270     QDomElement markers = m_document.createElement("markers");
271
272     // change producer names
273     QDomNodeList producers = m_document.elementsByTagName("producer");
274     max = producers.count();
275     for (int i = 0; i < max; i++) {
276         QDomElement prod = producers.at(0).toElement();
277         QDomNode m = prod.firstChild();
278         if (!m.isNull() && m.toElement().tagName() == "markers") {
279             QDomNodeList prodchilds = m.childNodes();
280             int maxchild = prodchilds.count();
281             for (int k = 0; k < maxchild; k++) {
282                 QDomElement mark = prodchilds.at(0).toElement();
283                 mark.setAttribute("id", prod.attribute("id"));
284                 markers.insertAfter(mark, QDomNode());
285             }
286             prod.removeChild(m);
287         }
288         int duration = prod.attribute("duration").toInt();
289         if (duration > 0) prod.setAttribute("out", QString::number(duration));
290         westley.insertBefore(prod, QDomNode());
291     }
292
293     QDomNode westley0 = m_document.elementsByTagName("westley").at(0);
294     if (!markers.firstChild().isNull()) westley0.appendChild(markers);
295     westley0.removeChild(kdenlivedoc);
296
297     QDomNodeList elements = westley.childNodes();
298     max = elements.count();
299     for (int i = 0; i < max; i++) {
300         QDomElement prod = elements.at(0).toElement();
301         westley0.insertAfter(prod, QDomNode());
302     }
303
304     westley0.removeChild(westley);
305
306     //kDebug() << "/////////////////  CONVERTED DOC:";
307     //kDebug() << m_document.toString();
308     //kDebug() << "/////////////////  END CONVERTED DOC:";
309 }
310
311 QDomElement KdenliveDoc::documentInfoXml() {
312     QDomDocument doc;
313     QDomElement e;
314     QDomElement addedXml = doc.createElement("kdenlivedoc");
315     QDomElement markers = doc.createElement("markers");
316     addedXml.setAttribute("version", "0.7");
317     addedXml.setAttribute("profile", profilePath());
318     QList <DocClipBase*> list = m_clipManager->documentClipList();
319     for (int i = 0; i < list.count(); i++) {
320         e = list.at(i)->toXML();
321         e.setTagName("kdenlive_producer");
322         addedXml.appendChild(doc.importNode(e, true));
323         QList < CommentedTime > marks = list.at(i)->commentedSnapMarkers();
324         for (int j = 0; j < marks.count(); j++) {
325             QDomElement marker = doc.createElement("marker");
326             marker.setAttribute("time", marks.at(j).time().ms() / 1000);
327             marker.setAttribute("comment", marks.at(j).comment());
328             marker.setAttribute("id", e.attribute("id"));
329             markers.appendChild(marker);
330         }
331     }
332     addedXml.appendChild(markers);
333     //kDebug() << m_document.toString();
334     return addedXml;
335 }
336
337
338 ClipManager *KdenliveDoc::clipManager() {
339     return m_clipManager;
340 }
341
342 KUrl KdenliveDoc::projectFolder() const {
343     if (m_projectFolder.isEmpty()) return KUrl(KStandardDirs::locateLocal("appdata", "/projects/"));
344     return m_projectFolder;
345 }
346
347 QString KdenliveDoc::getDocumentStandard() {
348     //WARNING: this way to tell the video standard is a bit hackish...
349     if (m_profile.description.contains("pal", Qt::CaseInsensitive) || m_profile.description.contains("25", Qt::CaseInsensitive) || m_profile.description.contains("50", Qt::CaseInsensitive)) return "PAL";
350     return "NTSC";
351 }
352
353 QString KdenliveDoc::profilePath() const {
354     return m_profile.path;
355 }
356
357 void KdenliveDoc::setProfilePath(QString path) {
358     KdenliveSettings::setCurrent_profile(path);
359     m_profile = ProfilesDialog::getVideoProfile(path);
360     m_fps = (double) m_profile.frame_rate_num / m_profile.frame_rate_den;
361     m_width = m_profile.width;
362     m_height = m_profile.height;
363     if (m_fps == 30000.0 / 1001.0) m_timecode.setFormat(30, true);
364     else m_timecode.setFormat((int) m_fps);
365 }
366
367 void KdenliveDoc::setThumbsProgress(const QString &message, int progress) {
368     emit progressInfo(message, progress);
369 }
370
371 void KdenliveDoc::loadingProgressed() {
372     m_documentLoadingProgress += m_documentLoadingStep;
373     emit progressInfo(QString(), (int) m_documentLoadingProgress);
374 }
375
376 KUndoStack *KdenliveDoc::commandStack() {
377     return m_commandStack;
378 }
379
380 void KdenliveDoc::setRenderer(Render *render) {
381     m_render = render;
382     if (m_render) m_render->setSceneList(m_scenelist);
383 }
384
385 Render *KdenliveDoc::renderer() {
386     return m_render;
387 }
388
389 void KdenliveDoc::updateClip(int id) {
390     emit updateClipDisplay(id);
391 }
392
393 int KdenliveDoc::getFramePos(QString duration) {
394     return m_timecode.getFrameCount(duration, m_fps);
395 }
396
397 QString KdenliveDoc::producerName(int id) {
398     QString result = "unnamed";
399     QDomNodeList prods = producersList();
400     int ct = prods.count();
401     for (int i = 0; i <  ct ; i++) {
402         QDomElement e = prods.item(i).toElement();
403         if (e.attribute("id") != "black" && e.attribute("id").toInt() == id) {
404             result = e.attribute("name");
405             if (result.isEmpty()) result = KUrl(e.attribute("resource")).fileName();
406             break;
407         }
408     }
409     return result;
410 }
411
412 void KdenliveDoc::setProducerDuration(int id, int duration) {
413     QDomNodeList prods = producersList();
414     int ct = prods.count();
415     for (int i = 0; i <  ct ; i++) {
416         QDomElement e = prods.item(i).toElement();
417         if (e.attribute("id") != "black" && e.attribute("id").toInt() == id) {
418             e.setAttribute("duration", QString::number(duration));
419             break;
420         }
421     }
422 }
423
424 int KdenliveDoc::getProducerDuration(int id) {
425     int result = 0;
426     QDomNodeList prods = producersList();
427     int ct = prods.count();
428     for (int i = 0; i <  ct ; i++) {
429         QDomElement e = prods.item(i).toElement();
430         if (e.attribute("id") != "black" && e.attribute("id").toInt() == id) {
431             result = e.attribute("duration").toInt();
432             break;
433         }
434     }
435     return result;
436 }
437
438
439 QDomDocument KdenliveDoc::generateSceneList() {
440     QDomDocument doc;
441     QDomElement westley = doc.createElement("westley");
442     doc.appendChild(westley);
443     QDomElement prod = doc.createElement("producer");
444 }
445
446 QDomDocument KdenliveDoc::toXml() const {
447     return m_document;
448 }
449
450 Timecode KdenliveDoc::timecode() const {
451     return m_timecode;
452 }
453
454 QDomNodeList KdenliveDoc::producersList() {
455     return m_document.elementsByTagName("producer");
456 }
457
458 void KdenliveDoc::backupMltPlaylist() {
459     if (m_render) m_scenelist = m_render->sceneList();
460 }
461
462 double KdenliveDoc::fps() const {
463     return m_fps;
464 }
465
466 int KdenliveDoc::width() const {
467     return m_width;
468 }
469
470 int KdenliveDoc::height() const {
471     return m_height;
472 }
473
474 KUrl KdenliveDoc::url() const {
475     return m_url;
476 }
477
478 void KdenliveDoc::setUrl(KUrl url) {
479     m_url = url;
480 }
481
482 void KdenliveDoc::setModified(bool mod) {
483     if (mod == m_modified) return;
484     m_modified = mod;
485     emit docModified(m_modified);
486 }
487
488 bool KdenliveDoc::isModified() const {
489     return m_modified;
490 }
491
492 QString KdenliveDoc::description() const {
493     if (m_url.isEmpty())
494         return i18n("Untitled") + " / " + m_profile.description;
495     else
496         return m_url.fileName() + " / " + m_profile.description;
497 }
498
499 void KdenliveDoc::addClip(const QDomElement &elem, const int clipId) {
500     DocClipBase *clip = new DocClipBase(m_clipManager, elem, clipId);
501     kDebug() << "/////////  DOCUM, CREATING NEW CLIP, ID:" << clipId << ", PAR ID:" << elem.attribute("groupid");
502     m_clipManager->addClip(clip);
503     emit addProjectClip(clip);
504 }
505
506 void KdenliveDoc::addFolder(const QString foldername, int clipId, bool edit) {
507     emit addProjectFolder(foldername, clipId, false, edit);
508 }
509
510 void KdenliveDoc::deleteFolder(const QString foldername, int clipId) {
511     emit addProjectFolder(foldername, clipId, true);
512 }
513
514 void KdenliveDoc::deleteProjectClip(QList <int> ids) {
515     for (int i = 0; i < ids.size(); ++i) {
516         emit deletTimelineClip(ids.at(i));
517         m_clipManager->slotDeleteClip(ids.at(i));
518     }
519     setModified(true);
520 }
521
522 void KdenliveDoc::deleteProjectFolder(QMap <QString, int> map) {
523     QMapIterator<QString, int> i(map);
524     while (i.hasNext()) {
525         i.next();
526         slotDeleteFolder(i.key(), i.value());
527     }
528     setModified(true);
529 }
530
531 void KdenliveDoc::deleteClip(const uint clipId) {
532     emit signalDeleteProjectClip(clipId);
533     m_clipManager->deleteClip(clipId);
534 }
535
536 void KdenliveDoc::slotAddClipFile(const KUrl url, const QString group, const int groupId) {
537     kDebug() << "/////////  DOCUM, ADD CLP: " << url;
538     m_clipManager->slotAddClipFile(url, group, groupId);
539     setModified(true);
540 }
541
542 void KdenliveDoc::slotAddTextClipFile(const QString path, const QString group, const int groupId) {
543     kDebug() << "/////////  DOCUM, ADD TXT CLP: " << path;
544     m_clipManager->slotAddTextClipFile(path, group, groupId);
545     setModified(true);
546 }
547
548 void KdenliveDoc::slotAddFolder(const QString folderName) {
549     AddFolderCommand *command = new AddFolderCommand(this, folderName, m_clipManager->getFreeClipId(), true);
550     commandStack()->push(command);
551     setModified(true);
552 }
553
554 void KdenliveDoc::slotDeleteFolder(const QString folderName, const int id) {
555     AddFolderCommand *command = new AddFolderCommand(this, folderName, id, false);
556     commandStack()->push(command);
557     setModified(true);
558 }
559
560 void KdenliveDoc::slotEditFolder(const QString newfolderName, const QString oldfolderName, int clipId) {
561     EditFolderCommand *command = new EditFolderCommand(this, newfolderName, oldfolderName, clipId, false);
562     commandStack()->push(command);
563     setModified(true);
564 }
565
566 int KdenliveDoc::getFreeClipId() {
567     return m_clipManager->getFreeClipId();
568 }
569
570 DocClipBase *KdenliveDoc::getBaseClip(int clipId) {
571     return m_clipManager->getClipById(clipId);
572 }
573
574 void KdenliveDoc::slotAddColorClipFile(const QString name, const QString color, QString duration, const QString group, const int groupId) {
575     m_clipManager->slotAddColorClipFile(name, color, duration, group, groupId);
576     setModified(true);
577 }
578
579 void KdenliveDoc::slotAddSlideshowClipFile(const QString name, const QString path, int count, const QString duration, bool loop, const QString group, const int groupId) {
580     m_clipManager->slotAddSlideshowClipFile(name, path, count, duration, loop, group, groupId);
581     setModified(true);
582 }
583
584 void KdenliveDoc::slotCreateTextClip(QString group, int groupId) {
585     QString titlesFolder = projectFolder().path() + "/titles/";
586     KStandardDirs::makeDir(titlesFolder);
587     TitleWidget *dia_ui = new TitleWidget(KUrl(), titlesFolder, m_render, 0);
588     if (dia_ui->exec() == QDialog::Accepted) {
589         QString titleName = "title";
590         int counter = 0;
591         QString path = titlesFolder + titleName + QString::number(counter).rightJustified(3, '0', false);
592         while (QFile::exists(path + ".kdenlivetitle")) {
593             counter++;
594             path = titlesFolder + titleName + QString::number(counter).rightJustified(3, '0', false);
595         }
596         QPixmap pix = dia_ui->renderedPixmap();
597         pix.save(path + ".png");
598         dia_ui->saveTitle(path + ".kdenlivetitle");
599         slotAddTextClipFile(path, QString(), -1);
600     }
601     delete dia_ui;
602 }
603
604 void KdenliveDoc::editTextClip(QString path, int id) {
605     TitleWidget *dia_ui = new TitleWidget(KUrl(path + ".kdenlivetitle"), path, m_render, 0);
606     if (dia_ui->exec() == QDialog::Accepted) {
607         QPixmap pix = dia_ui->renderedPixmap();
608         pix.save(path + ".png");
609         dia_ui->saveTitle(path + ".kdenlivetitle");
610         //slotAddClipFile(KUrl("/tmp/kdenlivetitle.png"), QString(), -1);
611         emit refreshClipThumbnail(id);
612     }
613     delete dia_ui;
614 }
615
616
617 #include "kdenlivedoc.moc"
618