PapersView.DocumentModel

g GObject.Object GObject.Object PapersView.DocumentModel PapersView.DocumentModel GObject.Object->PapersView.DocumentModel

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

class

new_with_document (document)

get_annotation_editing_state ()

get_continuous ()

get_document ()

get_dual_page_odd_pages_left ()

get_inverted_colors ()

get_max_scale ()

get_min_scale ()

get_page ()

get_page_layout ()

get_rotation ()

get_rtl ()

get_scale ()

get_sizing_mode ()

set_annotation_editing_state (state)

set_continuous (continuous)

set_document (document)

set_dual_page_odd_pages_left (odd_left)

set_inverted_colors (inverted_colors)

set_max_scale (max_scale)

set_min_scale (min_scale)

set_page (page)

set_page_by_label (page_label)

set_page_layout (layout)

set_rotation (rotation)

set_rtl (rtl)

set_scale (scale)

set_sizing_mode (mode)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

annotation-editing-state

PapersView.AnnotationEditingState

r/w

Whether the document is being ‘inked’

continuous

bool

r/w

Whether document is displayed in continuous mode

document

PapersDocument.Document

r/w

The current document

dual-odd-left

bool

r/w

Whether odd pages are displayed on left side in dual mode

inverted-colors

bool

r/w

Whether document is displayed with inverted colors

max-scale

float

r/w

Maximum scale factor

min-scale

float

r/w

Minimum scale factor

page

int

r/w

Current page

page-layout

PapersView.PageLayout

r/w

Current page layout

rotation

int

r/w

Current rotation angle

rtl

bool

r/w

Whether the document is written from right to left

scale

float

r/w

Current scale factor

sizing-mode

PapersView.SizingMode

r/w

Current sizing mode

Signals

Inherited:

GObject.Object (1)

Name

Short Description

page-changed

Fields

Inherited:

GObject.Object (1)

Class Details

class PapersView.DocumentModel(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

PapersView.DocumentModelClass

classmethod new()
Return type:

PapersView.DocumentModel

classmethod new_with_document(document)
Parameters:

document (PapersDocument.Document) –

Return type:

PapersView.DocumentModel

get_annotation_editing_state()
Return type:

PapersView.AnnotationEditingState

Returns the current editing state.

New in version 48.0.

get_continuous()
Return type:

bool

get_document()
Returns:

a PapersDocument.Document

Return type:

PapersDocument.Document

Returns the PapersDocument.Document referenced by the model.

get_dual_page_odd_pages_left()
Return type:

bool

get_inverted_colors()
Return type:

bool

get_max_scale()
Return type:

float

get_min_scale()
Return type:

float

get_page()
Return type:

int

get_page_layout()
Returns:

the document model’s page layout

Return type:

PapersView.PageLayout

New in version 3.8.

get_rotation()
Return type:

int

get_rtl()
Return type:

bool

get_scale()
Return type:

float

get_sizing_mode()
Return type:

PapersView.SizingMode

set_annotation_editing_state(state)
Parameters:

state (PapersView.AnnotationEditingState) – a PapersView.AnnotationEditingState

Sets the current editing state to state. In a PapersView.View, This implies that editing widgets for annotations may be shown and annotations not rendered by the backend.

New in version 48.0.

set_continuous(continuous)
Parameters:

continuous (bool) –

set_document(document)
Parameters:

document (PapersDocument.Document or None) – a PapersView.DocumentModel

Set the document.

set_dual_page_odd_pages_left(odd_left)
Parameters:

odd_left (bool) –

set_inverted_colors(inverted_colors)
Parameters:

inverted_colors (bool) –

set_max_scale(max_scale)
Parameters:

max_scale (float) –

set_min_scale(min_scale)
Parameters:

min_scale (float) –

set_page(page)
Parameters:

page (int) –

set_page_by_label(page_label)
Parameters:

page_label (str) –

set_page_layout(layout)
Parameters:

layout (PapersView.PageLayout) – a PapersView.PageLayout

Sets the document model’s page layout to layout.

New in version 3.8.

set_rotation(rotation)
Parameters:

rotation (int) –

set_rtl(rtl)
Parameters:

rtl (bool) –

set_scale(scale)
Parameters:

scale (float) –

set_sizing_mode(mode)
Parameters:

mode (PapersView.SizingMode) –

Signal Details

PapersView.DocumentModel.signals.page_changed(document_model, object, p0)
Signal Name:

page-changed

Flags:

RUN_LAST

Parameters:

Property Details

PapersView.DocumentModel.props.annotation_editing_state
Name:

annotation-editing-state

Type:

PapersView.AnnotationEditingState

Default Value:

PapersView.AnnotationEditingState.NONE

Flags:

READABLE, WRITABLE

Whether the document is being ‘inked’

PapersView.DocumentModel.props.continuous
Name:

continuous

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

Whether document is displayed in continuous mode

PapersView.DocumentModel.props.document
Name:

document

Type:

PapersDocument.Document

Default Value:

None

Flags:

READABLE, WRITABLE

The current document

PapersView.DocumentModel.props.dual_odd_left
Name:

dual-odd-left

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Whether odd pages are displayed on left side in dual mode

PapersView.DocumentModel.props.inverted_colors
Name:

inverted-colors

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Whether document is displayed with inverted colors

PapersView.DocumentModel.props.max_scale
Name:

max-scale

Type:

float

Default Value:

5.0

Flags:

READABLE, WRITABLE

Maximum scale factor

PapersView.DocumentModel.props.min_scale
Name:

min-scale

Type:

float

Default Value:

0.25

Flags:

READABLE, WRITABLE

Minimum scale factor

PapersView.DocumentModel.props.page
Name:

page

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE

Current page

PapersView.DocumentModel.props.page_layout
Name:

page-layout

Type:

PapersView.PageLayout

Default Value:

PapersView.PageLayout.SINGLE

Flags:

READABLE, WRITABLE

Current page layout

PapersView.DocumentModel.props.rotation
Name:

rotation

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

Current rotation angle

PapersView.DocumentModel.props.rtl
Name:

rtl

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Whether the document is written from right to left

PapersView.DocumentModel.props.scale
Name:

scale

Type:

float

Default Value:

1.0

Flags:

READABLE, WRITABLE

Current scale factor

PapersView.DocumentModel.props.sizing_mode
Name:

sizing-mode

Type:

PapersView.SizingMode

Default Value:

PapersView.SizingMode.FIT_WIDTH

Flags:

READABLE, WRITABLE

Current sizing mode