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.
| 184 | // page item inside a given area of the scene. If no page is in the specified |
| 185 | // area, -1 is returned. |
| 186 | PDFDocumentScene::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. |
no outgoing calls
no test coverage detected