| 52 | void ElaProgressBar::paintEvent(QPaintEvent* event) |
| 53 | { |
| 54 | Q_D(ElaProgressBar); |
| 55 | if (!d->_isBusyAnimation && minimum() == 0 && maximum() == 0) |
| 56 | { |
| 57 | QStyleOptionProgressBar option; |
| 58 | option.initFrom(this); |
| 59 | d->_isBusyAnimation = true; |
| 60 | d->_busyAnimation->setStartValue(-75); |
| 61 | if (orientation() == Qt::Horizontal) |
| 62 | { |
| 63 | d->_busyAnimation->setEndValue(this->width()); |
| 64 | } |
| 65 | else |
| 66 | { |
| 67 | d->_busyAnimation->setEndValue(this->height()); |
| 68 | } |
| 69 | d->_busyAnimation->start(); |
| 70 | } |
| 71 | QProgressBar::paintEvent(event); |
| 72 | } |
| 73 | |
| 74 | void ElaProgressBar::resizeEvent(QResizeEvent* event) |
| 75 | { |
| 76 | Q_D(ElaProgressBar); |
| 77 | if (orientation() == Qt::Horizontal) |
nothing calls this directly
no outgoing calls
no test coverage detected