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

Method setPageNaturalSize

YACReader/continuous_view_model.cpp:82–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void ContinuousViewModel::setPageNaturalSize(int pageIndex, const QSize &size)
83{
84 if (pageIndex < 0 || pageIndex >= numPagesValue || size.isEmpty()) {
85 return;
86 }
87
88 if (defaultPageSize == QSize(800, 1200)) {
89 defaultPageSize = size;
90 }
91
92 if (pageSizes[pageIndex] == size) {
93 return;
94 }
95
96 pageSizes[pageIndex] = size;
97 recompute(RecomputePolicy::PreserveViewportAnchor);
98}
99
100int ContinuousViewModel::numPages() const
101{

Calls 1

isEmptyMethod · 0.80

Tested by

no test coverage detected