Okular
annotations.h
66 static void storeAnnotation(const Annotation *annotation, QDomElement &element, QDomDocument &document);
142 ExternallyDrawn = 256, ///< Is drawn externally (by the generator which provided it) @since 0.10 (KDE 4.4)
143 BeingMoved = 512, ///< Is being moved (mouse drag and drop). If ExternallyDrawn, the generator must not draw it @since 0.15 (KDE 4.9)
144 BeingResized = 1024 ///< Is being resized (mouse drag and drop). If ExternallyDrawn, the generator must not draw it @since 1.1.0
198 MousePressed, ///< Performed when the mouse button is pressed inside the annotation's active area @since 1.5
199 MouseReleased, ///< Performed when the mouse button is released inside the annotation's active area @since 1.5
769 virtual void notifyModification(const Annotation *annotation, int page, bool appearanceChanged) = 0;
1386 void setSignFunction(std::function<SigningResult(const Okular::NewSignatureData &, const QString &)> func);
This class describes the object rectangle for an annotation.
Definition area.h:556
virtual bool supports(Capability capability) const =0
Query for the supported capabilities.
virtual void notifyRemoval(Annotation *annotation, int page)=0
Called when an existing annotation at a given page is removed.
virtual void notifyAddition(Annotation *annotation, int page)=0
Called when a new annotation is added to a page.
virtual void notifyModification(const Annotation *annotation, int page, bool appearanceChanged)=0
Called after an existing annotation at a given page is modified.
Helper class for (recursive) annotation retrieval/storage.
Definition annotations.h:53
static QDomElement findChildElement(const QDomNode &parentNode, const QString &name)
Returns the child element with the given name from the direct children of parentNode or a null elemen...
Definition annotations.cpp:145
static QPixmap loadStamp(const QString &nameOrPath, int size, bool keepAspectRatio=true)
Returns a pixmap for a stamp symbol.
Definition annotations.cpp:173
static QRect annotationGeometry(const Annotation *annotation, double scaleX, double scaleY)
Returns the geometry of the given annotation scaled by scaleX and scaleY.
Definition annotations.cpp:160
static Annotation * createAnnotation(const QDomElement &element)
Restore an annotation (with revisions if needed) from the dom element.
Definition annotations.cpp:98
static void storeAnnotation(const Annotation *annotation, QDomElement &element, QDomDocument &document)
Saves the annotation as a child of element taking care of saving all revisions if it has any.
Definition annotations.cpp:136
Annotation * annotation() const
Returns the annotation the revision belongs to.
Definition annotations.cpp:529
void setAnnotation(Annotation *annotation)
Sets the annotation the revision belongs to.
Definition annotations.cpp:524
The Style class contains all information about style of the annotation.
Definition annotations.h:324
void setEffectIntensity(double intensity)
Sets the effect intensity of the style.
Definition annotations.cpp:371
double effectIntensity() const
Returns the effect intensity of the style.
Definition annotations.cpp:376
void setLineEffect(LineEffect effect)
Sets the line effect of the style.
Definition annotations.cpp:361
The Window class contains all information about the popup window of the annotation that is used to ed...
Definition annotations.h:459
void setSummary(const QString &summary)
Sets the summary of the window.
Definition annotations.cpp:474
NormalizedPoint topLeft() const
Returns the top-left point of the window.
Definition annotations.cpp:439
void setTopLeft(const NormalizedPoint &point)
Sets the top-left point of the window.
Definition annotations.cpp:434
Annotation struct holds properties shared by all annotations.
Definition annotations.h:99
bool canBeResized() const
Returns whether the annotation can be resized.
Definition annotations.cpp:801
QDateTime modificationDate() const
Returns the last modification date of the annotation.
Definition annotations.cpp:640
void setModificationDate(const QDateTime &date)
Sets the last modification date of the annotation.
Definition annotations.cpp:634
QDateTime creationDate() const
Returns the creation date of the annotation.
Definition annotations.cpp:652
NormalizedRect transformedBoundingRectangle() const
Returns the transformed bounding rectangle of the annotation.
Definition annotations.cpp:686
void setNativeData(std::shared_ptr< void > data)
Sets some native internal data with shared ownership.
Definition annotations.cpp:772
Window & window()
Returns a reference to the window object of the annotation.
Definition annotations.cpp:730
void(* DisposeDataFunction)(const Okular::Annotation *)
A function to be called when the annotation is destroyed.
Definition annotations.h:212
void setContents(const QString &contents)
Sets the contents of the annotation.
Definition annotations.cpp:610
void adjust(const NormalizedPoint &deltaCoord1, const NormalizedPoint &deltaCoord2)
Adjust the annotation by the specified coordinates.
Definition annotations.cpp:702
NormalizedRect boundingRectangle() const
Returns the bounding rectangle of the annotation.
Definition annotations.cpp:680
void setBoundingRectangle(const NormalizedRect &rectangle)
Sets the bounding rectangle of the annotation.
Definition annotations.cpp:670
void setNativeId(const QVariant &id)
Sets the "native" id of the annotation.
Definition annotations.cpp:754
void setCreationDate(const QDateTime &date)
Sets the creation date of the annotation.
Definition annotations.cpp:646
virtual void store(QDomNode &node, QDomDocument &document) const
Stores the annotation as xml in document under the given parent node.
Definition annotations.cpp:813
void setDisposeDataFunction(DisposeDataFunction func)
Sets a function to be called when the annotation is destroyed.
Definition annotations.cpp:766
@ ExternallyDrawn
Is drawn externally (by the generator which provided it)
Definition annotations.h:142
@ BeingMoved
Is being moved (mouse drag and drop). If ExternallyDrawn, the generator must not draw it.
Definition annotations.h:143
@ BeingResized
Is being resized (mouse drag and drop). If ExternallyDrawn, the generator must not draw it.
Definition annotations.h:144
QDomNode getAnnotationPropertiesDomNode() const
Retrieve the QDomNode representing this annotation's properties.
Definition annotations.cpp:907
void setUniqueName(const QString &name)
Sets the unique name of the annotation.
Definition annotations.cpp:622
@ PageClosing
Performed when the page containing the annotation is closed.
Definition annotations.h:195
@ MousePressed
Performed when the mouse button is pressed inside the annotation's active area.
Definition annotations.h:198
@ PageOpening
Performed when the page containing the annotation is opened.
Definition annotations.h:194
@ MouseReleased
Performed when the mouse button is released inside the annotation's active area.
Definition annotations.h:199
@ CursorEntering
Performed when the cursor enters the annotation's active area.
Definition annotations.h:196
@ CursorLeaving
Performed when the cursor exists the annotation's active area.
Definition annotations.h:197
void setAuthor(const QString &author)
Sets the author of the annotation.
Definition annotations.cpp:598
QList< Revision > & revisions()
Returns a reference to the revision list of the annotation.
Definition annotations.cpp:742
void translate(const NormalizedPoint &coord)
Move the annotation by the specified coordinates.
Definition annotations.cpp:692
Style & style()
Returns a reference to the style object of the annotation.
Definition annotations.cpp:718
void setAnnotationProperties(const QDomNode &node)
Sets annotations internal properties according to the contents of node.
Definition annotations.cpp:916
bool openDialogAfterCreation() const
Returns whether the annotation dialog should be open after creation of the annotation or not.
Definition annotations.cpp:712
virtual SubType subType() const =0
Returns the sub type of the annotation.
void setCapEnd(bool value)
Sets whether a cap should be used at the end.
Definition annotations.cpp:2031
bool capStart() const
Returns whether a cap should be used at the start.
Definition annotations.cpp:2026
NormalizedPoint point(int index) const
Returns the normalized point at index.
Definition annotations.cpp:2003
void setPoint(const NormalizedPoint &point, int index)
Sets the normalized point at index.
Definition annotations.cpp:1994
void transform(const QTransform &matrix)
Transforms the quad coordinates with the transformation defined by matrix.
Definition annotations.cpp:2051
void setCapStart(bool value)
Sets whether a cap should be used at the start.
Definition annotations.cpp:2021
NormalizedPoint transformedPoint(int index) const
Returns the transformed (e.g.
Definition annotations.cpp:2012
SubType subType() const override
Returns the sub type of the movie annotation.
Definition annotations.cpp:3104
void store(QDomNode &parentNode, QDomDocument &document) const override
Stores the movie annotation as xml in document under the given parentNode.
Definition annotations.cpp:3094
NormalizedPoint is a helper class which stores the coordinates of a normalized point.
Definition area.h:117
A NormalizedRect is a rectangle which can be defined by two NormalizedPoints.
Definition area.h:189
An area with normalized coordinates that contains a reference to an object.
Definition area.h:458
void store(QDomNode &parentNode, QDomDocument &document) const override
Stores the rich media annotation as xml in document under the given parentNode.
Definition annotations.cpp:3386
SubType subType() const override
Returns the sub type of the rich media annotation.
Definition annotations.cpp:3396
void setEmbeddedFile(EmbeddedFile *embeddedFile)
Sets the embeddedFile representing the embedded file.
Definition annotations.cpp:3423
void setAdditionalAction(AdditionalActionType type, Action *action)
Sets the additional action of the given type.
Definition annotations.cpp:3199
void setAction(Action *action)
Sets the action that is executed when the annotation is triggered.
Definition annotations.cpp:3219
Action * action() const
Returns the action that is executed when the annotation is triggered or 0 if not action has been defi...
Definition annotations.cpp:3227
Action * additionalAction(AdditionalActionType type) const
Returns the additional action of the given type or 0 if no action has been defined.
Definition annotations.cpp:3209
void store(QDomNode &parentNode, QDomDocument &document) const override
Stores the screen annotation as xml in document under the given parentNode.
Definition annotations.cpp:3184
SubType subType() const override
Returns the sub type of the screen annotation.
Definition annotations.cpp:3194
void store(QDomNode &node, QDomDocument &document) const override
Stores the sound annotation as xml in document under the given parent node.
Definition annotations.cpp:2996
void setSoundIconName(const QString &iconName)
Sets the iconName of the icon for the sound annotation.
Definition annotations.cpp:3017
SubType subType() const override
Returns the sub type of the sound annotation.
Definition annotations.cpp:3006
void setSound(Sound *s)
Sets the s representing the sound of the file attachment annotation.
Definition annotations.cpp:3029
void store(QDomNode &parentNode, QDomDocument &document) const override
Stores the widget annotation as xml in document under the given parentNode.
Definition annotations.cpp:3287
Action * additionalAction(AdditionalActionType type) const
Returns the additional action of the given type or 0 if no action has been defined.
Definition annotations.cpp:3312
SubType subType() const override
Returns the sub type of the widget annotation.
Definition annotations.cpp:3297
void setAdditionalAction(AdditionalActionType type, Action *action)
Sets the additional action of the given type.
Definition annotations.cpp:3302
None
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 14 2025 11:50:36 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 14 2025 11:50:36 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.