Okular::Annotation

Search for usage in LXR

Okular::Annotation Class Referenceabstract

#include <annotations.h>

Inheritance diagram for Okular::Annotation:

Classes

class  Revision
 
class  Style
 
class  Window
 

Public Types

enum  AdditionalActionType {
  PageOpening, PageClosing, CursorEntering, CursorLeaving,
  MousePressed, MouseReleased, FocusIn, FocusOut
}
 
typedef void(* DisposeDataFunction) (const Okular::Annotation *)
 
enum  Flag {
  Hidden = 1, FixedSize = 2, FixedRotation = 4, DenyPrint = 8,
  DenyWrite = 16, DenyDelete = 32, ToggleHidingOnMouse = 64, External = 128,
  ExternallyDrawn = 256, BeingMoved = 512, BeingResized = 1024
}
 
enum  LineEffect { NoEffect = 1, Cloudy = 2 }
 
enum  LineStyle {
  Solid = 1, Dashed = 2, Beveled = 4, Inset = 8,
  Underline = 16
}
 
enum  RevisionScope { Reply = 1, Group = 2, Delete = 4 }
 
enum  RevisionType {
  None = 1, Marked = 2, Unmarked = 4, Accepted = 8,
  Rejected = 16, Cancelled = 32, Completed = 64
}
 
enum  SubType {
  AText = 1, ALine = 2, AGeom = 3, AHighlight = 4,
  AStamp = 5, AInk = 6, ACaret = 8, AFileAttachment = 9,
  ASound = 10, AMovie = 11, AScreen = 12, AWidget = 13,
  ARichMedia = 14, A_BASE = 0
}
 

Public Member Functions

virtual ~Annotation ()
 
void adjust (const NormalizedPoint &deltaCoord1, const NormalizedPoint &deltaCoord2)
 
QString author () const
 
NormalizedRect boundingRectangle () const
 
bool canBeMoved () const
 
bool canBeResized () const
 
QString contents () const
 
QDateTime creationDate () const
 
int flags () const
 
QDomNode getAnnotationPropertiesDomNode () const
 
QDateTime modificationDate () const
 
QVariant nativeId () const
 
bool openDialogAfterCreation () const
 
QLinkedList< Revision > & revisions ()
 
const QLinkedList< Revision > & revisions () const
 
void setAnnotationProperties (const QDomNode &node)
 
void setAuthor (const QString &author)
 
void setBoundingRectangle (const NormalizedRect &rectangle)
 
void setContents (const QString &contents)
 
void setCreationDate (const QDateTime &date)
 
void setDisposeDataFunction (DisposeDataFunction func)
 
void setFlags (int flags)
 
void setModificationDate (const QDateTime &date)
 
void setNativeId (const QVariant &id)
 
void setUniqueName (const QString &name)
 
virtual void store (QDomNode &node, QDomDocument &document) const
 
Stylestyle ()
 
const Stylestyle () const
 
virtual SubType subType () const =0
 
NormalizedRect transformedBoundingRectangle () const
 
void translate (const NormalizedPoint &coord)
 
QString uniqueName () const
 
Windowwindow ()
 
const Windowwindow () const
 

Detailed Description

Annotation struct holds properties shared by all annotations.

An Annotation is an object (text note, highlight, sound, popup window, ..) contained by a Page in the document.

Definition at line 88 of file annotations.h.

Member Typedef Documentation

typedef void(* Okular::Annotation::DisposeDataFunction) (const Okular::Annotation *)

A function to be called when the annotation is destroyed.

Warning
the function must not call any virtual function, nor subcast.
Since
0.7 (KDE 4.1)

Definition at line 202 of file annotations.h.

Member Enumeration Documentation

Describes the type of additional actions.

Since
0.16 (KDE 4.10)
Enumerator
PageOpening 

Performed when the page containing the annotation is opened.

PageClosing 

Performed when the page containing the annotation is closed.

CursorEntering 

Performed when the cursor enters the annotation's active area.

Since
1.5
CursorLeaving 

Performed when the cursor exists the annotation's active area.

Since
1.5
MousePressed 

Performed when the mouse button is pressed inside the annotation's active area.

Since
1.5
MouseReleased 

Performed when the mouse button is released inside the annotation's active area.

Since
1.5
FocusIn 

Performed when the annotation receives the input focus.

