// make sure that the necessary folders exist
KStandardDirs::makeDir(m_projectFolder.path() + "/titles/");
KStandardDirs::makeDir(m_projectFolder.path() + "/thumbs/");
+ KStandardDirs::makeDir(m_projectFolder.path() + "/ladspa/");
m_scenelist = m_document.toString();
kDebug() << "KDEnnlive document, init timecode: " << m_fps;
bool KdenliveDoc::convertDocument(double version) {
kDebug() << "Opening a document with version " << version;
+ if (version == 0.81) return true;
+
// Opening a old Kdenlive document
- if (version == 0.5 || version == 0.7) {
+ if (version == 0.5 || version == 0.7 || version > 0.81) {
kDebug() << "Unable to open document with version " << version;
// TODO: convert 0.7 (0.5?) files to the new document format.
return FALSE;
void KdenliveDoc::moveProjectData(KUrl url) {
QList <DocClipBase*> list = m_clipManager->documentClipList();
+ //TODO: Also move ladspa effects files
for (int i = 0; i < list.count(); i++) {
DocClipBase *clip = list.at(i);
if (clip->clipType() == TEXT) {
QDomElement prod = doc.createElement("producer");
}
-QDomDocument KdenliveDoc::toXml() const {
+QDomDocument KdenliveDoc::toXml() {
return m_document;
}
pix.save(m_projectFolder.path() + "/thumbs/" + fileId + ".png");
}
+QString KdenliveDoc::getLadspaFile() const {
+ int ct = 0;
+ QString counter = QString::number(ct).rightJustified(5, '0', false);
+ while (QFile::exists(m_projectFolder.path() + "/ladspa/" + counter + ".ladspa")) {
+ ct++;
+ counter = QString::number(ct).rightJustified(5, '0', false);
+ }
+ return m_projectFolder.path() + "/ladspa/" + counter + ".ladspa";
+}
+
#include "kdenlivedoc.moc"