MCPcopy Create free account
hub / github.com/analogdevicesinc/scopy / setAnimation

Method setAnimation

gui/src/animationpushbutton.cpp:46–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46void AnimationPushButton::setAnimation(QMovie *animation, int maxRunningTimeMsec)
47{
48 if(animation->isValid()) {
49 if(m_animation) {
50 disconnect(m_animation, &QMovie::frameChanged, this, &AnimationPushButton::setBtnIcon);
51 }
52 m_animation = animation;
53 m_timer->setInterval(maxRunningTimeMsec);
54 connect(m_animation, &QMovie::frameChanged, this, &AnimationPushButton::setBtnIcon);
55 } else {
56 qWarning(CAT_GUI_ANIMATION_BTN) << "The animation " << animation->fileName() + " is not valid!";
57 }
58}
59
60void AnimationPushButton::startAnimation()
61{

Callers 4

setupUiMethod · 0.80
initConfigSectionMethod · 0.80
setupBtnLdIconMethod · 0.80
initEnBtnMethod · 0.80

Calls 4

disconnectFunction · 0.85
connectFunction · 0.50
isValidMethod · 0.45
setIntervalMethod · 0.45

Tested by

no test coverage detected