Since
1.5
FocusOut 

Performed when the annotation loses the input focus.

Since
1.5

Definition at line 183 of file annotations.h.

Describes additional properties of an annotation.

Enumerator
Hidden 

Is not shown in the document.

FixedSize 

Has a fixed size.

FixedRotation 

Has a fixed rotation.

DenyPrint 

Cannot be printed.

DenyWrite 

Cannot be changed.

DenyDelete 

Cannot be deleted.

ToggleHidingOnMouse 

Can be hidden/shown by mouse click.

External 

Is stored external.

ExternallyDrawn 

Is drawn externally (by the generator which provided it)

Since
0.10 (KDE 4.4)
BeingMoved 

Is being moved (mouse drag and drop). If ExternallyDrawn, the generator must not draw it.

Since
0.15 (KDE 4.9)
BeingResized 

Is being resized (mouse drag and drop). If ExternallyDrawn, the generator must not draw it.

Since
1.1.0

Definition at line 123 of file annotations.h.

Describes possible line effects for.

See also
ALine annotation.
Enumerator
NoEffect 

No effect.

Cloudy 

The cloudy effect.

Definition at line 151 of file annotations.h.

Describes possible line styles for.

See also
ALine annotation.
Enumerator
Solid 

A solid line.

Dashed 

A dashed line.

Beveled 

A beveled line.

Inset 

An inset line.

Underline 

An underline.

Definition at line 140 of file annotations.h.

Describes the scope of revision information.

Enumerator
Reply 

Belongs to a reply.

Group 

Belongs to a group.

Delete 

Belongs to a deleted paragraph.

Definition at line 159 of file annotations.h.

Describes the type of revision information.

Enumerator
None 

Not specified.

Marked 

Is marked.

Unmarked 

Is unmarked.

Accepted 

Has been accepted.

Rejected 

Was rejected.

Cancelled 

Has been cancelled.

Completed 

Has been completed.

Definition at line 168 of file annotations.h.

Describes the type of annotation as defined in PDF standard.

Enumerator
AText 

A textual annotation.

ALine 

A line annotation.

AGeom 

A geometrical annotation.

AHighlight 

A highlight annotation.

AStamp 

A stamp annotation.

AInk 

An ink annotation.

ACaret 

A caret annotation.

AFileAttachment 

A file attachment annotation.

ASound 

A sound annotation.

AMovie 

A movie annotation.

AScreen 

A screen annotation.

AWidget 

A widget annotation.

ARichMedia 

A rich media annotation.

A_BASE 

The annotation base class.

Definition at line 103 of file annotations.h.

Constructor & Destructor Documentation

Annotation::~Annotation ( )
virtual

Destroys the annotation.

Definition at line 526 of file annotations.cpp.

Member Function Documentation

void Annotation::adjust ( const NormalizedPoint deltaCoord1,
const NormalizedPoint deltaCoord2 
)

Adjust the annotation by the specified coordinates.

Adds coordinates of deltaCoord1 to annotations top left corner, and deltaCoord2 to the bottom right.

See also
canBeResized()

Definition at line 638 of file annotations.cpp.

QString Annotation::author ( ) const

Returns the author of the annotation.

Definition at line 540 of file annotations.cpp.

NormalizedRect Annotation::boundingRectangle ( ) const

Returns the bounding rectangle of the annotation.

Definition at line 616 of file annotations.cpp.

bool Annotation::canBeMoved ( ) const

Returns whether the annotation can be moved.

Since
0.7 (KDE 4.1)

Definition at line 708 of file annotations.cpp.

bool Annotation::canBeResized ( ) const

Returns whether the annotation can be resized.

Definition at line 723 of file annotations.cpp.

QString Annotation::contents ( ) const

Returns the contents of the annotation.

Definition at line 552 of file annotations.cpp.

QDateTime Annotation::creationDate ( ) const

Returns the creation date of the annotation.

Definition at line 588 of file annotations.cpp.

int Annotation::flags ( ) const

Returns the flags of the annotation.

See also
Flag

Definition at line 600 of file annotations.cpp.

QDomNode Annotation::getAnnotationPropertiesDomNode ( ) const

Retrieve the QDomNode representing this annotation's properties.

Since
0.17 (KDE 4.11)

Definition at line 821 of file annotations.cpp.

QDateTime Annotation::modificationDate ( ) const

