Files
oak-editor/app/widget/nodeparamview/nodeparamviewwidgetbridge.h
T
itsmattkc 245aa44efc implemented support for multilayered keyframes
This adds the ability to keyframe more than one value per input (e.g. a vec2,
vec3, etc.) so that you can animate, for example, an X axis separately from a
Y axis.
2019-12-30 04:47:23 +11:00

45 lines
864 B
C++

#ifndef NODEPARAMVIEWWIDGETBRIDGE_H
#define NODEPARAMVIEWWIDGETBRIDGE_H
#include <QObject>
#include "node/input.h"
#include "widget/slider/sliderbase.h"
class NodeParamViewWidgetBridge : public QObject
{
Q_OBJECT
public:
NodeParamViewWidgetBridge(NodeInput* input, QObject* parent);
void SetTime(const rational& time);
const QList<QWidget*>& widgets();
private:
void CreateWidgets();
void SetInputValue(const QVariant& value, int track);
void ProcessSlider(SliderBase* slider, const QVariant& value);
NodeInput* input_;
QList<QWidget*> widgets_;
rational time_;
bool dragging_;
bool drag_created_keyframe_;
QVariant drag_old_value_;
NodeKeyframePtr dragging_keyframe_;
private slots:
void WidgetCallback();
void InputValueChanged(const rational& start, const rational& end);
};
#endif // NODEPARAMVIEWWIDGETBRIDGE_H