| 18 | } |
| 19 | |
| 20 | void PageControlComponent::updatePageControl(int count) |
| 21 | { |
| 22 | pageCount = count; |
| 23 | |
| 24 | if (pageCount > 1) { |
| 25 | lastPageButton->setVisible(true); |
| 26 | lastPageButton->setText(QString::number(count)); |
| 27 | } else { |
| 28 | lastPageButton->setVisible(false); |
| 29 | } |
| 30 | |
| 31 | if (currentPageIndex >= pageCount) |
| 32 | currentPageIndex = pageCount - 1; |
| 33 | |
| 34 | updatePageButtons(); |
| 35 | } |
| 36 | |
| 37 | int PageControlComponent::currentIndex() const |
| 38 | { |
no test coverage detected