]> git.sesse.net Git - kdenlive/blobdiff - src/docclipbase.cpp
*Re-introduce slideshow clips
[kdenlive] / src / docclipbase.cpp
index 5b85e6cc22c9d7ed88057c398c3a61e48dd6fdae..1142ba1a289c203e50b833e868d7d60ae5ef498b 100644 (file)
@@ -156,6 +156,14 @@ const GenTime &DocClipBase::duration() const {
     return m_duration;
 }
 
+const GenTime &DocClipBase::maxDuration() const {
+    if (m_clipType == COLOR || m_clipType == IMAGE || m_clipType == TEXT || (m_clipType == SLIDESHOW &&  m_properties.value("loop") == "1")) {
+       GenTime dur(10000, KdenliveSettings::project_fps());
+       return dur;
+    }
+    return m_duration;
+}
+
 bool DocClipBase::hasFileSize() const {
     return true;
 }
@@ -367,11 +375,14 @@ void DocClipBase::setProperties(QMap <QString, QString> properties) {
     }
 }
 
+void DocClipBase::setProperty(QString key, QString value) {
+    m_properties.insert(key, value);
+}
+
 QMap <QString, QString> DocClipBase::properties() const {
     return m_properties;
 }
 
-
 void DocClipBase::slotGetAudioThumbs() {
 
     if (m_audioThumbCreated) {