]> git.sesse.net Git - kdenlive/blobdiff - src/effectslist.h
- Avoid adding an undo command when no clips are actually added. [1]
[kdenlive] / src / effectslist.h
index cfee7ea7884bf12d8877ef16f2e84de6d13ee9c3..220174f06a6a5a7e048279ad47087f0e5bec567d 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
-                          docclipbaseiterator.h  -  description
+                          effectslist.h  -  description
                              -------------------
     begin                : Sat Aug 10 2002
     copyright            : (C) 2002 by Jason Wood
 #ifndef EFFECTSLIST_H
 #define EFFECTSLIST_H
 
-#include <QList>
+#include <QDomDocument>
 
-/**An List for DocClipBase objects. Use this instead of QList<DocClipBase> so as to sort lists correctly.
+/**A List for DocClipBase objects. Use this instead of QList<DocClipBase> 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 <QDomElement>
 
-class EffectsList: public QList < QDomElement > {
+class EffectsList: public QDomDocument
+{
 public:
     EffectsList();
     ~EffectsList();
@@ -39,11 +39,28 @@ public:
     int hasEffect(const QString & tag, const QString & id) const;
     QStringList effectIdInfo(const int ix) const;
     QStringList effectNames();
-    QString getInfo(const QString & tag, const QString & id);
-    QMap <QString, QString> effect(const QString & name);
-    EffectsList clone() const;
+    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 void setParameter(QDomElement effect, QString name, QString value);
+    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