| 628 | } |
| 629 | |
| 630 | void textInputItem::enterEditEffect(){ |
| 631 | editor->setCursorPosition(editor->text().length()); |
| 632 | editor->setStyleSheet("color:#1c1c1c;background-color:#00000000;border-style:none;"); |
| 633 | QParallelAnimationGroup *group = new QParallelAnimationGroup(this); |
| 634 | QPropertyAnimation *longer = new QPropertyAnimation(indicator, "geometry", this); |
| 635 | longer->setStartValue(indicator->geometry()); |
| 636 | longer->setEndValue(QRectF(this->width() * 0.3, this->height() - 7, this->width() * 0.7 - margin, 4)); |
| 637 | longer->setDuration(500); |
| 638 | longer->setEasingCurve(QEasingCurve::InOutExpo); |
| 639 | QPropertyAnimation *fade = new QPropertyAnimation(opac, "opacity", this); |
| 640 | fade->setStartValue(opac->opacity()); |
| 641 | fade->setEndValue(0.99); |
| 642 | fade->setDuration(150); |
| 643 | QPropertyAnimation *move = new QPropertyAnimation(editor, "geometry", this); |
| 644 | move->setStartValue(editor->geometry()); |
| 645 | move->setEndValue(QRectF(this->width() * 0.3, this->height() / 2 - editor->height() / 2 - 2, this->width() * 0.7 - margin, editor->height())); |
| 646 | move->setDuration(500); |
| 647 | move->setEasingCurve(QEasingCurve::InOutExpo); |
| 648 | group->addAnimation(longer); |
| 649 | group->addAnimation(fade); |
| 650 | group->addAnimation(move); |
| 651 | group->start(); |
| 652 | } |
| 653 | |
| 654 | void textInputItem::leaveEditEffect(){ |
| 655 | editor->setCursorPosition(0); |
nothing calls this directly
no test coverage detected