1 /***************************************************************************
2 addextradatacommand.cpp - description
5 copyright : (C) 2012 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 "addextradatacommand.h"
20 #include "customtrackview.h"
22 #include <KLocalizedString>
24 AddExtraDataCommand::AddExtraDataCommand(CustomTrackView *view, const QString&id, const QString&key, const QString &oldData, const QString &newData, QUndoCommand * parent) :
32 if (m_newData.isEmpty())
33 setText(i18n("Delete data"));
35 setText(i18n("Add data"));
40 void AddExtraDataCommand::undo()
42 m_view->addData(m_id, m_key, m_oldData);
45 void AddExtraDataCommand::redo()
47 m_view->addData(m_id, m_key, m_newData);