| 1 | #include "AnimatedJdspIcon.h" |
| 2 | |
| 3 | AnimatedJDSPIcon::AnimatedJDSPIcon(QWidget *parent) |
| 4 | : QWidget(parent) |
| 5 | { |
| 6 | svgItem->setGeometry(0, 0, 64, 64); |
| 7 | svgItemU->setGeometry(0, 0, 64, 64); |
| 8 | svgItemL->setGeometry(0, 0, 64, 64); |
| 9 | this->setGeometry(0, 0, 64, 64); |
| 10 | this->setFixedSize(64, 64); |
| 11 | |
| 12 | svgItemU->hide(); |
| 13 | svgItemL->hide(); |
| 14 | |
| 15 | group = new QParallelAnimationGroup(this); |
| 16 | QPropertyAnimation *upper = new QPropertyAnimation(svgItemU, "geometry"); |
| 17 | upper->setDuration(700); |
| 18 | upper->setEasingCurve(QEasingCurve::Type::OutCirc); |
| 19 | upper->setStartValue(QRect(0, -64, 64, 64)); |
| 20 | upper->setEndValue(QRect(0, 0, 64, 64)); |
| 21 | group->addAnimation(upper); |
| 22 | QPropertyAnimation *lower = new QPropertyAnimation(svgItemL, "geometry"); |
| 23 | lower->setDuration(700); |
| 24 | lower->setEasingCurve(QEasingCurve::Type::OutCirc); |
| 25 | lower->setStartValue(QRect(0, 128, 64, 64)); |
| 26 | lower->setEndValue(QRect(0, 0, 64, 64)); |
| 27 | group->addAnimation(lower); |
| 28 | } |
| 29 | |
| 30 | AnimatedJDSPIcon::~AnimatedJDSPIcon() |
| 31 | { |
nothing calls this directly
no test coverage detected