| 75 | } |
| 76 | |
| 77 | void PageLabelWidget::hide() |
| 78 | { |
| 79 | if (this->pos().y() >= 0 && animation->state() != QPropertyAnimation::Running) { |
| 80 | auto parent = dynamic_cast<QWidget *>(this->parent()); |
| 81 | if (parent == nullptr) { |
| 82 | return; |
| 83 | } |
| 84 | // connect(animation,SIGNAL(finished()),this,SLOT(setHidden())); |
| 85 | animation->setStartValue(QPoint((parent->geometry().size().width() - this->width()), 0)); |
| 86 | animation->setEndValue(QPoint((parent->geometry().size().width() - this->width()), -this->height())); |
| 87 | animation->start(); |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | void PageLabelWidget::setText(const QString &text) |
| 92 | { |
no test coverage detected