summaryrefslogtreecommitdiff
path: root/src/plugins/qmldesigner/components/curveeditor/detail
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmldesigner/components/curveeditor/detail')
-rw-r--r--src/plugins/qmldesigner/components/curveeditor/detail/curveitem.cpp12
-rw-r--r--src/plugins/qmldesigner/components/curveeditor/detail/curveitem.h2
-rw-r--r--src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp17
-rw-r--r--src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.h4
-rw-r--r--src/plugins/qmldesigner/components/curveeditor/detail/keyframeitem.cpp12
-rw-r--r--src/plugins/qmldesigner/components/curveeditor/detail/keyframeitem.h2
6 files changed, 6 insertions, 43 deletions
diff --git a/src/plugins/qmldesigner/components/curveeditor/detail/curveitem.cpp b/src/plugins/qmldesigner/components/curveeditor/detail/curveitem.cpp
index 5b05309976..e6c99e7085 100644
--- a/src/plugins/qmldesigner/components/curveeditor/detail/curveitem.cpp
+++ b/src/plugins/qmldesigner/components/curveeditor/detail/curveitem.cpp
@@ -458,18 +458,6 @@ void CurveItem::setInterpolation(Keyframe::Interpolation interpolation)
emit curveChanged(id(), curve(true));
}
-void CurveItem::setDefaultInterpolation()
-{
- if (m_keyframes.empty())
- return;
-
- for (auto *frame : qAsConst(m_keyframes)) {
- if (frame->selected())
- frame->setDefaultInterpolation();
- }
- emit curveChanged(id(), curve(true));
-}
-
void CurveItem::toggleUnified()
{
if (m_keyframes.empty())
diff --git a/src/plugins/qmldesigner/components/curveeditor/detail/curveitem.h b/src/plugins/qmldesigner/components/curveeditor/detail/curveitem.h
index c6bdc6d3d4..0f0d5d5341 100644
--- a/src/plugins/qmldesigner/components/curveeditor/detail/curveitem.h
+++ b/src/plugins/qmldesigner/components/curveeditor/detail/curveitem.h
@@ -125,8 +125,6 @@ public:
void setInterpolation(Keyframe::Interpolation interpolation);
- void setDefaultInterpolation();
-
void toggleUnified();
void connect(GraphicsScene *scene);
diff --git a/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp b/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp
index 8ab71ace97..d01ffa47c7 100644
--- a/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp
+++ b/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.cpp
@@ -336,18 +336,6 @@ void GraphicsView::setInterpolation(Keyframe::Interpolation interpol)
viewport()->update();
}
-void GraphicsView::setDefaultInterpolation()
-{
- const auto selectedCurves = m_scene->selectedCurves();
- for (auto *curve : selectedCurves)
- curve->setDefaultInterpolation();
-
- m_scene->setDirty(true);
-
- applyZoom(m_zoomX, m_zoomY);
- viewport()->update();
-}
-
void GraphicsView::toggleUnified()
{
const auto selectedCurves = m_scene->selectedCurves();
@@ -569,7 +557,10 @@ void GraphicsView::applyZoom(double x, double y, const QPoint &pivot)
}
m_scene->doNotMoveItems(false);
- this->update();
+
+ viewport()->update();
+
+ emit zoomChanged(m_zoomX, m_zoomY);
}
void GraphicsView::drawGrid(QPainter *painter)
diff --git a/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.h b/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.h
index 917a8e7e2c..27b27a4a36 100644
--- a/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.h
+++ b/src/plugins/qmldesigner/components/curveeditor/detail/graphicsview.h
@@ -49,6 +49,8 @@ class GraphicsView : public QGraphicsView
signals:
void currentFrameChanged(int frame, bool notify);
+ void zoomChanged(double x, double y);
+
public:
GraphicsView(CurveEditorModel *model, QWidget *parent = nullptr);
@@ -112,8 +114,6 @@ public:
void setInterpolation(Keyframe::Interpolation interpol);
- void setDefaultInterpolation();
-
void toggleUnified();
protected:
diff --git a/src/plugins/qmldesigner/components/curveeditor/detail/keyframeitem.cpp b/src/plugins/qmldesigner/components/curveeditor/detail/keyframeitem.cpp
index 0dbb2d125f..171665cf2f 100644
--- a/src/plugins/qmldesigner/components/curveeditor/detail/keyframeitem.cpp
+++ b/src/plugins/qmldesigner/components/curveeditor/detail/keyframeitem.cpp
@@ -250,18 +250,6 @@ void KeyframeItem::setKeyframe(const Keyframe &keyframe)
setPos(m_transform.map(m_frame.position()));
}
-void KeyframeItem::setDefaultInterpolation()
-{
- if (!m_left || !m_right)
- return;
-
- m_frame.setDefaultInterpolation();
-
- setKeyframe(m_frame);
-
- emit redrawCurve();
-}
-
void KeyframeItem::toggleUnified()
{
if (!m_left || !m_right)
diff --git a/src/plugins/qmldesigner/components/curveeditor/detail/keyframeitem.h b/src/plugins/qmldesigner/components/curveeditor/detail/keyframeitem.h
index c7bfa02cd1..7d04bab209 100644
--- a/src/plugins/qmldesigner/components/curveeditor/detail/keyframeitem.h
+++ b/src/plugins/qmldesigner/components/curveeditor/detail/keyframeitem.h
@@ -92,8 +92,6 @@ public:
void setKeyframe(const Keyframe &keyframe);
- void setDefaultInterpolation();
-
void toggleUnified();
void setActivated(bool active, HandleItem::Slot slot);