| 28 | } |
| 29 | |
| 30 | void FadingLabel::setAnimatedText(const QString &msg, bool highPriority) |
| 31 | { |
| 32 | if(fadeInOut->state() == QAbstractAnimation::Running) |
| 33 | { |
| 34 | if(lastAnimationHighPriority && !highPriority) |
| 35 | { |
| 36 | return; |
| 37 | } |
| 38 | |
| 39 | fadeInOut->stop(); |
| 40 | effect->setOpacity(1); |
| 41 | |
| 42 | fadeIn->setStartValue(1.0); |
| 43 | fadeIn->setDuration(0); |
| 44 | } |
| 45 | else |
| 46 | { |
| 47 | fadeIn->setStartValue(0.0); |
| 48 | fadeIn->setDuration(150); |
| 49 | } |
| 50 | |
| 51 | this->setText(msg); |
| 52 | fadeInOut->setCurrentTime(0); |
| 53 | fadeInOut->start(); |
| 54 | |
| 55 | lastAnimationHighPriority = highPriority; |
| 56 | } |
| 57 | |
| 58 | void FadingLabel::setAnimatedText(const QString &msg) |
| 59 | { |
no test coverage detected