X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fdocclipbase.cpp;h=938cdb7eac00f470c70ddaef524eac27a1cb3572;hb=99b80a55e3f38ddeea74cbddaeca932c186cc8ad;hp=1a2dda8ffbce1e6cae569f8bb739eeb41e2dfe72;hpb=efa3eb3a43aeaee3a66956e5fe791260739b8aaf;p=kdenlive
diff --git a/src/docclipbase.cpp b/src/docclipbase.cpp
index 1a2dda8f..938cdb7e 100644
--- a/src/docclipbase.cpp
+++ b/src/docclipbase.cpp
@@ -74,7 +74,6 @@ DocClipBase::DocClipBase(ClipManager *clipManager, QDomElement xml, const QStrin
m_metadata.insert(e.attribute("name").section('.', 2), QStringList() << e.firstChild().nodeValue() << e.attribute("tool"));
}
}
-
if (xml.hasAttribute("cutzones")) {
QStringList cuts = xml.attribute("cutzones").split(';', QString::SkipEmptyParts);
for (int i = 0; i < cuts.count(); i++) {
@@ -300,6 +299,57 @@ QDomElement DocClipBase::toXML(bool hideTemporaryProperties) const
return doc.documentElement();
}
+const QString DocClipBase::shortInfo() const
+{
+
+ QString info;
+ if (m_clipType == AV || m_clipType == VIDEO || m_clipType == IMAGE || m_clipType == PLAYLIST) {
+ info = m_properties.value("frame_size") + " ";
+ if (m_properties.contains("fps")) {
+ info.append(i18n("%1 fps", m_properties.value("fps").left(5)));
+ }
+ if (!info.simplified().isEmpty()) info.prepend(" - ");
+ }
+ else if (m_clipType == AUDIO) {
+ info = " - " + m_properties.value("frequency") + i18n("Hz");
+ }
+ QString tip = "";
+ switch (m_clipType) {
+ case AUDIO:
+ tip.append(i18n("Audio clip") + "" + info + "
" + fileURL().path());
+ break;
+ case VIDEO:
+ tip.append(i18n("Mute video clip") + "" + info + "
" + fileURL().path());
+ break;
+ case AV:
+ tip.append(i18n("Video clip") + "" + info + "
" + fileURL().path());
+ break;
+ case COLOR:
+ tip.append(i18n("Color clip"));
+ break;
+ case IMAGE:
+ tip.append(i18n("Image clip") + "" + info + "
" + fileURL().path());
+ break;
+ case TEXT:
+ if (!fileURL().isEmpty() && getProperty("xmldata").isEmpty()) tip.append(i18n("Template text clip") + "
" + fileURL().path());
+ else tip.append(i18n("Text clip") + "
" + fileURL().path());
+ break;
+ case SLIDESHOW:
+ tip.append(i18n("Slideshow clip") + "
" + fileURL().directory());
+ break;
+ case VIRTUAL:
+ tip.append(i18n("Virtual clip"));
+ break;
+ case PLAYLIST:
+ tip.append(i18n("Playlist clip") + "" + info + "
" + fileURL().path());
+ break;
+ default:
+ tip.append(i18n("Unknown clip"));
+ break;
+ }
+ return tip;
+}
+
void DocClipBase::setAudioThumbCreated(bool isDone)
{