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

Method expandOut

3rdparty/WAF/Animation/Expand/ExpandAnimator.cpp:103–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void ExpandAnimator::expandOut()
104{
105 //
106 // Прерываем выполнение, если клиент хочет повторить его
107 //
108 if (isAnimated() && isAnimatedBackward()) return;
109 setAnimatedBackward();
110
111 //
112 // Определим стартовые и финальные позиции для декораций
113 //
114 QRect startExpandRect = widgetForFill()->rect();
115 QRect finalExpandRect = m_expandRect;
116
117 //
118 // Позиционируем декораторы
119 //
120 m_decorator->resize(widgetForFill()->size());
121 m_decorator->move(0, 0);
122 m_decorator->hide();
123 m_decorator->grabExpandRect();
124 m_decorator->show();
125 m_decorator->raise();
126
127 //
128 // Анимируем виджет
129 //
130 if (m_animation->state() == QPropertyAnimation::Running) {
131 //
132 // ... если ещё не закончилась предыдущая анимация реверсируем её
133 //
134 m_animation->pause();
135 m_animation->setDirection(QPropertyAnimation::Backward);
136 m_animation->resume();
137 } else {
138 //
139 // ... если предыдущая анимация закончилась, запускаем новую анимацию
140 //
141 m_animation->setEasingCurve(QEasingCurve::InOutQuart);
142 m_animation->setDirection(QPropertyAnimation::Forward);
143 m_animation->setStartValue(startExpandRect);
144 m_animation->setEndValue(finalExpandRect);
145 m_animation->start();
146 }
147}
148
149bool ExpandAnimator::eventFilter(QObject* _object, QEvent* _event)
150{

Callers

nothing calls this directly

Calls 8

resizeMethod · 0.80
moveMethod · 0.80
hideMethod · 0.80
grabExpandRectMethod · 0.80
setEasingCurveMethod · 0.80
startMethod · 0.80
sizeMethod · 0.45
raiseMethod · 0.45

Tested by

no test coverage detected