MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / updatePageControl

Method updatePageControl

src/plugins/chat/widgets/pagecontrolcomponent.cpp:20–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20void 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
37int PageControlComponent::currentIndex() const
38{

Callers 2

initUIMethod · 0.80

Calls 3

numberClass · 0.85
setVisibleMethod · 0.80
setTextMethod · 0.45

Tested by

no test coverage detected