MCPcopy Create free account
hub / github.com/KDE/kdenlive / removeEffectWithUndo

Method removeEffectWithUndo

src/effects/effectstack/model/effectstackmodel.cpp:201–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199}
200
201void EffectStackModel::removeEffectWithUndo(const QString &assetId, QString &effectName, int assetRow, Fun &undo, Fun &redo)
202{
203 if (assetRow > -1 && assetRow < rootItem->childCount()) {
204 std::shared_ptr<EffectItemModel> sourceEffect = std::static_pointer_cast<EffectItemModel>(rootItem->child(assetRow));
205 if (assetId == sourceEffect->getAssetId()) {
206 removeEffectWithUndo(sourceEffect, effectName, undo, redo);
207 return;
208 }
209 }
210 for (int i = 0; i < rootItem->childCount(); ++i) {
211 std::shared_ptr<EffectItemModel> sourceEffect = std::static_pointer_cast<EffectItemModel>(rootItem->child(i));
212 if (sourceEffect->isBuiltIn()) {
213 continue;
214 }
215 if (assetId == sourceEffect->getAssetId()) {
216 removeEffectWithUndo(sourceEffect, effectName, undo, redo);
217 break;
218 }
219 }
220}
221
222void EffectStackModel::removeEffectWithUndo(const std::shared_ptr<EffectItemModel> &effect, QString &effectName, Fun &undo, Fun &redo)
223{

Callers 2

removeEffectFromGroupMethod · 0.80
removeEffectFromGroupMethod · 0.80

Calls 14

childCountMethod · 0.80
childMethod · 0.80
lockMethod · 0.80
parentItemMethod · 0.80
hideFromStackMethod · 0.80
rowMethod · 0.80
hasForcedInOutMethod · 0.80
updateItemKeyframesMethod · 0.80
getAssetIdMethod · 0.45
isBuiltInMethod · 0.45
countMethod · 0.45
getIdMethod · 0.45

Tested by

no test coverage detected