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

Method updatePage

YACReader/viewer.cpp:392–434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390}
391
392void Viewer::updatePage()
393{
394 if (continuousScroll) {
395 return;
396 }
397
398 setActiveWidget(content);
399
400 QPixmap *previousPage = currentPage;
401 if (doublePage) {
402 if (!doubleMangaPage)
403 currentPage = render->getCurrentDoublePage();
404 else {
405 currentPage = render->getCurrentDoubleMangaPage();
406 }
407 if (currentPage == nullptr) {
408 currentPage = render->getCurrentPage();
409 }
410 } else {
411 currentPage = render->getCurrentPage();
412 }
413 content->setPixmap(*currentPage);
414 updateContentSize();
415 updateVerticalScrollBar();
416
417 if (goToFlow->isHidden())
418 setFocus(Qt::ShortcutFocusReason);
419 else
420 goToFlow->setFocus(Qt::OtherFocusReason);
421 delete previousPage;
422
423 if (currentPage->isNull())
424 setPageUnavailableMessage();
425 else
426 emit pageAvailable(true);
427
428 emit backgroundChanges();
429
430 if (restoreMagnifyingGlass) {
431 restoreMagnifyingGlass = false;
432 showMagnifyingGlass();
433 }
434}
435
436void Viewer::updateContentSize()
437{

Callers 5

fitToWidthMethod · 0.80
fitToHeightMethod · 0.80
fitToPageSwitchMethod · 0.80
resetZoomLevelMethod · 0.80

Calls 4

getCurrentDoublePageMethod · 0.80
setPixmapMethod · 0.80
getCurrentPageMethod · 0.45

Tested by

no test coverage detected