Returns the last modification date of the annotation.

Definition at line 576 of file annotations.cpp.

QVariant Annotation::nativeId ( ) const

Returns the "native" id of the annotation.

Since
0.7 (KDE 4.1)

Definition at line 696 of file annotations.cpp.

bool Annotation::openDialogAfterCreation ( ) const

Returns whether the annotation dialog should be open after creation of the annotation or not.

Since
0.13 (KDE 4.7)

Definition at line 648 of file annotations.cpp.

QLinkedList< Annotation::Revision > & Annotation::revisions ( )

Returns a reference to the revision list of the annotation.

Definition at line 678 of file annotations.cpp.

const QLinkedList< Annotation::Revision > & Annotation::revisions ( ) const

Returns a reference to the revision list of the annotation.

Definition at line 684 of file annotations.cpp.

void Annotation::setAnnotationProperties ( const QDomNode node)

Sets annotations internal properties according to the contents of node.

Since
0.17 (KDE 4.11)

Definition at line 830 of file annotations.cpp.

void Annotation::setAuthor ( const QString author)

Sets the author of the annotation.

Definition at line 534 of file annotations.cpp.

void Annotation::setBoundingRectangle ( const NormalizedRect rectangle)

Sets the bounding rectangle of the annotation.

Definition at line 606 of file annotations.cpp.

void Annotation::setContents ( const QString contents)

Sets the contents of the annotation.

Definition at line 546 of file annotations.cpp.

void Annotation::setCreationDate ( const QDateTime date)

Sets the creation date of the annotation.

The date must be before or equal to

See also
modificationDate()

Definition at line 582 of file annotations.cpp.

void Annotation::setDisposeDataFunction ( DisposeDataFunction  func)

Sets a function to be called when the annotation is destroyed.

Warning
the function must not call any virtual function, nor subcast.
Since
0.7 (KDE 4.1)

Definition at line 702 of file annotations.cpp.

void Annotation::setFlags ( int  flags)

Sets the flags of the annotation.

See also
Flag

Definition at line 594 of file annotations.cpp.

void Annotation::setModificationDate ( const QDateTime date)

Sets the last modification date of the annotation.

The date must be before or equal to QDateTime::currentDateTime()

Definition at line 570 of file annotations.cpp.

void Annotation::setNativeId ( const QVariant id)

Sets the "native" id of the annotation.

This is for use of the Generator, that can optionally store an handle (a pointer, an identifier, etc) of the "native" annotation object, if any.

Note
Okular makes no use of this
Since
0.7 (KDE 4.1)

Definition at line 690 of file annotations.cpp.

void Annotation::setUniqueName ( const QString name)

Sets the unique name of the annotation.

Definition at line 558 of file annotations.cpp.

void Annotation::store ( QDomNode node,
QDomDocument document 
) const
virtual

Stores the annotation as xml in document under the given parent node.

Reimplemented in Okular::RichMediaAnnotation, Okular::WidgetAnnotation, Okular::ScreenAnnotation, Okular::MovieAnnotation, and Okular::SoundAnnotation.

Definition at line 734 of file annotations.cpp.

Annotation::Style & Annotation::style ( )

Returns a reference to the style object of the annotation.

Definition at line 654 of file annotations.cpp.

const Annotation::Style & Annotation::style ( ) const

Returns a const reference to the style object of the annotation.

Definition at line 660 of file annotations.cpp.

virtual SubType Okular::Annotation::subType ( ) const
pure virtual
NormalizedRect Annotation::transformedBoundingRectangle ( ) const

Returns the transformed bounding rectangle of the annotation.

This rectangle must be used when showing annotations on screen to have them rotated correctly.

Definition at line 622 of file annotations.cpp.

void Annotation::translate ( const NormalizedPoint coord)

Move the annotation by the specified coordinates.

See also
canBeMoved()

Definition at line 628 of file annotations.cpp.

QString Annotation::uniqueName ( ) const

Returns the unique name of the annotation.

Definition at line 564 of file annotations.cpp.

Annotation::Window & Annotation::window ( )

Returns a reference to the window object of the annotation.

Definition at line 666 of file annotations.cpp.

const Annotation::Window & Annotation::window ( ) const

Returns a const reference to the window object of the annotation.

Definition at line 672 of file annotations.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Wed May 12 2021 22:35:29 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.