]> git.sesse.net Git - kdenlive/blobdiff - src/definitions.h
Some progress on effect group
[kdenlive] / src / definitions.h
index 2355f34869dfde53b750dd6e64ffa840d7dcf7a8..fd2656f9fd25ac43e53f7f446c9c685b4445b83b 100644 (file)
@@ -125,6 +125,32 @@ struct MltVideoProfile {
     }
 };
 
+/**)
+ * @class EffectInfo
+ * @brief A class holding some meta info for effects widgets, like state (collapsed or not, ...)
+ * @author Jean-Baptiste Mardelle
+ */
+
+class EffectInfo
+{
+public:
+    EffectInfo() {isCollapsed = false; groupIndex = -1;}
+    bool isCollapsed;
+    int groupIndex;
+    QString groupName;
+    QString toString() const {
+        QStringList data;
+       data << QString::number(isCollapsed) << QString::number(groupIndex) << groupName;
+       return data.join("/");
+    }
+    void fromString(QString value) {
+       if (value.isEmpty()) return;
+       QStringList data = value.split("/");
+       isCollapsed = data.at(0).toInt();
+       if (data.count() > 1) groupIndex = data.at(1).toInt();
+       if (data.count() > 2) groupName = data.at(2);
+    }
+};
 
 class EffectParameter
 {