implemented vertical "zooming" in the TimelineWidget and CurveView

This comes in the form of changing the vertical scale in the CurveView and
adjusting all track heights in the Timeline.
This commit is contained in:
itsmattkc
2019-12-31 00:23:28 +11:00
parent 441555e9f2
commit 2b24fae26f
22 changed files with 220 additions and 41 deletions
+15 -1
View File
@@ -33,10 +33,20 @@ void KeyframeViewBase::Clear()
item_map_.clear();
}
const double &KeyframeViewBase::GetYScale() const
{
return y_scale_;
}
void KeyframeViewBase::SetYScale(const double &y_scale)
{
y_scale_ = y_scale;
viewport()->update();
if (y_axis_enabled_) {
VerticalScaleChangedEvent(y_scale_);
viewport()->update();
}
}
void KeyframeViewBase::RemoveKeyframe(NodeKeyframePtr key)
@@ -188,6 +198,10 @@ void KeyframeViewBase::ScaleChangedEvent(double scale)
}
}
void KeyframeViewBase::VerticalScaleChangedEvent(double scale)
{
}
const QMap<NodeKeyframe *, KeyframeViewItem *> &KeyframeViewBase::item_map() const
{
return item_map_;