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:
@@ -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_;
|
||||
|
||||
@@ -15,6 +15,7 @@ public:
|
||||
|
||||
virtual void Clear();
|
||||
|
||||
const double& GetYScale() const;
|
||||
void SetYScale(const double& y_scale);
|
||||
|
||||
public slots:
|
||||
@@ -29,6 +30,8 @@ protected:
|
||||
|
||||
virtual void ScaleChangedEvent(double scale) override;
|
||||
|
||||
virtual void VerticalScaleChangedEvent(double scale);
|
||||
|
||||
const QMap<NodeKeyframe*, KeyframeViewItem*>& item_map() const;
|
||||
|
||||
virtual void KeyframeAboutToBeRemoved(NodeKeyframe* key);
|
||||
|
||||
Reference in New Issue
Block a user