Files
oak-editor/app/widget/keyframeview/keyframeview.cpp
T
itsmattkc 4cd5e103b8 merged KeyframeView and CurveView to use the same base class
These classes had a ton of similarities, so they've now been modified to use
a common base class.
2019-12-28 18:47:54 +11:00

18 lines
419 B
C++

#include "keyframeview.h"
KeyframeView::KeyframeView(QWidget *parent) :
KeyframeViewBase(parent)
{
setAlignment(Qt::AlignLeft | Qt::AlignTop);
}
void KeyframeView::AddKeyframe(NodeKeyframePtr key, int y)
{
QPoint global_pt(0, y);
QPoint local_pt = mapFromGlobal(global_pt);
QPointF scene_pt = mapToScene(local_pt);
KeyframeViewItem* item = AddKeyframeInternal(key);
item->SetOverrideY(scene_pt.y());
}