MCPcopy Create free account
hub / github.com/YACReader/yacreader / setIndex

Method setIndex

common/comic.cpp:171–183  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

169}
170//-----------------------------------------------------------------------------
171void Comic::setIndex(unsigned int index)
172{
173 int previousIndex = _index;
174 if (static_cast<int>(index) < _pages.size() - 1) {
175 _index = index;
176 } else {
177 _index = _pages.size() - 1;
178 }
179
180 if (previousIndex != _index) {
181 emit pageChanged(_index);
182 }
183}
184//-----------------------------------------------------------------------------
185/*QPixmap * Comic::currentPage()
186{

Callers 3

nextDoublePageMethod · 0.80
previousDoublePageMethod · 0.80
goToMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected