1 #ifndef ADDCLIPCOMMAND_H
2 #define ADDCLIPCOMMAND_H
4 #include <QUndoCommand>
7 #include "projectlist.h"
9 class AddClipCommand : public QUndoCommand
12 AddClipCommand(ProjectList *list, const QStringList &names, const QDomElement &xml, const int id, const KUrl &url, bool doIt)
13 : m_list(list), m_names(names), m_xml(xml), m_id(id), m_url(url), m_doIt(doIt) {
14 if (doIt) setText(i18n("Add clip"));
15 else setText(i18n("Delete clip"));
19 kDebug()<<"---- undoing action";
20 if (m_doIt) m_list->deleteClip(m_id);
21 else m_list->addClip(m_names, m_xml, m_id, m_url);
25 kDebug()<<"---- redoing action";
26 if (m_doIt) m_list->addClip(m_names, m_xml, m_id, m_url);
27 else m_list->deleteClip(m_id);