X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Feffectslist.h;h=f60c50ab508594fe22fa2afbe693ba78208b97d9;hb=026a8436a56ccd5ee715de50d43ec699edf0456d;hp=a51bf521732e9fbd26cce5f8d6440e4d3c781ea0;hpb=14d225b5859779df4dbd1f859626c63f7ca9aedf;p=kdenlive diff --git a/src/effectslist.h b/src/effectslist.h index a51bf521..f60c50ab 100644 --- a/src/effectslist.h +++ b/src/effectslist.h @@ -1,5 +1,5 @@ /*************************************************************************** - docclipbaseiterator.h - description + effectslist.h - description ------------------- begin : Sat Aug 10 2002 copyright : (C) 2002 by Jason Wood @@ -15,29 +15,69 @@ * * ***************************************************************************/ +/** + * @class EffectsList + * @brief List for effects objects. + * @author Jason Wood + * + * This is a list of DocClipBase objects, to be used instead of + * QList to enable sorting lists correctly. It also contains the + * ability to set a "master clip", which can be used by a number of operations + * where there is the need of one clip to act as a reference for what happens to + * all clips. + */ + #ifndef EFFECTSLIST_H #define EFFECTSLIST_H -#include - -/**An List for DocClipBase objects. Use this instead of QList so as to sort lists correctly. - * Also contains the ability to set a "master clip", which can be used by a number of operations where - * the need for one clip to act as a reference for what happens to all clips is needed. - * @author Jason Wood - */ - -#include +#include -class EffectsList: public QList < QDomElement > { +class EffectsList: public QDomDocument +{ public: EffectsList(); ~EffectsList(); - /** Returns an XML version of this Effect.*/ + + /** @brief Returns the XML element of an effect. + * @param name name of the effect to be returned */ QDomElement getEffectByName(const QString & name) const; - QDomElement getEffectByTag(const QString & tag) const; + QDomElement getEffectByTag(const QString & tag, const QString & id) const; + + /** @brief Checks the existance of an effect. + * @param tag effect tag + * @param id effect id + * @return effect index if the effect exists, -1 otherwise */ + int hasEffect(const QString & tag, const QString & id) const; + + /** @brief Lists the core properties of an effect. + * @param ix effect index + * @return list of name, tag and id of an effect */ + QStringList effectIdInfo(const int ix) const; + + /** @brief Lists effects names. */ QStringList effectNames(); - QString getInfo(QString effectName); - QMap effect(const QString & name); + QString getInfo(const QString & tag, const QString & id) const; + QString getInfoFromIndex(const int ix) const; + void clone(const EffectsList original); + void append(QDomElement e); + bool isEmpty() const; + int count() const; + const QDomElement at(int ix) const; + void removeAt(int ix); + QDomElement item(int ix); + void insert(int ix, QDomElement effect); + void replace(int ix, QDomElement effect); + static bool hasKeyFrames(QDomElement effect); + static bool hasSimpleKeyFrames(QDomElement effect); + static void setParameter(QDomElement effect, const QString &name, const QString &value); + static QString parameter(QDomElement effect, const QString &name); + static void setProperty(QDomElement effect, const QString &name, const QString &value); + static QString property(QDomElement effect, const QString &name); + void clearList(); + +private: + QDomElement m_baseElement; + }; #endif