#include "editeffectcommand.h"
EditEffectCommand::EditEffectCommand(CustomTrackView *view, const int track, GenTime pos, QDomElement oldeffect, QDomElement effect, bool doIt)
- : m_view(view), m_track(track), m_pos(pos), m_oldeffect(oldeffect), m_doIt(doIt) {
- m_effect = effect.cloneNode().toElement();
- setText(i18n("Edit effect"));
- }
+ : m_view(view), m_track(track), m_pos(pos), m_oldeffect(oldeffect), m_doIt(doIt) {
+ m_effect = effect.cloneNode().toElement();
+ setText(i18n("Edit effect"));
+}
// virtual
-int EditEffectCommand::id() const
-{
- return 1;
+int EditEffectCommand::id() const {
+ return 1;
}
// virtual
-bool EditEffectCommand::mergeWith ( const QUndoCommand * other )
-{
- if (other->id() != id()) return false;
- if (m_track != static_cast<const EditEffectCommand*>(other)->m_track) return false;
- if (m_pos != static_cast<const EditEffectCommand*>(other)->m_pos) return false;
- m_effect = static_cast<const EditEffectCommand*>(other)->m_effect;
- return true;
+bool EditEffectCommand::mergeWith(const QUndoCommand * other) {
+ if (other->id() != id()) return false;
+ if (m_track != static_cast<const EditEffectCommand*>(other)->m_track) return false;
+ if (m_pos != static_cast<const EditEffectCommand*>(other)->m_pos) return false;
+ m_effect = static_cast<const EditEffectCommand*>(other)->m_effect;
+ return true;
}
-// virtual
-void EditEffectCommand::undo()
-{
-kDebug()<<"---- undoing action";
- m_view->updateEffect(m_track, m_pos, m_oldeffect);
+// virtual
+void EditEffectCommand::undo() {
+ kDebug() << "---- undoing action";
+ m_view->updateEffect(m_track, m_pos, m_oldeffect);
}
-// virtual
-void EditEffectCommand::redo()
-{
-kDebug()<<"---- redoing action";
- m_view->updateEffect(m_track, m_pos, m_effect);
+// virtual
+void EditEffectCommand::redo() {
+ kDebug() << "---- redoing action";
+ m_view->updateEffect(m_track, m_pos, m_effect);
}
#include "editeffectcommand.moc"