MCPcopy Create free account
hub / github.com/TeXworks/texworks / pageNumAt

Method pageNumAt

modules/QtPDF/src/PDFDocumentScene.cpp:186–192  ·  view source on GitHub ↗

This is a convenience function for returning the page number of the first page item inside a given area of the scene. If no page is in the specified area, -1 is returned.

Source from the content-addressed store, hash-verified

184// page item inside a given area of the scene. If no page is in the specified
185// area, -1 is returned.
186PDFDocumentScene::size_type PDFDocumentScene::pageNumAt(const QPolygonF &polygon)
187{
188 QList<QGraphicsItem*> p(pages(polygon));
189 if (p.isEmpty())
190 return -1;
191 return static_cast<int>(_pages.indexOf(p.first()));
192}
193
194// This is a convenience function for returning the page number of the first
195// page item at a given point. If no page is in the specified area, -1 is returned.

Callers 3

paintEventMethod · 0.80
mousePressEventMethod · 0.80
mouseMoveEventMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected