The sidebarview module

SidebarView, a special View with miniatures to use as a sidebar for a View.

Automatically displays all pages in a view in small size, and makes it easier to browse large documents.

class SidebarView(parent=None, **kwds)[source]

Bases: qpageview.selector.SelectorViewMixin, qpageview.util.LongMousePressMixin, qpageview.view.View

A special View with miniatures to use as a sidebar for a View.

Automatically displays all pages in a view in small size, and makes it easier to browse large documents. Use setView() to connect a View, and it automatically shows the pages, also when the view is changed.

MAX_ZOOM = 1.0
pagingOnScrollEnabled = False

whether to keep track of current page while scrolling

wheelZoomingEnabled = False

whether to enable mouse wheel zooming

firstPageNumber = 1
scrollupdatespersec = 100

how many scroll updates to draw per second (50, 50 is recommended).

autoOrientationEnabled = True
setOrientation(orientation)[source]

Reimplemented to also set the corresponding view mode.

setLayoutFontHeight()[source]

Reads the current font height and reserves enough space in the layout.

setView(view)[source]

Connects to a View, or disconnects the current view if view is None.

slotLayoutUpdated()[source]

Called when the layout of the connected view is updated.

slotCurrentPageNumberChanged(num)[source]

Called when the page number in the connected view changes.

Does not scroll but updates the current page mark in our View.

paintEvent(ev)[source]

Reimplemented to print page numbers and a selection box.

wheelEvent(ev)[source]

Reimplemented to page instead of scroll.

keyPressEvent(ev)[source]

Reimplemented to page instead of scroll.

resizeEvent(ev)[source]

Reimplemented to auto-change the orientation if desired.

changeEvent(ev)[source]

Reimplemented to set the correct font height for the page numbers.