-AddTimelineClipCommand::AddTimelineClipCommand(CustomTrackView *view, QDomElement xml, int track, int startpos, QRectF rect, int duration, bool doIt)
- : m_view(view), m_xml(xml), m_clipTrack(track), m_clipPos(startpos), m_clipRect(rect), m_clipDuration(duration), m_doIt(doIt) {
- setText(i18n("Add timeline clip"));
- }
+AddTimelineClipCommand::AddTimelineClipCommand(CustomTrackView *view, QDomElement xml, const QString &clipId, ItemInfo info, EffectsList effects, bool overwrite, bool push, bool doIt, bool doRemove, QUndoCommand * parent) :
+ QUndoCommand(parent),
+ m_view(view),
+ m_clipInfo(info),
+ m_effects(effects),
+ m_clipId(clipId),
+ m_xml(xml),
+ m_doIt(doIt),
+ m_remove(doRemove),
+ m_overwrite(overwrite),
+ m_push(push)
+{
+ if (!m_remove) setText(i18n("Add timeline clip"));
+ else setText(i18n("Delete timeline clip"));
+ if (parent) {
+ // command has a parent, so there are several operations ongoing, do not refresh monitor
+ m_refresh = false;
+ } else m_refresh = true;
+}