#include "commands/movetransitioncommand.h"
#include "commands/resizeclipcommand.h"
#include "commands/editguidecommand.h"
+#include "commands/addextradatacommand.h"
#include "commands/addtimelineclipcommand.h"
#include "commands/addeffectcommand.h"
#include "commands/editeffectcommand.h"
}
}
+void CustomTrackView::slotAddClipExtraData(const QString &id, const QString &key, const QString &data, QUndoCommand *groupCommand)
+{
+ DocClipBase *base = m_document->clipManager()->getClipById(id);
+ if (!base) return;
+ QMap <QString, QString> extraData = base->analysisData();
+ QString oldData = extraData.value(key);
+ AddExtraDataCommand *command = new AddExtraDataCommand(this, id, key, oldData, data, groupCommand);
+ if (!groupCommand) m_commandStack->push(command);
+}
+
void CustomTrackView::slotAddClipMarker(const QString &id, CommentedTime newMarker, QUndoCommand *groupCommand)
{
CommentedTime oldMarker = m_document->clipManager()->getClipById(id)->markerAt(newMarker.time());
void CustomTrackView::addMarker(const QString &id, const CommentedTime marker)
{
DocClipBase *base = m_document->clipManager()->getClipById(id);
+ if (base == NULL) return;
if (marker.markerType() < 0) base->deleteSnapMarker(marker.time());
else base->addSnapMarker(marker);
emit updateClipMarkers(base);
viewport()->update();
}
+void CustomTrackView::addData(const QString &id, const QString &key, const QString &data)
+{
+ DocClipBase *base = m_document->clipManager()->getClipById(id);
+ if (base == NULL) return;
+ base->setAnalysisData(key, data);
+ emit updateClipExtraData(base);
+ setDocumentModified();
+ viewport()->update();
+}
+
int CustomTrackView::hasGuide(int pos, int offset)
{
for (int i = 0; i < m_guides.count(); i++) {