18#ifndef PLAYLISTCOMMANDS_H
19#define PLAYLISTCOMMANDS_H
21#include "models/playlistmodel.h"
22#include <QUndoCommand>
34class AppendCommand :
public QUndoCommand
37 AppendCommand(PlaylistModel &model,
const QString &xml,
bool emitModified =
true,
38 QUndoCommand *parent = 0);
42 PlaylistModel &m_model;
48class InsertCommand :
public QUndoCommand
51 InsertCommand(PlaylistModel &model,
const QString &xml,
int row, QUndoCommand *parent = 0);
55 PlaylistModel &m_model;
61class UpdateCommand :
public QUndoCommand
64 UpdateCommand(PlaylistModel &model,
const QString &xml,
int row, QUndoCommand *parent = 0);
72 bool mergeWith(
const QUndoCommand *other);
74 PlaylistModel &m_model;
81class RemoveCommand :
public QUndoCommand
84 RemoveCommand(PlaylistModel &model,
int row, QUndoCommand *parent = 0);
88 PlaylistModel &m_model;
94class MoveCommand :
public QUndoCommand
97 MoveCommand(PlaylistModel &model,
int from,
int to, QUndoCommand *parent = 0);
101 PlaylistModel &m_model;
106class ClearCommand :
public QUndoCommand
109 ClearCommand(PlaylistModel &model, QUndoCommand *parent = 0);
113 PlaylistModel &m_model;
115 QVector<QUuid> m_uuids;
118class SortCommand :
public QUndoCommand
121 SortCommand(PlaylistModel &model,
int column, Qt::SortOrder order, QUndoCommand *parent = 0);
125 PlaylistModel &m_model;
127 Qt::SortOrder m_order;
129 QVector<QUuid> m_uuids;
132class TrimClipInCommand :
public QUndoCommand
135 TrimClipInCommand(PlaylistModel &model,
int row,
int in, QUndoCommand *parent =
nullptr);
141 return UndoIdTrimClipIn;
143 bool mergeWith(
const QUndoCommand *other);
145 PlaylistModel &m_model;
152class TrimClipOutCommand :
public QUndoCommand
155 TrimClipOutCommand(PlaylistModel &model,
int row,
int out, QUndoCommand *parent =
nullptr);
161 return UndoIdTrimClipOut;
163 bool mergeWith(
const QUndoCommand *other);
165 PlaylistModel &m_model;
172class ReplaceCommand :
public QUndoCommand
175 ReplaceCommand(PlaylistModel &model,
const QString &xml,
int row, QUndoCommand *parent = 0);
179 PlaylistModel &m_model;