| 5663 | } |
| 5664 | |
| 5665 | void DocumentPrivate::setRotationInternal(int r, bool notify) |
| 5666 | { |
| 5667 | Rotation rotation = (Rotation)r; |
| 5668 | if (!m_generator || (m_rotation == rotation)) { |
| 5669 | return; |
| 5670 | } |
| 5671 | |
| 5672 | // tell the pages to rotate |
| 5673 | for (Page *const page : std::as_const(m_pagesVector)) { |
| 5674 | page->d->rotateAt(rotation); |
| 5675 | } |
| 5676 | if (notify) { |
| 5677 | // notify the generator that the current rotation has changed |
| 5678 | m_generator->rotationChanged(rotation, m_rotation); |
| 5679 | } |
| 5680 | // set the new rotation |
| 5681 | m_rotation = rotation; |
| 5682 | |
| 5683 | if (notify) { |
| 5684 | foreachObserverD(notifySetup(m_pagesVector, DocumentObserver::NewLayoutForPages)); |
| 5685 | foreachObserverD(notifyContentsCleared(DocumentObserver::Pixmap | DocumentObserver::Highlights | DocumentObserver::Annotations)); |
| 5686 | } |
| 5687 | qCDebug(OkularCoreDebug) << "Rotated:" << r; |
| 5688 | } |
| 5689 | |
| 5690 | void Document::setPageSize(const PageSize &size) |
| 5691 | { |
no test coverage detected