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

Method effectRow

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

Source from the content-addressed store, hash-verified

2008}
2009
2010int EffectStackModel::effectRow(const QString &assetId, int eid, bool enabledOnly) const
2011{
2012 for (int i = 0; i < rootItem->childCount(); ++i) {
2013 if (eid > -1) {
2014 if (rootItem->child(i)->getId() == eid) {
2015 return i;
2016 }
2017 } else {
2018 auto effect = std::static_pointer_cast<EffectItemModel>(rootItem->child(i));
2019 if (effect->getAssetId() == assetId) {
2020 if (!enabledOnly || effect->isAssetEnabled()) {
2021 return i;
2022 }
2023 }
2024 }
2025 }
2026 return -1;
2027}
2028
2029QVariantList EffectStackModel::getEffectZones() const
2030{

Calls 5

childCountMethod · 0.80
childMethod · 0.80
isAssetEnabledMethod · 0.80
getIdMethod · 0.45
getAssetIdMethod · 0.45

Tested by

no test coverage detected