]> git.sesse.net Git - kdenlive/blobdiff - src/projectlist.cpp
Add center-crop option to slideshow clip.
[kdenlive] / src / projectlist.cpp
index b3ede704f21c2561b601e4e5b5afb33bae799841..8b2d0aa5d1dc7a9f69f083a0f1cc690abc469833 100644 (file)
@@ -1091,9 +1091,10 @@ void ProjectList::slotAddClip(const QList <QUrl> givenList, const QString &group
             if (fileName.at(fileName.size() - 1).isDigit()) {
                 KFileItem item(KFileItem::Unknown, KFileItem::Unknown, url);
                 if (item.mimetype().startsWith("image")) {
-                    int count = SlideshowClip::sequenceCount(url);
+                    int count = 0;
                     // import as sequence if we found at least 5 images in the sequence
-                    if (count > 4) {
+                    QString pattern = SlideshowClip::selectedPath(url.path(), false, QString(), &count);
+                    if (count > 1) {
                         delete d;
                         QStringList groupInfo = getGroup();
 
@@ -1101,11 +1102,8 @@ void ProjectList::slotAddClip(const QList <QUrl> givenList, const QString &group
                         while (fileName.at(fileName.size() - 1).isDigit()) {
                             fileName.chop(1);
                         }
-                        QString folder = url.directory(KUrl::AppendTrailingSlash);
-                        QString ext = url.path().section('.', -1);
-                        folder.append(fileName + "%d." + ext);
 
-                        m_doc->slotCreateSlideshowClipFile(fileName, folder, count, m_timecode.reformatSeparators(KdenliveSettings::sequence_duration()), false, false, m_timecode.getTimecodeFromFrames(int(ceil(m_timecode.fps()))), QString(), 0, groupInfo.at(0), groupInfo.at(1));
+                        m_doc->slotCreateSlideshowClipFile(fileName, pattern, count, m_timecode.reformatSeparators(KdenliveSettings::sequence_duration()), false, false, false, m_timecode.getTimecodeFromFrames(int(ceil(m_timecode.fps()))), QString(), 0, groupInfo.at(0), groupInfo.at(1));
                         return;
                     }
                 }
@@ -1193,7 +1191,7 @@ void ProjectList::slotAddSlideshowClip()
 
     if (dia->exec() == QDialog::Accepted) {
         QStringList groupInfo = getGroup();
-        m_doc->slotCreateSlideshowClipFile(dia->clipName(), dia->selectedPath(), dia->imageCount(), dia->clipDuration(), dia->loop(), dia->fade(),
+        m_doc->slotCreateSlideshowClipFile(dia->clipName(), dia->selectedPath(), dia->imageCount(), dia->clipDuration(), dia->loop(), dia->crop(), dia->fade(),
                                            dia->lumaDuration(), dia->lumaFile(), dia->softness(), groupInfo.at(0), groupInfo.at(1));
     }
     delete dia;
@@ -1303,7 +1301,7 @@ QDomElement ProjectList::producersList()
     QDomDocument doc;
     QDomElement prods = doc.createElement("producerlist");
     doc.appendChild(prods);
-    kDebug() << "////////////  PRO LIST BUILD PRDSLIST ";
+    kDebug() << "////////////  PRO LIST BUILD PRDSLIST ";
     QTreeWidgetItemIterator it(m_listView);
     while (*it) {
         if ((*it)->type() != PROJECTCLIPTYPE) {