diff options
author | Knud Dollereder <knud.dollereder@qt.io> | 2019-06-28 10:45:28 +0200 |
---|---|---|
committer | Knud Dollereder <knud.dollereder@qt.io> | 2019-08-08 14:30:44 +0000 |
commit | 4a673896a697975e16a1531fc22895dc3dbee0a7 (patch) | |
tree | bb0b90d73b9ab024564261dbc5e3d624463762d6 /src/plugins/qmldesigner/components/curveeditor/treeitem.h | |
parent | a96095a2bfe8f9b6103c37d5f4bcc06c06970292 (diff) |
Connect CurveEditor edits to the timeline module
Change-Id: Ic00e0840da34bdbb8627b2fe2d8546a867b24966
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'src/plugins/qmldesigner/components/curveeditor/treeitem.h')
-rw-r--r-- | src/plugins/qmldesigner/components/curveeditor/treeitem.h | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/src/plugins/qmldesigner/components/curveeditor/treeitem.h b/src/plugins/qmldesigner/components/curveeditor/treeitem.h index 5b31dc2fc8c..0ae65d60aaf 100644 --- a/src/plugins/qmldesigner/components/curveeditor/treeitem.h +++ b/src/plugins/qmldesigner/components/curveeditor/treeitem.h @@ -58,6 +58,10 @@ public: unsigned int id() const; + QString name() const; + + bool hasChildren() const; + bool locked() const; bool pinned() const; @@ -102,7 +106,6 @@ protected: std::vector<TreeItem *> m_children; }; - class NodeTreeItem : public TreeItem { public: @@ -116,21 +119,42 @@ private: QIcon m_icon; }; +enum class ValueType { + Undefined, + Bool, + Integer, + Double, +}; class PropertyTreeItem : public TreeItem { public: - PropertyTreeItem(const QString &name, const AnimationCurve &curve); + enum class Component { Generic, R, G, B, A, X, Y, Z, W }; + +public: + PropertyTreeItem(const QString &name, const AnimationCurve &curve, const ValueType &type); PropertyTreeItem *asPropertyItem() override; + const NodeTreeItem *parentNodeTreeItem() const; + + ValueType valueType() const; + + Component component() const; + AnimationCurve curve() const; void setCurve(const AnimationCurve &curve); + void setComponent(const Component &comp); + private: using TreeItem::addChild; + ValueType m_type = ValueType::Undefined; + + Component m_component = Component::Generic; + AnimationCurve m_curve; }; |