implemented the ability to modify bezier points in the curve editor
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user