]> git.sesse.net Git - kdenlive/blobdiff - src/markerdialog.cpp
Clip markers can now have a category that is shown as a color.
[kdenlive] / src / markerdialog.cpp
index a3935e5ad396d1d72224b465616c6caaa13f2b1b..5846662f56104bf8e62765a4779d4659516032a3 100644 (file)
@@ -36,6 +36,13 @@ MarkerDialog::MarkerDialog(DocClipBase *clip, CommentedTime t, Timecode tc, cons
     setupUi(this);
     setWindowTitle(caption);
 
+    // Set  up categories
+    for (int i = 0; i < 5; ++i) {
+         marker_type->insertItem(i, i18n("Category %1", i));
+         marker_type->setItemData(i, CommentedTime::markerColor(i), Qt::DecorationRole);
+     }
+    marker_type->setCurrentIndex(t.markerType());
+
     m_in = new TimecodeDisplay(tc, this);
     inputLayout->addWidget(m_in);
     m_in->setValue(t.time());
@@ -121,7 +128,7 @@ void MarkerDialog::slotUpdateThumb()
 
 CommentedTime MarkerDialog::newMarker()
 {
-    return CommentedTime(m_in->gentime(), marker_comment->text());
+    return CommentedTime(m_in->gentime(), marker_comment->text(), marker_type->currentIndex());
 }
 
 #include "markerdialog.moc"