MCPcopy Create free account
hub / github.com/Audio4Linux/JDSP4Linux / fillIn

Method fillIn

3rdparty/WAF/Animation/CircleFill/CircleFillAnimator.cpp:58–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void CircleFillAnimator::fillIn()
59{
60 //
61 // Прерываем выполнение, если клиент хочет повторить его
62 //
63 if (isAnimated() && isAnimatedForward()) return;
64 setAnimatedForward();
65
66 //
67 // Определим стартовые и финальные позиции для декораций
68 //
69 int startRadius = 0;
70 int finalRadius = sqrt(widgetForFill()->height()*widgetForFill()->height() + widgetForFill()->width()*widgetForFill()->width());
71
72 //
73 // Позиционируем декораторы
74 //
75 m_decorator->resize(widgetForFill()->size());
76 m_decorator->move(0, 0);
77 m_decorator->show();
78 m_decorator->raise();
79
80 //
81 // Анимируем виджет
82 //
83 if (m_animation->state() == QPropertyAnimation::Running) {
84 //
85 // ... если ещё не закончилась предыдущая анимация реверсируем её
86 //
87 m_animation->pause();
88 m_animation->setDirection(QPropertyAnimation::Backward);
89 m_animation->resume();
90 } else {
91 //
92 // ... если предыдущая анимация закончилась, запускаем новую анимацию
93 //
94 m_animation->setEasingCurve(QEasingCurve::OutQuart);
95 m_animation->setDirection(QPropertyAnimation::Forward);
96 m_animation->setStartValue(startRadius);
97 m_animation->setEndValue(finalRadius);
98 m_animation->start();
99 }
100}
101
102void CircleFillAnimator::animateBackward()
103{

Callers

nothing calls this directly

Calls 7

resizeMethod · 0.80
moveMethod · 0.80
setEasingCurveMethod · 0.80
startMethod · 0.80
sqrtFunction · 0.50
sizeMethod · 0.45
raiseMethod · 0.45

Tested by

no test coverage detected