revamped undo system in preparation for marker support
This commit is contained in:
+2
-2
@@ -99,8 +99,8 @@ void Clip::reset_audio() {
|
||||
case MEDIA_TYPE_SEQUENCE:
|
||||
{
|
||||
Sequence* nested_sequence = static_cast<Sequence*>(media);
|
||||
for (int i=0;i<nested_sequence->clip_count();i++) {
|
||||
Clip* c = nested_sequence->get_clip(i);
|
||||
for (int i=0;i<nested_sequence->clips.size();i++) {
|
||||
Clip* c = nested_sequence->clips.at(i);
|
||||
if (c != NULL) c->reset_audio();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
#include "marker.h"
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef MARKER_H
|
||||
#define MARKER_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
struct Marker {
|
||||
long frame;
|
||||
QString name;
|
||||
};
|
||||
|
||||
#endif // MARKER_H
|
||||
+12
-31
@@ -26,38 +26,24 @@ Sequence* Sequence::copy() {
|
||||
s->frame_rate = frame_rate;
|
||||
s->audio_frequency = audio_frequency;
|
||||
s->audio_layout = audio_layout;
|
||||
for (int i=0;i<clip_count();i++) {
|
||||
Clip* c = get_clip(i);
|
||||
if (c != NULL) {
|
||||
s->clips.resize(clips.size());
|
||||
for (int i=0;i<clips.size();i++) {
|
||||
Clip* c = clips.at(i);
|
||||
if (c == NULL) {
|
||||
s->clips[i] = NULL;
|
||||
} else {
|
||||
Clip* copy = c->copy(s);
|
||||
copy->linked = c->linked;
|
||||
s->add_clip(copy);
|
||||
s->clips[i] = copy;
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
int Sequence::add_clip(Clip* c) {
|
||||
clips.append(c);
|
||||
return clip_count() - 1;
|
||||
}
|
||||
|
||||
int Sequence::clip_count() {
|
||||
return clips.size();
|
||||
}
|
||||
|
||||
Clip* Sequence::get_clip(int i) {
|
||||
return clips.at(i);
|
||||
}
|
||||
|
||||
void Sequence::replace_clip(int i, Clip* c) {
|
||||
clips[i] = c;
|
||||
}
|
||||
|
||||
long Sequence::getEndFrame() {
|
||||
long end = 0;
|
||||
for (int j=0;j<clip_count();j++) {
|
||||
Clip* c = get_clip(j);
|
||||
for (int j=0;j<clips.size();j++) {
|
||||
Clip* c = clips.at(j);
|
||||
if (c != NULL && c->timeline_out > end) {
|
||||
end = c->timeline_out;
|
||||
}
|
||||
@@ -65,16 +51,11 @@ long Sequence::getEndFrame() {
|
||||
return end;
|
||||
}
|
||||
|
||||
void Sequence::destroy_clip(int i, bool del) {
|
||||
if (del) delete clips.at(i);
|
||||
clips.removeAt(i);
|
||||
}
|
||||
|
||||
void Sequence::get_track_limits(int* video_tracks, int* audio_tracks) {
|
||||
void Sequence::getTrackLimits(int* video_tracks, int* audio_tracks) {
|
||||
int vt = 0;
|
||||
int at = 0;
|
||||
for (int j=0;j<clip_count();j++) {
|
||||
Clip* c = get_clip(j);
|
||||
for (int j=0;j<clips.size();j++) {
|
||||
Clip* c = clips.at(j);
|
||||
if (c != NULL) {
|
||||
if (c->track < 0 && c->track < vt) { // video clip
|
||||
vt = c->track;
|
||||
|
||||
+6
-8
@@ -4,19 +4,15 @@
|
||||
#include <QVector>
|
||||
|
||||
#include "project/clip.h"
|
||||
#include "project/marker.h"
|
||||
|
||||
struct Sequence {
|
||||
public:
|
||||
Sequence();
|
||||
~Sequence();
|
||||
Sequence* copy();
|
||||
QString name;
|
||||
int add_clip(Clip* c);
|
||||
int clip_count();
|
||||
Clip* get_clip(int i);
|
||||
void replace_clip(int i, Clip* c);
|
||||
void get_track_limits(int* video_tracks, int* audio_tracks);
|
||||
void destroy_clip(int i, bool del);
|
||||
QString name;
|
||||
void getTrackLimits(int* video_tracks, int* audio_tracks);
|
||||
long getEndFrame();
|
||||
int width;
|
||||
int height;
|
||||
@@ -29,8 +25,10 @@ public:
|
||||
long workarea_out;
|
||||
|
||||
int save_id;
|
||||
private:
|
||||
|
||||
QVector<Marker> markers;
|
||||
QVector<Clip*> clips;
|
||||
private:
|
||||
};
|
||||
|
||||
// static variable for the currently active sequence
|
||||
|
||||
+366
-13
@@ -20,15 +20,368 @@
|
||||
|
||||
QUndoStack undo_stack;
|
||||
|
||||
#define TA_IN 0
|
||||
#define TA_OUT 1
|
||||
#define TA_CLIP_IN 2
|
||||
#define TA_TRACK 3
|
||||
#define TA_DELETE 4
|
||||
#define TA_ADD_IN 5
|
||||
#define TA_ADD_OUT 6
|
||||
#define TA_ADD_CLIP_IN 7
|
||||
#define TA_ADD_TRACK 8
|
||||
ComboAction::ComboAction() {}
|
||||
|
||||
ComboAction::~ComboAction() {
|
||||
for (int i=0;i<commands.size();i++) {
|
||||
delete commands.at(i);
|
||||
}
|
||||
}
|
||||
|
||||
void ComboAction::undo() {
|
||||
for (int i=commands.size()-1;i>=0;i--) {
|
||||
commands.at(i)->undo();
|
||||
}
|
||||
}
|
||||
|
||||
void ComboAction::redo() {
|
||||
for (int i=0;i<commands.size();i++) {
|
||||
commands.at(i)->redo();
|
||||
}
|
||||
}
|
||||
|
||||
void ComboAction::append(QUndoCommand* u) {
|
||||
commands.append(u);
|
||||
}
|
||||
|
||||
MoveClipAction::MoveClipAction(Clip *c, long iin, long iout, long iclip_in, int itrack) :
|
||||
clip(c),
|
||||
new_in(iin),
|
||||
new_out(iout),
|
||||
new_clip_in(iclip_in),
|
||||
new_track(itrack)
|
||||
{}
|
||||
|
||||
void MoveClipAction::undo() {
|
||||
clip->timeline_in = old_in;
|
||||
clip->timeline_out = old_out;
|
||||
clip->clip_in = old_clip_in;
|
||||
clip->track = old_track;
|
||||
}
|
||||
|
||||
void MoveClipAction::redo() {
|
||||
old_in = clip->timeline_in;
|
||||
old_out = clip->timeline_out;
|
||||
old_clip_in = clip->clip_in;
|
||||
old_track = clip->track;
|
||||
|
||||
clip->timeline_in = new_in;
|
||||
clip->timeline_out = new_out;
|
||||
clip->clip_in = new_clip_in;
|
||||
clip->track = new_track;
|
||||
}
|
||||
|
||||
DeleteClipAction::DeleteClipAction(Sequence* s, int clip) :
|
||||
seq(s),
|
||||
index(clip)
|
||||
{}
|
||||
|
||||
DeleteClipAction::~DeleteClipAction() {
|
||||
if (ref != NULL) delete ref;
|
||||
}
|
||||
|
||||
void DeleteClipAction::undo() {
|
||||
seq->clips[index] = ref;
|
||||
ref = NULL;
|
||||
}
|
||||
|
||||
void DeleteClipAction::redo() {
|
||||
ref = seq->clips.at(index);
|
||||
seq->clips[index] = NULL;
|
||||
}
|
||||
|
||||
ChangeSequenceAction::ChangeSequenceAction(Sequence* s) :
|
||||
new_sequence(s)
|
||||
{}
|
||||
|
||||
void ChangeSequenceAction::undo() {
|
||||
set_sequence(old_sequence);
|
||||
}
|
||||
|
||||
void ChangeSequenceAction::redo() {
|
||||
old_sequence = sequence;
|
||||
set_sequence(new_sequence);
|
||||
}
|
||||
|
||||
SetTimelineInOutCommand::SetTimelineInOutCommand(Sequence *s, bool enabled, long in, long out) :
|
||||
seq(s),
|
||||
new_enabled(enabled),
|
||||
new_in(in),
|
||||
new_out(out)
|
||||
{}
|
||||
|
||||
void SetTimelineInOutCommand::undo() {
|
||||
seq->using_workarea = old_enabled;
|
||||
seq->workarea_in = old_in;
|
||||
seq->workarea_out = old_out;
|
||||
}
|
||||
|
||||
void SetTimelineInOutCommand::redo() {
|
||||
old_enabled = seq->using_workarea;
|
||||
old_in = seq->workarea_in;
|
||||
old_out = seq->workarea_out;
|
||||
|
||||
seq->using_workarea = new_enabled;
|
||||
seq->workarea_in = new_in;
|
||||
seq->workarea_out = new_out;
|
||||
}
|
||||
|
||||
AddEffectCommand::AddEffectCommand(Clip* c, int ieffect) :
|
||||
clip(c),
|
||||
effect(ieffect),
|
||||
ref(NULL),
|
||||
done(false)
|
||||
{}
|
||||
|
||||
AddEffectCommand::~AddEffectCommand() {
|
||||
if (!done && ref != NULL) delete ref;
|
||||
}
|
||||
|
||||
void AddEffectCommand::undo() {
|
||||
clip->effects.removeLast();
|
||||
done = false;
|
||||
}
|
||||
|
||||
void AddEffectCommand::redo() {
|
||||
if (ref == NULL) {
|
||||
ref = create_effect(effect, clip);
|
||||
}
|
||||
clip->effects.append(ref);
|
||||
done = true;
|
||||
}
|
||||
|
||||
AddTransitionCommand::AddTransitionCommand(Clip* c, int itransition, int itype) :
|
||||
clip(c),
|
||||
transition(itransition),
|
||||
type(itype)
|
||||
{}
|
||||
|
||||
void AddTransitionCommand::undo() {
|
||||
if (type == TA_OPENING_TRANSITION) {
|
||||
delete clip->opening_transition;
|
||||
clip->opening_transition = NULL;
|
||||
} else {
|
||||
delete clip->closing_transition;
|
||||
clip->closing_transition = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void AddTransitionCommand::redo() {
|
||||
if (type == TA_OPENING_TRANSITION) {
|
||||
clip->opening_transition = create_transition(transition, clip);
|
||||
} else {
|
||||
clip->closing_transition = create_transition(transition, clip);
|
||||
}
|
||||
}
|
||||
|
||||
ModifyTransitionCommand::ModifyTransitionCommand(Clip* c, int itype, long ilength) :
|
||||
clip(c),
|
||||
type(itype),
|
||||
new_length(ilength)
|
||||
{}
|
||||
|
||||
void ModifyTransitionCommand::undo() {
|
||||
if (type == TA_OPENING_TRANSITION) {
|
||||
clip->opening_transition->length = old_length;
|
||||
} else {
|
||||
clip->closing_transition->length = old_length;
|
||||
}
|
||||
}
|
||||
|
||||
void ModifyTransitionCommand::redo() {
|
||||
if (type == TA_OPENING_TRANSITION) {
|
||||
old_length = clip->opening_transition->length;
|
||||
clip->opening_transition->length = new_length;
|
||||
} else {
|
||||
old_length = clip->closing_transition->length;
|
||||
clip->closing_transition->length = new_length;
|
||||
}
|
||||
}
|
||||
|
||||
DeleteTransitionCommand::DeleteTransitionCommand(Clip* c, int itype) :
|
||||
clip(c),
|
||||
type(itype),
|
||||
transition(NULL)
|
||||
{}
|
||||
|
||||
DeleteTransitionCommand::~DeleteTransitionCommand() {
|
||||
if (transition != NULL) delete transition;
|
||||
}
|
||||
|
||||
void DeleteTransitionCommand::undo() {
|
||||
if (type == TA_OPENING_TRANSITION) {
|
||||
clip->opening_transition = transition;
|
||||
} else {
|
||||
clip->closing_transition = transition;
|
||||
}
|
||||
transition = NULL;
|
||||
}
|
||||
|
||||
void DeleteTransitionCommand::redo() {
|
||||
if (type == TA_OPENING_TRANSITION) {
|
||||
transition = clip->opening_transition;
|
||||
clip->opening_transition = NULL;
|
||||
} else {
|
||||
transition = clip->closing_transition;
|
||||
clip->closing_transition = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
NewSequenceCommand::NewSequenceCommand(QTreeWidgetItem *s, QTreeWidgetItem* iparent) :
|
||||
seq(s),
|
||||
parent(iparent),
|
||||
done(false)
|
||||
{}
|
||||
|
||||
NewSequenceCommand::~NewSequenceCommand() {
|
||||
if (!done) delete seq;
|
||||
}
|
||||
|
||||
void NewSequenceCommand::undo() {
|
||||
if (parent == NULL) {
|
||||
panel_project->source_table->takeTopLevelItem(panel_project->source_table->indexOfTopLevelItem(seq));
|
||||
} else {
|
||||
parent->removeChild(seq);
|
||||
}
|
||||
done = false;
|
||||
}
|
||||
|
||||
void NewSequenceCommand::redo() {
|
||||
if (parent == NULL) {
|
||||
panel_project->source_table->addTopLevelItem(seq);
|
||||
} else {
|
||||
parent->addChild(seq);
|
||||
}
|
||||
done = true;
|
||||
}
|
||||
|
||||
AddMediaCommand::AddMediaCommand(QTreeWidgetItem* iitem, QTreeWidgetItem* iparent) :
|
||||
item(iitem),
|
||||
parent(iparent),
|
||||
done(false)
|
||||
{}
|
||||
|
||||
AddMediaCommand::~AddMediaCommand() {
|
||||
if (!done) {
|
||||
panel_project->delete_media(item);
|
||||
delete item;
|
||||
}
|
||||
}
|
||||
|
||||
void AddMediaCommand::undo() {
|
||||
if (parent == NULL) {
|
||||
panel_project->source_table->takeTopLevelItem(panel_project->source_table->indexOfTopLevelItem(item));
|
||||
} else {
|
||||
parent->removeChild(item);
|
||||
}
|
||||
done = false;
|
||||
}
|
||||
|
||||
void AddMediaCommand::redo() {
|
||||
if (parent == NULL) {
|
||||
panel_project->source_table->addTopLevelItem(item);
|
||||
} else {
|
||||
parent->addChild(item);
|
||||
}
|
||||
done = true;
|
||||
}
|
||||
|
||||
DeleteMediaCommand::DeleteMediaCommand(QTreeWidgetItem* i) :
|
||||
item(i)
|
||||
{}
|
||||
|
||||
DeleteMediaCommand::~DeleteMediaCommand() {
|
||||
panel_project->delete_media(item);
|
||||
delete item;
|
||||
}
|
||||
|
||||
void DeleteMediaCommand::undo() {
|
||||
if (parent == NULL) {
|
||||
panel_project->source_table->addTopLevelItem(item);
|
||||
} else {
|
||||
parent->addChild(item);
|
||||
}
|
||||
}
|
||||
|
||||
void DeleteMediaCommand::redo() {
|
||||
parent = item->parent();
|
||||
|
||||
if (parent == NULL) {
|
||||
panel_project->source_table->takeTopLevelItem(panel_project->source_table->indexOfTopLevelItem(item));
|
||||
} else {
|
||||
parent->removeChild(item);
|
||||
}
|
||||
}
|
||||
|
||||
RippleCommand::RippleCommand(Sequence *s, long ipoint, long ilength) :
|
||||
seq(s),
|
||||
point(ipoint),
|
||||
length(ilength)
|
||||
{}
|
||||
|
||||
void RippleCommand::undo() {
|
||||
for (int i=0;i<rippled.size();i++) {
|
||||
Clip* c = rippled.at(i);
|
||||
c->timeline_in -= length;
|
||||
c->timeline_out -= length;
|
||||
}
|
||||
}
|
||||
|
||||
void RippleCommand::redo() {
|
||||
rippled.clear();
|
||||
for (int j=0;j<seq->clips.size();j++) {
|
||||
Clip* c = seq->clips.at(j);
|
||||
bool found = false;
|
||||
for (int i=0;i<ignore.size();i++) {
|
||||
if (ignore.at(i) == c) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
if (c != NULL && c->timeline_in >= point) {
|
||||
c->timeline_in += length;
|
||||
c->timeline_out += length;
|
||||
rippled.append(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AddClipCommand::AddClipCommand(Sequence* s, QVector<Clip*>& add) :
|
||||
seq(s),
|
||||
clips(add)
|
||||
{}
|
||||
|
||||
AddClipCommand::~AddClipCommand() {
|
||||
for (int i=0;i<clips.size();i++) {
|
||||
delete clips.at(i);
|
||||
}
|
||||
}
|
||||
|
||||
void AddClipCommand::undo() {
|
||||
for (int i=0;i<clips.size();i++) {
|
||||
delete seq->clips.last();
|
||||
seq->clips.removeLast();
|
||||
}
|
||||
}
|
||||
|
||||
void AddClipCommand::redo() {
|
||||
// TODO does this actually need to copy?
|
||||
int linkOffset = seq->clips.size();
|
||||
for (int i=0;i<clips.size();i++) {
|
||||
Clip* original = clips.at(i);
|
||||
Clip* copy = original->copy(seq);
|
||||
copy->linked.resize(original->linked.size());
|
||||
for (int j=0;j<original->linked.size();j++) {
|
||||
copy->linked[j] = original->linked.at(j) + linkOffset;
|
||||
}
|
||||
seq->clips.append(copy);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
#define TA_ADD_EFFECT 9
|
||||
#define TA_ADD_TRANSITION 10
|
||||
#define TA_MODIFY_TRANSITION 11
|
||||
@@ -439,7 +792,7 @@ void TimelineAction::redo() {
|
||||
break;
|
||||
case TA_MODIFY_TRANSITION:
|
||||
{
|
||||
Clip* c = sequences.at(i)->get_clip(clips.at(i));
|
||||
Clip* c = sequences.at(i)->get_clip(clips.at(i));
|
||||
if (transition_types.at(i) == TA_OPENING_TRANSITION) {
|
||||
old_values[i] = c->opening_transition->length;
|
||||
c->opening_transition->length = new_values.at(i);
|
||||
@@ -555,7 +908,7 @@ void TimelineAction::redo() {
|
||||
project_changed = true;
|
||||
|
||||
done = true;
|
||||
}
|
||||
}*/
|
||||
|
||||
LinkCommand::LinkCommand() : link(true), old_project_changed(project_changed) {}
|
||||
|
||||
@@ -620,8 +973,8 @@ void ReplaceMediaCommand::replace(QString& filename) {
|
||||
QVector<Sequence*> all_sequences = panel_project->list_all_project_sequences();
|
||||
for (int i=0;i<all_sequences.size();i++) {
|
||||
Sequence* s = all_sequences.at(i);
|
||||
for (int j=0;j<s->clip_count();j++) {
|
||||
Clip* c = s->get_clip(j);
|
||||
for (int j=0;j<s->clips.size();j++) {
|
||||
Clip* c = s->clips.at(j);
|
||||
if (c != NULL && c->media == media && c->open) {
|
||||
close_clip(c);
|
||||
if (c->media_type == MEDIA_TYPE_FOOTAGE) c->cacher->wait();
|
||||
|
||||
+179
-2
@@ -7,6 +7,7 @@ class LabelSlider;
|
||||
class Effect;
|
||||
class SourceTable;
|
||||
class EffectRow;
|
||||
class Transition;
|
||||
struct Clip;
|
||||
struct Sequence;
|
||||
struct Media;
|
||||
@@ -21,7 +22,183 @@ struct Media;
|
||||
|
||||
extern QUndoStack undo_stack;
|
||||
|
||||
class TimelineAction : public QUndoCommand {
|
||||
class ComboAction : public QUndoCommand {
|
||||
public:
|
||||
ComboAction();
|
||||
~ComboAction();
|
||||
void undo();
|
||||
void redo();
|
||||
void append(QUndoCommand* u);
|
||||
private:
|
||||
QVector<QUndoCommand*> commands;
|
||||
};
|
||||
|
||||
class MoveClipAction : public QUndoCommand {
|
||||
public:
|
||||
MoveClipAction(Clip* c, long iin, long iout, long iclip_in, int itrack);
|
||||
void undo();
|
||||
void redo();
|
||||
private:
|
||||
Clip* clip;
|
||||
|
||||
long new_in;
|
||||
long new_out;
|
||||
long new_clip_in;
|
||||
int new_track;
|
||||
|
||||
long old_in;
|
||||
long old_out;
|
||||
long old_clip_in;
|
||||
int old_track;
|
||||
};
|
||||
|
||||
class DeleteClipAction : public QUndoCommand {
|
||||
public:
|
||||
DeleteClipAction(Sequence* s, int clip);
|
||||
~DeleteClipAction();
|
||||
void undo();
|
||||
void redo();
|
||||
private:
|
||||
Sequence* seq;
|
||||
Clip* ref;
|
||||
int index;
|
||||
};
|
||||
|
||||
class ChangeSequenceAction : public QUndoCommand {
|
||||
public:
|
||||
ChangeSequenceAction(Sequence* s);
|
||||
void undo();
|
||||
void redo();
|
||||
private:
|
||||
Sequence* old_sequence;
|
||||
Sequence* new_sequence;
|
||||
};
|
||||
|
||||
class AddEffectCommand : public QUndoCommand {
|
||||
public:
|
||||
AddEffectCommand(Clip* c, int ieffect);
|
||||
~AddEffectCommand();
|
||||
void undo();
|
||||
void redo();
|
||||
private:
|
||||
Clip* clip;
|
||||
int effect;
|
||||
Effect* ref;
|
||||
bool done;
|
||||
};
|
||||
|
||||
class AddTransitionCommand : public QUndoCommand {
|
||||
public:
|
||||
AddTransitionCommand(Clip* c, int itransition, int itype);
|
||||
void undo();
|
||||
void redo();
|
||||
private:
|
||||
Clip* clip;
|
||||
int transition;
|
||||
int type;
|
||||
};
|
||||
|
||||
class ModifyTransitionCommand : public QUndoCommand {
|
||||
public:
|
||||
ModifyTransitionCommand(Clip* c, int itype, long ilength);
|
||||
void undo();
|
||||
void redo();
|
||||
private:
|
||||
Clip* clip;
|
||||
int type;
|
||||
long new_length;
|
||||
long old_length;
|
||||
};
|
||||
|
||||
class DeleteTransitionCommand : public QUndoCommand {
|
||||
public:
|
||||
DeleteTransitionCommand(Clip* c, int itype);
|
||||
~DeleteTransitionCommand();
|
||||
void undo();
|
||||
void redo();
|
||||
private:
|
||||
Clip* clip;
|
||||
int type;
|
||||
Transition* transition;
|
||||
};
|
||||
|
||||
class SetTimelineInOutCommand : public QUndoCommand {
|
||||
public:
|
||||
SetTimelineInOutCommand(Sequence* s, bool enabled, long in, long out);
|
||||
void undo();
|
||||
void redo();
|
||||
private:
|
||||
Sequence* seq;
|
||||
|
||||
bool old_enabled;
|
||||
long old_in;
|
||||
long old_out;
|
||||
|
||||
bool new_enabled;
|
||||
long new_in;
|
||||
long new_out;
|
||||
};
|
||||
|
||||
class NewSequenceCommand : public QUndoCommand {
|
||||
public:
|
||||
NewSequenceCommand(QTreeWidgetItem *s, QTreeWidgetItem* iparent);
|
||||
~NewSequenceCommand();
|
||||
void undo();
|
||||
void redo();
|
||||
private:
|
||||
QTreeWidgetItem* seq;
|
||||
QTreeWidgetItem* parent;
|
||||
bool done;
|
||||
};
|
||||
|
||||
class AddMediaCommand : public QUndoCommand {
|
||||
public:
|
||||
AddMediaCommand(QTreeWidgetItem* iitem, QTreeWidgetItem* iparent);
|
||||
~AddMediaCommand();
|
||||
void undo();
|
||||
void redo();
|
||||
private:
|
||||
QTreeWidgetItem* item;
|
||||
QTreeWidgetItem* parent;
|
||||
bool done;
|
||||
};
|
||||
|
||||
class DeleteMediaCommand : public QUndoCommand {
|
||||
public:
|
||||
DeleteMediaCommand(QTreeWidgetItem* i);
|
||||
~DeleteMediaCommand();
|
||||
void undo();
|
||||
void redo();
|
||||
private:
|
||||
QTreeWidgetItem* item;
|
||||
QTreeWidgetItem* parent;
|
||||
};
|
||||
|
||||
class RippleCommand : public QUndoCommand {
|
||||
public:
|
||||
RippleCommand(Sequence* s, long ipoint, long ilength);
|
||||
QVector<Clip*> ignore;
|
||||
void undo();
|
||||
void redo();
|
||||
private:
|
||||
Sequence* seq;
|
||||
long point;
|
||||
long length;
|
||||
QVector<Clip*> rippled;
|
||||
};
|
||||
|
||||
class AddClipCommand : public QUndoCommand {
|
||||
public:
|
||||
AddClipCommand(Sequence* s, QVector<Clip*>& add);
|
||||
~AddClipCommand();
|
||||
void undo();
|
||||
void redo();
|
||||
private:
|
||||
Sequence* seq;
|
||||
QVector<Clip*> clips;
|
||||
};
|
||||
|
||||
/*class TimelineAction : public QUndoCommand {
|
||||
public:
|
||||
TimelineAction();
|
||||
~TimelineAction();
|
||||
@@ -103,7 +280,7 @@ private:
|
||||
void offset_links(QVector<Clip*>& clips, int offset);
|
||||
|
||||
bool old_project_changed;
|
||||
};
|
||||
};*/
|
||||
|
||||
class LinkCommand : public QUndoCommand {
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user