implemented bulk of curve editor's functionality

While certainly not entirely complete yet, this implements most of the UI
functionality of the graph editor.
This commit is contained in:
itsmattkc
2019-12-28 18:26:37 +11:00
parent b65abe4881
commit 26cafa7936
21 changed files with 603 additions and 36 deletions
+3 -2
View File
@@ -37,7 +37,8 @@ void KeyframeView::AddKeyframe(NodeKeyframePtr key, int y)
QPoint local_pt = mapFromGlobal(global_pt);
QPointF scene_pt = mapToScene(local_pt);
KeyframeViewItem* item = new KeyframeViewItem(key, scene_pt.y());
KeyframeViewItem* item = new KeyframeViewItem(key);
item->SetOverrideY(scene_pt.y());
item->SetScale(scale_);
item_map_.insert(key.get(), item);
scene()->addItem(item);
@@ -45,7 +46,7 @@ void KeyframeView::AddKeyframe(NodeKeyframePtr key, int y)
void KeyframeView::RemoveKeyframe(NodeKeyframePtr key)
{
delete item_map_.value(key.get());
delete item_map_.take(key.get());
}
void KeyframeView::mousePressEvent(QMouseEvent *event)