]> git.sesse.net Git - kdenlive/blob - src/effectslist.h
Fix rendering when using proxies with speed effect:
[kdenlive] / src / effectslist.h
1 /***************************************************************************
2                           effectslist.h  -  description
3                              -------------------
4     begin                : Sat Aug 10 2002
5     copyright            : (C) 2002 by Jason Wood
6     email                : jasonwood@blueyonder.co.uk
7  ***************************************************************************/
8
9 /***************************************************************************
10  *                                                                         *
11  *   This program is free software; you can redistribute it and/or modify  *
12  *   it under the terms of the GNU General Public License as published by  *
13  *   the Free Software Foundation; either version 2 of the License, or     *
14  *   (at your option) any later version.                                   *
15  *                                                                         *
16  ***************************************************************************/
17
18 /**
19  * @class EffectsList
20  * @brief List for effects objects.
21  * @author Jason Wood
22  *
23  * This is a list of DocClipBase objects, to be used instead of
24  * QList<DocClipBase> to enable sorting lists correctly. It also contains the
25  * ability to set a "master clip", which can be used by a number of operations
26  * where there is the need of one clip to act as a reference for what happens to
27  * all clips.
28  */
29
30 #ifndef EFFECTSLIST_H
31 #define EFFECTSLIST_H
32
33 #include <QDomDocument>
34
35 class EffectsList: public QDomDocument
36 {
37 public:
38     EffectsList();
39     ~EffectsList();
40
41     /** @brief Returns the XML element of an effect.
42      * @param name name of the effect to be returned */
43     QDomElement getEffectByName(const QString & name) const;
44     QDomElement getEffectByTag(const QString & tag, const QString & id) const;
45
46     /** @brief Checks the existance of an effect.
47      * @param tag effect tag
48      * @param id effect id
49      * @return effect index if the effect exists, -1 otherwise */
50     int hasEffect(const QString & tag, const QString & id) const;
51
52     /** @brief Lists the core properties of an effect.
53      * @param ix effect index
54      * @return list of name, tag and id of an effect */
55     QStringList effectIdInfo(const int ix) const;
56
57     /** @brief Lists effects names. */
58     QStringList effectNames();
59     QString getInfo(const QString & tag, const QString & id) const;
60     QString getInfoFromIndex(const int ix) const;
61     void clone(const EffectsList original);
62     void append(QDomElement e);
63     bool isEmpty() const;
64     int count() const;
65     const QDomElement at(int ix) const;
66     void removeAt(int ix);
67     QDomElement item(int ix);
68     void insert(int ix, QDomElement effect);
69     void replace(int ix, QDomElement effect);
70     static bool hasKeyFrames(QDomElement effect);
71     static bool hasSimpleKeyFrames(QDomElement effect);
72     static bool hasGeometryKeyFrames(QDomElement effect);
73     static void setParameter(QDomElement effect, const QString &name, const QString &value);
74     static QString parameter(QDomElement effect, const QString &name);
75     /** @brief Change the value of a 'property' element from the effect node. */
76     static void setProperty(QDomElement effect, const QString &name, const QString &value);
77     /** @brief Get the value of a 'property' element from the effect node. */
78     static QString property(QDomElement effect, const QString &name);
79     /** @brief Delete a 'property' element from the effect node. */
80     static void removeProperty(QDomElement effect, const QString &name);
81     void clearList();
82
83 private:
84     QDomElement m_baseElement;
85
86 };
87
88 #endif