1 /***************************************************************************
2 addtransitioncommand.cpp - description
5 copyright : (C) 2008 by Marco Gittler
6 email : g.marco@freenet.de
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 "addtransitioncommand.h"
20 #include "customtrackview.h"
24 AddTransitionCommand::AddTransitionCommand(CustomTrackView *view, ItemInfo info, int transitiontrack, QDomElement params, bool remove, bool doIt, QUndoCommand * parent) :
29 m_track(transitiontrack),
33 if (m_remove) setText(i18n("Delete transition from clip"));
34 else setText(i18n("Add transition to clip"));
39 void AddTransitionCommand::undo()
41 if (m_remove) m_view->addTransition(m_info, m_track, m_params);
42 else m_view->deleteTransition(m_info, m_track, m_params);
45 void AddTransitionCommand::redo()
48 if (m_remove) m_view->deleteTransition(m_info, m_track, m_params);
49 else m_view->addTransition(m_info, m_track, m_params);