Add Delete functionality. Still buggy.

This commit is contained in:
Thomas Wilshaw
2020-09-29 00:06:38 +01:00
parent 602f96b2b6
commit 92db735022
3 changed files with 76 additions and 0 deletions
+24
View File
@@ -25,6 +25,7 @@
#include "project.h"
#include "undo/undocommand.h"
#include "node/block/block.h"
OLIVE_NAMESPACE_ENTER
@@ -215,6 +216,29 @@ public:
QMap<Node*, StreamPtr> nodes_;
};
class DeleteFootageCommand : public UndoCommand {
public:
DeleteFootageCommand(ProjectViewModel* model, ItemPtr item, QList<Block*> blocks, QUndoCommand* parent = nullptr);
virtual Project* GetRelevantProject() const override;
protected:
virtual void redo_internal() override;
virtual void undo_internal() override;
private:
ProjectViewModel* model_;
ItemPtr item_;
QList<Block*> blocks_;
QUndoCommand* deleteCommand_;
QUndoCommand* removalCommand_;
};
private:
/**
* @brief Retrieve the index of `item` in its parent