implemented the ability to modify bezier points in the curve editor

This commit is contained in:
itsmattkc
2019-12-28 22:40:30 +11:00
parent 4cd5e103b8
commit 1d3d52db9b
23 changed files with 744 additions and 282 deletions
+13
View File
@@ -1,6 +1,7 @@
#ifndef CURVEVIEW_H
#define CURVEVIEW_H
#include "beziercontrolpointitem.h"
#include "node/keyframe.h"
#include "widget/keyframeview/keyframeview.h"
#include "widget/keyframeview/keyframeviewitem.h"
@@ -10,6 +11,8 @@ class CurveView : public KeyframeViewBase
public:
CurveView(QWidget* parent = nullptr);
virtual ~CurveView() override;
virtual void Clear() override;
void SetYScale(const double& y_scale);
@@ -22,6 +25,8 @@ protected:
virtual void KeyframeAboutToBeRemoved(NodeKeyframe *key) override;
virtual void ScaleChangedEvent(double scale) override;
private:
QList<NodeKeyframe*> GetKeyframesSortedByTime();
@@ -29,6 +34,8 @@ private:
void SetItemYFromKeyframeValue(NodeKeyframe* key, KeyframeViewItem* item);
QPointF ScalePoint(const QPointF& point);
void AdjustLines();
int text_padding_;
@@ -39,9 +46,15 @@ private:
QList<QGraphicsLineItem*> lines_;
QList<BezierControlPointItem*> bezier_control_points_;
private slots:
void KeyframeValueChanged();
void SelectionChanged();
void BezierControlPointDestroyed();
};
#endif // CURVEVIEW_H