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

Method onPageAvailable

YACReader/continuous_page_widget.cpp:182–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180}
181
182void ContinuousPageWidget::onPageAvailable(int absolutePageIndex)
183{
184 if (!provider || !continuousViewModel || absolutePageIndex < 0 || absolutePageIndex >= continuousViewModel->numPages()) {
185 return;
186 }
187
188 const QImage *img = provider->image(absolutePageIndex);
189 if (!img || img->isNull()) {
190 return;
191 }
192
193 // The page's source pixels changed; drop the stale scaled image and any
194 // in-flight scale so the next paint reschedules it from the new source.
195 scaledPageCache.invalidatePage(absolutePageIndex);
196 pendingScaleRequests.remove(absolutePageIndex);
197
198 update(pageRectFor(absolutePageIndex));
199}
200
201void ContinuousPageWidget::paintEvent(QPaintEvent *event)
202{

Callers

nothing calls this directly

Calls 4

imageMethod · 0.80
invalidatePageMethod · 0.80
numPagesMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected