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

Method getAssetModelById

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

Source from the content-addressed store, hash-verified

1763}
1764
1765std::shared_ptr<AssetParameterModel> EffectStackModel::getAssetModelById(const QString &effectId)
1766{
1767 QWriteLocker locker(&m_lock);
1768 for (int i = 0; i < rootItem->childCount(); ++i) {
1769 std::shared_ptr<EffectItemModel> sourceEffect = std::static_pointer_cast<EffectItemModel>(rootItem->child(i));
1770 if (effectId == sourceEffect->getAssetId()) {
1771 return std::static_pointer_cast<AssetParameterModel>(sourceEffect);
1772 }
1773 }
1774 return nullptr;
1775}
1776
1777bool EffectStackModel::hasFilter(const QString &effectId) const
1778{

Callers 2

Calls 3

childCountMethod · 0.80
childMethod · 0.80
getAssetIdMethod · 0.45

Tested by

no test coverage detected