#include <KLocale>
LockTrackCommand::LockTrackCommand(CustomTrackView *view, int ix, bool lock, QUndoCommand * parent) :
- QUndoCommand(parent),
- m_view(view),
- m_ix(ix),
- m_lock(lock)
+ QUndoCommand(parent),
+ m_view(view),
+ m_ix(ix),
+ m_lock(lock)
{
- if (lock) setText(i18n("Lock track"));
- else setText(i18n("Unlock track"));
+ if (lock)
+ setText(i18n("Lock track"));
+ else
+ setText(i18n("Unlock track"));
}
#define LOCKTRACKCOMMAND_H
#include <QUndoCommand>
-#include <KDebug>
class CustomTrackView;
{
public:
LockTrackCommand(CustomTrackView *view, int ix, bool lock, QUndoCommand * parent = 0);
- virtual void undo();
- virtual void redo();
+ void undo();
+ void redo();
private:
CustomTrackView *m_view;
#include <KLocale>
-MoveClipCommand::MoveClipCommand(CustomTrackView *view, const ItemInfo &start, const ItemInfo &end, bool doIt, QUndoCommand * parent) :
- QUndoCommand(parent),
- m_view(view),
- m_startPos(start),
- m_endPos(end),
- m_doIt(doIt),
- m_success(true)
+MoveClipCommand::MoveClipCommand(CustomTrackView *view, const ItemInfo &start, const ItemInfo &end, bool doIt, QUndoCommand * parent)
+ : QUndoCommand(parent),
+ m_view(view),
+ m_startPos(start),
+ m_endPos(end),
+ m_doIt(doIt),
+ m_success(true)
{
setText(i18n("Move clip"));
if (parent) {
// command has a parent, so there are several operations ongoing, do not refresh monitor
m_refresh = false;
- } else m_refresh = true;
+ } else {
+ m_refresh = true;
+ }
}
void MoveClipCommand::redo()
{
if (m_doIt) {
-// qDebug() << "Executing move clip command. End now:" << m_endPos;
+ // qDebug() << "Executing move clip command. End now:" << m_endPos;
m_success = m_view->moveClip(m_startPos, m_endPos, m_refresh, &m_endPos);
-// qDebug() << "Move clip command executed. End now: " << m_endPos;
+ // qDebug() << "Move clip command executed. End now: " << m_endPos;
}
m_doIt = true;
}
{
public:
MoveClipCommand(CustomTrackView *view, const ItemInfo &start, const ItemInfo &end, bool doIt, QUndoCommand * parent = 0);
- virtual void undo();
- virtual void redo();
+ void undo();
+ void redo();
private:
CustomTrackView *m_view;
#include "customtrackview.h"
#include <KLocale>
+#include <KDebug>
MoveEffectCommand::MoveEffectCommand(CustomTrackView *view, const int track, const GenTime &pos, const QList<int> &oldPos, int newPos, QUndoCommand * parent) :
- QUndoCommand(parent),
- m_view(view),
- m_track(track),
- m_oldindex(oldPos),
- m_pos(pos)
+ QUndoCommand(parent),
+ m_view(view),
+ m_track(track),
+ m_oldindex(oldPos),
+ m_pos(pos)
{
for (int i = 0; i < m_oldindex.count(); ++i) {
- m_newindex << newPos + i;
+ m_newindex << newPos + i;
}
/* QString effectName;
QDomElement namenode = effect.firstChildElement("name");
#define MOVEEFFECTCOMMAND_H
#include <QUndoCommand>
-#include <KDebug>
#include <gentime.h>
-#include <QDomElement>
class CustomTrackView;
virtual int id() const;
virtual bool mergeWith(const QUndoCommand * command);
- virtual void undo();
- virtual void redo();
+ void undo();
+ void redo();
private:
CustomTrackView *m_view;
#include <KLocale>
MoveGroupCommand::MoveGroupCommand(CustomTrackView *view, const QList <ItemInfo> &startClip, const QList <ItemInfo> &startTransition, const GenTime &offset, const int trackOffset, bool doIt, QUndoCommand * parent) :
- QUndoCommand(parent),
- m_view(view),
- m_startClip(startClip),
- m_startTransition(startTransition),
- m_offset(offset),
- m_trackOffset(trackOffset),
- m_doIt(doIt)
+ QUndoCommand(parent),
+ m_view(view),
+ m_startClip(startClip),
+ m_startTransition(startTransition),
+ m_offset(offset),
+ m_trackOffset(trackOffset),
+ m_doIt(doIt)
{
setText(i18n("Move group"));
}
// virtual
void MoveGroupCommand::undo()
{
-// kDebug()<<"---- undoing action";
+ // kDebug()<<"---- undoing action";
m_doIt = true;
m_view->moveGroup(m_startClip, m_startTransition, GenTime() - m_offset, - m_trackOffset, true);
}
{
public:
MoveGroupCommand(CustomTrackView *view, const QList <ItemInfo> &startClip, const QList <ItemInfo> &startTransition, const GenTime &offset, const int trackOffset, bool doIt, QUndoCommand * parent = 0);
- virtual void undo();
- virtual void redo();
+ void undo();
+ void redo();
private:
CustomTrackView *m_view;
#include <KLocale>
MoveTransitionCommand::MoveTransitionCommand(CustomTrackView *view, const ItemInfo &start, const ItemInfo &end, bool doIt, QUndoCommand * parent) :
- QUndoCommand(parent),
- m_view(view),
- m_startPos(start),
- m_endPos(end),
- m_doIt(doIt)
+ QUndoCommand(parent),
+ m_view(view),
+ m_startPos(start),
+ m_endPos(end),
+ m_doIt(doIt)
{
setText(i18n("Move transition"));
if (parent) {
// virtual
void MoveTransitionCommand::undo()
{
-// kDebug()<<"---- undoing action";
+ // kDebug()<<"---- undoing action";
m_doIt = true;
m_view->moveTransition(m_endPos, m_startPos, m_refresh);
}
void MoveTransitionCommand::redo()
{
//kDebug() << "---- redoing action";
- if (m_doIt) m_view->moveTransition(m_startPos, m_endPos, m_refresh);
+ if (m_doIt)
+ m_view->moveTransition(m_startPos, m_endPos, m_refresh);
m_doIt = true;
}
{
public:
MoveTransitionCommand(CustomTrackView *view, const ItemInfo &start, const ItemInfo &end, bool doIt, QUndoCommand * parent = 0);
- virtual void undo();
- virtual void redo();
+ void undo();
+ void redo();
private:
CustomTrackView *m_view;
#include <KLocale>
RazorClipCommand::RazorClipCommand(CustomTrackView *view, const ItemInfo &info, EffectsList stack, const GenTime &cutTime, bool doIt, QUndoCommand * parent) :
- QUndoCommand(parent),
- m_view(view),
- m_info(info),
- m_cutTime(cutTime),
- m_doIt(doIt)
+ QUndoCommand(parent),
+ m_view(view),
+ m_info(info),
+ m_cutTime(cutTime),
+ m_doIt(doIt)
{
m_originalStack.clone(stack);
setText(i18n("Razor clip"));
{
// kDebug() << "---- redoing action cut: " << m_cutTime.frames(25);
if (m_doIt) {
- m_view->cutClip(m_info, m_cutTime, true);
+ m_view->cutClip(m_info, m_cutTime, true);
}
m_doIt = true;
}
{
public:
RazorClipCommand(CustomTrackView *view, const ItemInfo &info, EffectsList stack, const GenTime &cutTime, bool doIt = true, QUndoCommand * parent = 0);
- virtual void undo();
- virtual void redo();
+ void undo();
+ void redo();
private:
CustomTrackView *m_view;
#include "customtrackview.h"
RebuildGroupCommand::RebuildGroupCommand(CustomTrackView* view, int childTrack, const GenTime &childPos, QUndoCommand* parent) :
- QUndoCommand(parent),
- m_view(view),
- m_childTrack(childTrack),
- m_childPos(childPos)
+ QUndoCommand(parent),
+ m_view(view),
+ m_childTrack(childTrack),
+ m_childPos(childPos)
{
setText(i18n("Rebuild Group"));
}
{
public:
RebuildGroupCommand(CustomTrackView *view, int childTrack, const GenTime &childPos, QUndoCommand* parent = 0);
- virtual void undo();
- virtual void redo();
+ void undo();
+ void redo();
private:
CustomTrackView *m_view;
RefreshMonitorCommand::RefreshMonitorCommand(CustomTrackView *view, bool execute, bool refreshOnUndo, QUndoCommand * parent) :
- QUndoCommand(parent),
- m_view(view),
- m_exec(execute),
- m_execOnUndo(refreshOnUndo)
+ QUndoCommand(parent),
+ m_view(view),
+ m_exec(execute),
+ m_execOnUndo(refreshOnUndo)
{
}
// virtual
void RefreshMonitorCommand::undo()
{
- if (m_execOnUndo) m_view->monitorRefresh();
+ if (m_execOnUndo)
+ m_view->monitorRefresh();
}
// virtual
void RefreshMonitorCommand::redo()
{
if (m_exec && !m_execOnUndo)
- m_view->monitorRefresh();
+ m_view->monitorRefresh();
m_exec = true;
}
{
public:
RefreshMonitorCommand(CustomTrackView *view, bool execute, bool refreshOnUndo, QUndoCommand * parent = 0);
- virtual void undo();
- virtual void redo();
+ void undo();
+ void redo();
private:
CustomTrackView *m_view;
#include <KLocale>
ResizeClipCommand::ResizeClipCommand(CustomTrackView *view, const ItemInfo &start, const ItemInfo &end, bool doIt, bool dontWorry, QUndoCommand * parent) :
- QUndoCommand(parent),
- m_view(view),
- m_startPos(start),
- m_endPos(end),
- m_doIt(doIt),
- m_dontWorry(dontWorry)
+ QUndoCommand(parent),
+ m_view(view),
+ m_startPos(start),
+ m_endPos(end),
+ m_doIt(doIt),
+ m_dontWorry(dontWorry)
{
setText(i18n("Resize clip"));
}
void ResizeClipCommand::redo()
{
if (m_doIt) {
- m_view->resizeClip(m_startPos, m_endPos, m_dontWorry);
+ m_view->resizeClip(m_startPos, m_endPos, m_dontWorry);
}
m_doIt = true;
}
#define RESIZECLIPCOMMAND_H
#include <QUndoCommand>
-#include <QGraphicsView>
-#include <QPointF>
-
-#include <KDebug>
#include "definitions.h"
{
public:
ResizeClipCommand(CustomTrackView *view, const ItemInfo &start, const ItemInfo &end, bool doIt, bool dontWorry, QUndoCommand * parent = 0);
- virtual void undo();
- virtual void redo();
+ void undo();
+ void redo();
private:
CustomTrackView *m_view;
#include <KLocale>
SplitAudioCommand::SplitAudioCommand(CustomTrackView *view, const int track, const GenTime &pos, const EffectsList &effects, QUndoCommand * parent) :
- QUndoCommand(parent),
- m_view(view),
- m_pos(pos),
- m_track(track),
- m_effects(effects)
+ QUndoCommand(parent),
+ m_view(view),
+ m_pos(pos),
+ m_track(track),
+ m_effects(effects)
{
setText(i18n("Split audio"));
}
#define SPLITAUDIOCOMMAND_H
#include <QUndoCommand>
-#include <QGraphicsView>
-#include <QPointF>
-#include <KDebug>
#include "definitions.h"
class GenTime;
{
public:
SplitAudioCommand(CustomTrackView *view, const int track, const GenTime &pos, const EffectsList &effects, QUndoCommand * parent = 0);
- virtual void undo();
- virtual void redo();
+ void undo();
+ void redo();
private:
CustomTrackView *m_view;