MCPcopy Create free account
hub / github.com/KDE/okular / setRotationInternal

Method setRotationInternal

core/document.cpp:5665–5688  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5663}
5664
5665void 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
5690void Document::setPageSize(const PageSize &size)
5691{

Callers 1

setRotationMethod · 0.80

Calls 3

notifySetupFunction · 0.85
rotateAtMethod · 0.80
rotationChangedMethod · 0.80

Tested by

no test coverage detected