PapersDocument.Annotation¶
- Subclasses:
 
Methods¶
- Inherited:
 - Structs:
 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
- Inherited:
 
Properties¶
Name  | 
Type  | 
Flags  | 
Short Description  | 
|---|---|---|---|
r/w  | 
The area of the page where the annotation is placed  | 
||
r/w  | 
The annotation border width  | 
||
r/w  | 
The annotation contents  | 
||
r/w  | 
Whether the annotation is hidden or not  | 
||
r/w  | 
Last modified date as string  | 
||
r/w  | 
The annotation unique name  | 
||
w/co  | 
The page wehere the annotation is  | 
||
r/w  | 
Signals¶
- Inherited:
 
Fields¶
- Inherited:
 
Name  | 
Type  | 
Access  | 
Description  | 
|---|---|---|---|
parent_instance  | 
r  | 
Class Details¶
- class PapersDocument.Annotation(**kwargs)¶
 - Bases:
 - Abstract:
 Yes
- Structure:
 
- equal(other)¶
 - Parameters:
 other (
PapersDocument.Annotation) – anotherPapersDocument.Annotation- Returns:
 - Return type:
 
Compare self and other.
- get_annotation_type()¶
 - Return type:
 
- get_area()¶
 - Returns:
 a
PapersDocument.Rectangleto be filled with the annotation area- Return type:
 area:
PapersDocument.Rectangle
Gets the area of self.
New in version 3.18.
- get_contents()¶
 - Returns:
 a string with the contents of the annotation or
Noneif self has no contents.- Return type:
 
Get the contents of self. The contents of self is the text that is displayed in the annotation, or an alternate description of the annotation’s content for non-text annotations
- Return type:
 
Gets the hidden flag of self, i.e. whether it is hidden or not.
New in version 48.0.
- get_modified()¶
 - Returns:
 A string containing the last modification date.
- Return type:
 
Get the last modification date of self.
- get_name()¶
 - Returns:
 the string with the annotation’s name.
- Return type:
 
Get the name of self. The name of the annotation is a string that uniquely indenftifies self amongs all the annotations in the same page.
- get_page()¶
 - Returns:
 the
PapersDocument.Pagewhere self appears- Return type:
 
Get the page where self appears.
- get_page_index()¶
 - Returns:
 the page index.
- Return type:
 
Get the index of the page where self appears. Note that the index is 0 based.
- get_rgba()¶
 - 
Gets the color of self.
New in version 3.6.
 
- set_area(area)¶
 - Parameters:
 area (
PapersDocument.Rectangle) – aPapersDocument.Rectangle- Returns:
 - Return type:
 
Set the area of the annotation to area.
New in version 3.18.
- set_border_width(width)¶
 - Parameters:
 width (
float) – double- Returns:
 - Return type:
 
Set the area of the annotation to area.
New in version 48.0.
- set_contents(contents)¶
 - Parameters:
 contents (
str) –- Returns:
 - Return type:
 
Set the contents of self. You can monitor changes in the annotation’s contents by connecting to notify::contents signal of self.
- Parameters:
 hidden (
bool) – a boolean- Returns:
 Trueif the visibility of the annotation has been changed,Falseotherwise- Return type:
 
Set whether the annotation is hidden or not.
New in version 48.0.
- set_modified(modified)¶
 - Parameters:
 modified (
str) – string with the last modification date.- Returns:
 Trueif the last modification date has been updated,Falseotherwise.- Return type:
 
Set the last modification date of self to modified. To set the last modification date using a #time_t, use
PapersDocument.Annotation.set_modified_from_time_t() instead. You can monitor changes to the last modification date by connecting to the notify::modified signal on self.
- set_modified_from_time_t(utime)¶
 - Parameters:
 utime (
int) – a #time_t- Returns:
 Trueif the last modified date has been updated,Falseotherwise.- Return type:
 
Set the last modification date of self to utime. You can monitor changes to the last modification date by connecting to the notify::modified sinal on self. For the time-format used, see
PapersDocument.Document.misc_format_datetime().
Property Details¶
- PapersDocument.Annotation.props.area¶
 - Name:
 area- Type:
 - Default Value:
 - Flags:
 
The area of the page where the annotation is placed.
New in version 3.18.
- PapersDocument.Annotation.props.border_width¶
 - 
The border width of the annotation. This is only partially implemented, as there is no way to set the color. Thus, it may only be used for padding at this moment.
New in version 48.0.
 
- PapersDocument.Annotation.props.contents¶
 - 
The annotation contents
 
- 
A flag to hide an annotation from the view.
New in version 48.0.
 
- PapersDocument.Annotation.props.modified¶
 - 
Last modified date as string
 
- PapersDocument.Annotation.props.name¶
 - 
The annotation unique name
 
- PapersDocument.Annotation.props.page¶
 - Name:
 page- Type:
 - Default Value:
 - Flags:
 
The page wehere the annotation is