1 /***************************************************************************
2 editkeyframecommand.cpp - description
5 copyright : (C) 2008 by Jean-Baptiste Mardelle
6 email : jb@kdenlive.org
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
19 #include "editkeyframecommand.h"
20 #include "customtrackview.h"
22 #include <KLocalizedString>
24 EditKeyFrameCommand::EditKeyFrameCommand(CustomTrackView *view, const int track, const GenTime &pos, const int effectIndex, const QString& oldkeyframes, const QString& newkeyframes, bool doIt) :
27 m_oldkfr(oldkeyframes),
28 m_newkfr(newkeyframes),
34 int prev = m_oldkfr.split(QLatin1Char(';'), QString::SkipEmptyParts).count();
35 int next = m_newkfr.split(QLatin1Char(';'), QString::SkipEmptyParts).count();
37 setText(i18n("Edit keyframe"));
39 setText(i18n("Delete keyframe"));
41 setText(i18n("Add keyframe"));
42 //kDebug() << "/// CREATE GUIDE COMMAND, TIMES: " << m_oldPos.frames(25) << "x" << m_pos.frames(25);
47 void EditKeyFrameCommand::undo()
49 m_view->editKeyFrame(m_pos, m_track, m_index, m_oldkfr);
53 void EditKeyFrameCommand::redo()
56 m_view->editKeyFrame(m_pos, m_track, m_index, m_newkfr);