void LinkDialogProcessorGraphicsItem::animate(qreal incr) { if (animateExpansion_ > 1.0 || animateExpansion_ < 0.0f) { animationEnd(); } else { animateExpansion_ += static_cast<float>(incr); } }
void LinkDialogProcessorGraphicsItem::animate(qreal incr) { if (animateExpansion_ > 1.0 || animateExpansion_ < 0.0f) { animationEnd(); } else { animateExpansion_ += incr; updateAll(); } }
void LinkDialogProcessorGraphicsItem::animationStart() { animateExpansion_ = 0.1f; QTimeLine* anim = new QTimeLine(50, this); anim->setUpdateInterval(20); connect(anim, SIGNAL(valueChanged(qreal)), SLOT(animate(qreal))); connect(anim, SIGNAL(finished()), SLOT(animationEnd())); anim->start(); }
void blink(uint8_t color) { if (isAnimationStart()) { RGBMatrix.clear(); } animationState++; if (animationState % 2 == 0) { rectangle(0, 0, 7, 7, color, TOP_LAYER); } else { RGBMatrix.clear(); } if (animationState == 10) { RGBMatrix.clear(); animationEnd(); } }
void animationReadEnd() { animationEnd(); }