| 9 | |
| 10 | |
| 11 | ExpandAnimator::ExpandAnimator(QWidget* _widgetForFill) : |
| 12 | AbstractAnimator(_widgetForFill), |
| 13 | m_decorator(new ExpandDecorator(_widgetForFill)), |
| 14 | m_animation(new QPropertyAnimation(m_decorator, "expandRect")) |
| 15 | { |
| 16 | Q_ASSERT(_widgetForFill); |
| 17 | |
| 18 | _widgetForFill->installEventFilter(this); |
| 19 | |
| 20 | m_animation->setDuration(400); |
| 21 | |
| 22 | m_decorator->hide(); |
| 23 | |
| 24 | connect(m_animation, &QPropertyAnimation::finished, [this] { |
| 25 | setAnimatedStopped(); |
| 26 | if (isAnimatedBackward()) { |
| 27 | m_decorator->hide(); |
| 28 | } |
| 29 | }); |
| 30 | } |
| 31 | |
| 32 | void ExpandAnimator::setExpandRect(const QRect& _rect) |
| 33 | { |
nothing calls this directly
no test coverage detected