18#ifndef FILTERCOMMANDS_H
19#define FILTERCOMMANDS_H
21#include "models/attachedfiltersmodel.h"
22#include <MltService.h>
23#include <MltProducer.h>
24#include <QUndoCommand>
29class FilterController;
40class AddCommand :
public QUndoCommand
48 AddCommand(AttachedFiltersModel &model,
const QString &name, Mlt::Service &service,
int row,
49 AddCommand::AddType type = AddCommand::AddSingle, QUndoCommand *parent = 0);
57 bool mergeWith(
const QUndoCommand *other);
59 AttachedFiltersModel &m_model;
60 std::vector<int> m_rows;
61 std::vector<Mlt::Service> m_services;
62 Mlt::Producer m_producer;
67class RemoveCommand :
public QUndoCommand
70 RemoveCommand(AttachedFiltersModel &model,
const QString &name, Mlt::Service &service,
int row,
71 QUndoCommand *parent = 0);
75 AttachedFiltersModel &m_model;
78 Mlt::Producer m_producer;
80 Mlt::Service m_service;
83class MoveCommand :
public QUndoCommand
86 MoveCommand(AttachedFiltersModel &model,
const QString &name,
int fromRow,
int toRow,
87 QUndoCommand *parent = 0);
96 AttachedFiltersModel &m_model;
99 Mlt::Producer m_producer;
100 QUuid m_producerUuid;
103class DisableCommand :
public QUndoCommand
106 DisableCommand(AttachedFiltersModel &model,
const QString &name,
int row,
bool disabled,
107 QUndoCommand *parent = 0);
113 return UndoIdDisable;
115 bool mergeWith(
const QUndoCommand *other);
117 AttachedFiltersModel &m_model;
119 Mlt::Producer m_producer;
120 QUuid m_producerUuid;
124class ChangeParameterCommand :
public QUndoCommand
127 ChangeParameterCommand(
const QString &name, FilterController *controller,
int row,
128 QUndoCommand *parent = 0);
129 void update(
const QString &propertyName);
137 bool mergeWith(
const QUndoCommand *other);
140 QUuid m_producerUuid;
141 Mlt::Properties m_before;
142 Mlt::Properties m_after;
143 FilterController *m_filterController;