X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Feffectslist.h;h=9654b5bb6174fb19fe077afe770dc2c09ca3a482;hb=0bee058218d285adda4f949ec63da8c6178a473b;hp=e338b2bf1bc8abcad5134a66827ad4eb59bb54d1;hpb=2a4060e2edb252fd65c5fafc48643cfb3609255e;p=kdenlive diff --git a/src/effectslist.h b/src/effectslist.h index e338b2bf..9654b5bb 100644 --- a/src/effectslist.h +++ b/src/effectslist.h @@ -32,6 +32,10 @@ #include +namespace Kdenlive { + enum EFFECTTYPE { simpleEffect, groupEffect }; +} + class EffectsList: public QDomDocument { public: @@ -68,11 +72,11 @@ public: QDomElement itemFromIndex(int ix) const; QDomElement insert(QDomElement effect); void updateEffect(QDomElement effect); - static bool hasKeyFrames(QDomElement effect); - static bool hasSimpleKeyFrames(QDomElement effect); - static bool hasGeometryKeyFrames(QDomElement effect); + static bool hasKeyFrames(const QDomElement &effect); + static bool hasSimpleKeyFrames(const QDomElement &effect); + static bool hasGeometryKeyFrames(const QDomElement &effect); static void setParameter(QDomElement effect, const QString &name, const QString &value); - static QString parameter(QDomElement effect, const QString &name); + static QString parameter(const QDomElement &effect, const QString &name); /** @brief Change the value of a 'property' element from the effect node. */ static void setProperty(QDomElement effect, const QString &name, const QString &value); /** @brief Rename a 'property' element from the effect node. */ @@ -87,11 +91,16 @@ public: /** @brief Get am effect with effect index equal to ix. */ QDomElement effectFromIndex(QDomNodeList effects, int ix); /** @brief Update all effects indexes to make sure they are 1, 2, 3, ... */ - void updateIndexes(QDomNodeList effects); + void updateIndexes(QDomNodeList effects, int startIndex); + /** @brief Enable / disable a list of effects */ + void enableEffects(const QList &indexes, bool disable); private: QDomElement m_baseElement; bool m_useIndex; + + /** @brief Init effect default parameter values. */ + void initEffect(const QDomElement &effect) const; };