Skip to content

Commit 029bfc1

Browse files
committed
Rectangle: expose animators
1 parent b33d07f commit 029bfc1

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/core/Boxes/rectangle.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,21 @@ void RectangleBox::setXRadius(const qreal radiusX) {
104104
mRadiusAnimator->getXAnimator()->setCurrentBaseValue(radiusX);
105105
}
106106

107+
QPointFAnimator *RectangleBox::getTopLeftAnimator()
108+
{
109+
return mTopLeftAnimator.get();
110+
}
111+
112+
QPointFAnimator *RectangleBox::getBottomRightAnimator()
113+
{
114+
return mBottomRightAnimator.get();
115+
}
116+
117+
QPointFAnimator *RectangleBox::getRadiusAnimator()
118+
{
119+
return mRadiusAnimator.get();
120+
}
121+
107122
void RectangleBox::moveSizePointByAbs(const QPointF &absTrans) {
108123
mBottomRightPoint->moveByAbs(absTrans);
109124
}

src/core/Boxes/rectangle.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ class CORE_EXPORT RectangleBox : public PathBox {
4747
void setBottomRightPos(const QPointF &pos);
4848
void setYRadius(const qreal radiusY);
4949
void setXRadius(const qreal radiusX);
50+
51+
QPointFAnimator* getTopLeftAnimator();
52+
QPointFAnimator* getBottomRightAnimator();
53+
QPointFAnimator* getRadiusAnimator();
54+
5055
private:
5156
qsptr<QPointFAnimator> mTopLeftAnimator;
5257
qsptr<QPointFAnimator> mBottomRightAnimator;

0 commit comments

Comments
 (0)