File indexing completed on 2024-04-28 04:32:36

0001 /*
0002     SPDX-FileCopyrightText: 2005 Enrico Ros <eros.kde@email.it>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef _OKULAR_ANNOTATIONS_H_
0008 #define _OKULAR_ANNOTATIONS_H_
0009 
0010 #include <QDateTime>
0011 #include <QDomDocument>
0012 #include <QDomElement>
0013 #include <QFont>
0014 #include <QRect>
0015 #include <QString>
0016 
0017 #include "area.h"
0018 #include "okularcore_export.h"
0019 
0020 namespace Okular
0021 {
0022 class Action;
0023 class Annotation;
0024 class AnnotationObjectRect;
0025 class AnnotationPrivate;
0026 class Document;
0027 class EmbeddedFile;
0028 class Page;
0029 class PagePrivate;
0030 class Sound;
0031 class Movie;
0032 class TextAnnotationPrivate;
0033 class LineAnnotationPrivate;
0034 class GeomAnnotationPrivate;
0035 class HighlightAnnotationPrivate;
0036 class StampAnnotationPrivate;
0037 class InkAnnotationPrivate;
0038 class CaretAnnotationPrivate;
0039 class FileAttachmentAnnotationPrivate;
0040 class SoundAnnotationPrivate;
0041 class MovieAnnotationPrivate;
0042 class ScreenAnnotationPrivate;
0043 class WidgetAnnotationPrivate;
0044 class RichMediaAnnotationPrivate;
0045 
0046 /**
0047  * @short Helper class for (recursive) annotation retrieval/storage.
0048  */
0049 class OKULARCORE_EXPORT AnnotationUtils
0050 {
0051 public:
0052     /**
0053      * Restore an annotation (with revisions if needed) from the dom @p element.
0054      *
0055      * Returns a pointer to the complete annotation or 0 if element is invalid.
0056      */
0057     static Annotation *createAnnotation(const QDomElement &element);
0058 
0059     /**
0060      * Saves the @p annotation as a child of @p element taking
0061      * care of saving all revisions if it has any.
0062      */
0063     static void storeAnnotation(const Annotation *annotation, QDomElement &element, QDomDocument &document);
0064 
0065     /**
0066      * Returns the child element with the given @p name from the direct
0067      * children of @p parentNode or a null element if not found.
0068      */
0069     static QDomElement findChildElement(const QDomNode &parentNode, const QString &name);
0070 
0071     /**
0072      * Returns the geometry of the given @p annotation scaled by
0073      * @p scaleX and @p scaleY.
0074      */
0075     static QRect annotationGeometry(const Annotation *annotation, double scaleX, double scaleY);
0076 
0077     /**
0078      * Returns a pixmap for a stamp symbol
0079      *
0080      * @p name Name of a Okular stamp symbol, icon or path to an image
0081      * @p size Size of the pixmap side
0082      * @p keepAspectRatio Whether to keep aspect ratio of the stamp or not
0083      *
0084      * @since 21.12
0085      */
0086     static QPixmap loadStamp(const QString &nameOrPath, int size, bool keepAspectRatio = true);
0087 };
0088 
0089 /**
0090  * @short Annotation struct holds properties shared by all annotations.
0091  *
0092  * An Annotation is an object (text note, highlight, sound, popup window, ..)
0093  * contained by a Page in the document.
0094  */
0095 class OKULARCORE_EXPORT Annotation
0096 {
0097     /// @cond PRIVATE
0098     friend class AnnotationObjectRect;
0099     friend class Document;
0100     friend class DocumentPrivate;
0101     friend class ObjectRect;
0102     friend class Page;
0103     friend class PagePrivate;
0104     /// @endcond
0105 
0106 public:
0107     /**
0108      * Describes the type of annotation as defined in PDF standard.
0109      */
0110     enum SubType {
0111         AText = 1,           ///< A textual annotation
0112         ALine = 2,           ///< A line annotation
0113         AGeom = 3,           ///< A geometrical annotation
0114         AHighlight = 4,      ///< A highlight annotation
0115         AStamp = 5,          ///< A stamp annotation
0116         AInk = 6,            ///< An ink annotation
0117         ACaret = 8,          ///< A caret annotation
0118         AFileAttachment = 9, ///< A file attachment annotation
0119         ASound = 10,         ///< A sound annotation
0120         AMovie = 11,         ///< A movie annotation
0121         AScreen = 12,        ///< A screen annotation
0122         AWidget = 13,        ///< A widget annotation
0123         ARichMedia = 14,     ///< A rich media annotation
0124         A_BASE = 0           ///< The annotation base class
0125     };
0126 
0127     /**
0128      * Describes additional properties of an annotation.
0129      */
0130     enum Flag {
0131         Hidden = 1,               ///< Is not shown in the document
0132         FixedSize = 2,            ///< Has a fixed size
0133         FixedRotation = 4,        ///< Has a fixed rotation
0134         DenyPrint = 8,            ///< Cannot be printed
0135         DenyWrite = 16,           ///< Cannot be changed
0136         DenyDelete = 32,          ///< Cannot be deleted
0137         ToggleHidingOnMouse = 64, ///< Can be hidden/shown by mouse click
0138         External = 128,           ///< Is stored external
0139         ExternallyDrawn = 256,    ///< Is drawn externally (by the generator which provided it) @since 0.10 (KDE 4.4)
0140         BeingMoved = 512,         ///< Is being moved (mouse drag and drop). If ExternallyDrawn, the generator must not draw it @since 0.15 (KDE 4.9)
0141         BeingResized = 1024       ///< Is being resized (mouse drag and drop). If ExternallyDrawn, the generator must not draw it @since 1.1.0
0142     };
0143 
0144     /**
0145      * Describes possible line styles for @see ALine annotation.
0146      */
0147     enum LineStyle {
0148         Solid = 1,     ///< A solid line
0149         Dashed = 2,    ///< A dashed line
0150         Beveled = 4,   ///< A beveled line
0151         Inset = 8,     ///< An inset line
0152         Underline = 16 ///< An underline
0153     };
0154 
0155     /**
0156      * Describes possible line effects for @see ALine annotation.
0157      */
0158     enum LineEffect {
0159         NoEffect = 1, ///< No effect
0160         Cloudy = 2    ///< The cloudy effect
0161     };
0162 
0163     /**
0164      * Describes the scope of revision information.
0165      */
0166     enum RevisionScope {
0167         Reply = 1, ///< Belongs to a reply
0168         Group = 2, ///< Belongs to a group
0169         Delete = 4 ///< Belongs to a deleted paragraph
0170     };
0171 
0172     /**
0173      * Describes the type of revision information.
0174      */
0175     enum RevisionType {
0176         None = 1,       ///< Not specified
0177         Marked = 2,     ///< Is marked
0178         Unmarked = 4,   ///< Is unmarked
0179         Accepted = 8,   ///< Has been accepted
0180         Rejected = 16,  ///< Was rejected
0181         Cancelled = 32, ///< Has been cancelled
0182         Completed = 64  ///< Has been completed
0183     };
0184 
0185     /**
0186      * Describes the type of additional actions.
0187      *
0188      * @since 0.16 (KDE 4.10)
0189      */
0190     enum AdditionalActionType {
0191         PageOpening,    ///< Performed when the page containing the annotation is opened.
0192         PageClosing,    ///< Performed when the page containing the annotation is closed.
0193         CursorEntering, ///< Performed when the cursor enters the annotation's active area @since 1.5
0194         CursorLeaving,  ///< Performed when the cursor exists the annotation's active area @since 1.5
0195         MousePressed,   ///< Performed when the mouse button is pressed inside the annotation's active area @since 1.5
0196         MouseReleased,  ///< Performed when the mouse button is released inside the annotation's active area @since 1.5
0197         FocusIn,        ///< Performed when the annotation receives the input focus @since 1.5
0198         FocusOut,       ///< Performed when the annotation loses the input focus @since 1.5
0199     };
0200 
0201     /**
0202      * A function to be called when the annotation is destroyed.
0203      *
0204      * @warning the function must *not* call any virtual function,
0205      *          nor subcast.
0206      *
0207      * @since 0.7 (KDE 4.1)
0208      */
0209     typedef void (*DisposeDataFunction)(const Okular::Annotation *);
0210 
0211     /**
0212      * Destroys the annotation.
0213      */
0214     virtual ~Annotation();
0215 
0216     /**
0217      * Sets the @p author of the annotation.
0218      */
0219     void setAuthor(const QString &author);
0220 
0221     /**
0222      * Returns the author of the annotation.
0223      */
0224     QString author() const;
0225 
0226     /**
0227      * Sets the @p contents of the annotation.
0228      */
0229     void setContents(const QString &contents);
0230 
0231     /**
0232      * Returns the contents of the annotation.
0233      */
0234     QString contents() const;
0235 
0236     /**
0237      * Sets the unique @p name of the annotation.
0238      */
0239     void setUniqueName(const QString &name);
0240 
0241     /**
0242      * Returns the unique name of the annotation.
0243      */
0244     QString uniqueName() const;
0245 
0246     /**
0247      * Sets the last modification @p date of the annotation.
0248      *
0249      * The date must be before or equal to QDateTime::currentDateTime()
0250      */
0251     void setModificationDate(const QDateTime &date);
0252 
0253     /**
0254      * Returns the last modification date of the annotation.
0255      */
0256     QDateTime modificationDate() const;
0257 
0258     /**
0259      * Sets the creation @p date of the annotation.
0260      *
0261      * The date must be before or equal to @see modificationDate()
0262      */
0263     void setCreationDate(const QDateTime &date);
0264 
0265     /**
0266      * Returns the creation date of the annotation.
0267      */
0268     QDateTime creationDate() const;
0269 
0270     /**
0271      * Sets the @p flags of the annotation.
0272      * @see @ref Flag
0273      */
0274     void setFlags(int flags);
0275 
0276     /**
0277      * Returns the flags of the annotation.
0278      * @see @ref Flag
0279      */
0280     int flags() const;
0281 
0282     /**
0283      * Sets the bounding @p rectangle of the annotation.
0284      */
0285     void setBoundingRectangle(const NormalizedRect &rectangle);
0286 
0287     /**
0288      * Returns the bounding rectangle of the annotation.
0289      */
0290     NormalizedRect boundingRectangle() const;
0291 
0292     /**
0293      * Returns the transformed bounding rectangle of the annotation.
0294      *
0295      * This rectangle must be used when showing annotations on screen
0296      * to have them rotated correctly.
0297      */
0298     NormalizedRect transformedBoundingRectangle() const;
0299 
0300     /**
0301      * Move the annotation by the specified coordinates.
0302      *
0303      * @see canBeMoved()
0304      */
0305     void translate(const NormalizedPoint &coord);
0306 
0307     /**
0308      * Adjust the annotation by the specified coordinates.
0309      * Adds coordinates of @p deltaCoord1 to annotations top left corner,
0310      * and @p deltaCoord2 to the bottom right.
0311      *
0312      * @see canBeResized()
0313      */
0314     void adjust(const NormalizedPoint &deltaCoord1, const NormalizedPoint &deltaCoord2);
0315 
0316     /**
0317      * The Style class contains all information about style of the
0318      * annotation.
0319      */
0320     class OKULARCORE_EXPORT Style
0321     {
0322     public:
0323         /**
0324          * Creates a new style.
0325          */
0326         Style();
0327 
0328         /**
0329          * Destroys the style.
0330          */
0331         ~Style();
0332 
0333         Style(const Style &other);
0334         Style &operator=(const Style &other);
0335 
0336         /**
0337          * Sets the @p color of the style.
0338          */
0339         void setColor(const QColor &color);
0340 
0341         /**
0342          * Returns the color of the style.
0343          */
0344         QColor color() const;
0345 
0346         /**
0347          * Sets the @p opacity of the style.
0348          */
0349         void setOpacity(double opacity);
0350 
0351         /**
0352          * Returns the opacity of the style.
0353          */
0354         double opacity() const;
0355 
0356         /**
0357          * Sets the @p width of the style.
0358          */
0359         void setWidth(double width);
0360 
0361         /**
0362          * Returns the width of the style.
0363          */
0364         double width() const;
0365 
0366         /**
0367          * Sets the line @p style of the style.
0368          */
0369         void setLineStyle(LineStyle style);
0370 
0371         /**
0372          * Returns the line style of the style.
0373          */
0374         LineStyle lineStyle() const;
0375 
0376         /**
0377          * Sets the x-corners of the style.
0378          */
0379         void setXCorners(double xCorners);
0380 
0381         /**
0382          * Returns the x-corners of the style.
0383          */
0384         double xCorners() const;
0385 
0386         /**
0387          * Sets the y-corners of the style.
0388          */
0389         void setYCorners(double yCorners);
0390 
0391         /**
0392          * Returns the y-corners of the style.
0393          */
0394         double yCorners() const;
0395 
0396         /**
0397          * Sets the @p marks of the style.
0398          */
0399         void setMarks(int marks);
0400 
0401         /**
0402          * Returns the marks of the style.
0403          */
0404         int marks() const;
0405 
0406         /**
0407          * Sets the @p spaces of the style.
0408          */
0409         void setSpaces(int spaces);
0410 
0411         /**
0412          * Returns the spaces of the style.
0413          */
0414         int spaces() const;
0415 
0416         /**
0417          * Sets the line @p effect of the style.
0418          */
0419         void setLineEffect(LineEffect effect);
0420 
0421         /**
0422          * Returns the line effect of the style.
0423          */
0424         LineEffect lineEffect() const;
0425 
0426         /**
0427          * Sets the effect @p intensity of the style.
0428          */
0429         void setEffectIntensity(double intensity);
0430 
0431         /**
0432          * Returns the effect intensity of the style.
0433          */
0434         double effectIntensity() const;
0435 
0436     private:
0437         class Private;
0438         Private *const d;
0439     };
0440 
0441     /**
0442      * Returns a reference to the style object of the annotation.
0443      */
0444     Style &style();
0445 
0446     /**
0447      * Returns a const reference to the style object of the annotation.
0448      */
0449     const Style &style() const;
0450 
0451     /**
0452      * The Window class contains all information about the popup window
0453      * of the annotation that is used to edit the content and properties.
0454      */
0455     class OKULARCORE_EXPORT Window
0456     {
0457     public:
0458         /**
0459          * Creates a new window.
0460          */
0461         Window();
0462 
0463         /**
0464          * Destroys the window.
0465          */
0466         ~Window();
0467 
0468         Window(const Window &other);
0469         Window &operator=(const Window &other);
0470 
0471         /**
0472          * Sets the @p flags of the window.
0473          */
0474         void setFlags(int flags);
0475 
0476         /**
0477          * Returns the flags of the window.
0478          */
0479         int flags() const;
0480 
0481         /**
0482          * Sets the top-left @p point of the window.
0483          */
0484         void setTopLeft(const NormalizedPoint &point);
0485 
0486         /**
0487          * Returns the top-left point of the window.
0488          */
0489         NormalizedPoint topLeft() const;
0490 
0491         /**
0492          * Sets the @p width of the window.
0493          */
0494         void setWidth(int width);
0495 
0496         /**
0497          * Returns the width of the window.
0498          */
0499         int width() const;
0500 
0501         /**
0502          * Sets the @p height of the window.
0503          */
0504         void setHeight(int height);
0505 
0506         /**
0507          * Returns the height of the window.
0508          */
0509         int height() const;
0510 
0511         /**
0512          * Sets the @p title of the window.
0513          */
0514         void setTitle(const QString &title);
0515 
0516         /**
0517          * Returns the title of the window.
0518          */
0519         QString title() const;
0520 
0521         /**
0522          * Sets the @p summary of the window.
0523          */
0524         void setSummary(const QString &summary);
0525 
0526         /**
0527          * Returns the summary of the window.
0528          */
0529         QString summary() const;
0530 
0531     private:
0532         class Private;
0533         Private *const d;
0534     };
0535 
0536     /**
0537      * Returns a reference to the window object of the annotation.
0538      */
0539     Window &window();
0540 
0541     /**
0542      * Returns a const reference to the window object of the annotation.
0543      */
0544     const Window &window() const;
0545 
0546     /**
0547      * The Revision class contains all information about the revision
0548      * of the annotation.
0549      */
0550     class OKULARCORE_EXPORT Revision
0551     {
0552     public:
0553         /**
0554          * Creates a new revision.
0555          */
0556         Revision();
0557 
0558         /**
0559          * Destroys the revision.
0560          */
0561         ~Revision();
0562 
0563         Revision(const Revision &other);
0564         Revision &operator=(const Revision &other);
0565 
0566         /**
0567          * Sets the @p annotation the revision belongs to.
0568          */
0569         void setAnnotation(Annotation *annotation);
0570 
0571         /**
0572          * Returns the annotation the revision belongs to.
0573          */
0574         Annotation *annotation() const;
0575 
0576         /**
0577          * Sets the @p scope of the revision.
0578          * @see RevisionScope
0579          */
0580         void setScope(RevisionScope scope);
0581 
0582         /**
0583          * Returns the scope of the revision.
0584          */
0585         RevisionScope scope() const;
0586 
0587         /**
0588          * Sets the @p type of the revision.
0589          * @see RevisionType
0590          */
0591         void setType(RevisionType type);
0592 
0593         /**
0594          * Returns the type of the revision.
0595          */
0596         RevisionType type() const;
0597 
0598     private:
0599         class Private;
0600         Private *const d;
0601     };
0602 
0603     /**
0604      * Returns a reference to the revision list of the annotation.
0605      */
0606     QList<Revision> &revisions();
0607 
0608     /**
0609      * Returns a reference to the revision list of the annotation.
0610      */
0611     const QList<Revision> &revisions() const;
0612 
0613     /**
0614      * Sets the "native" @p id of the annotation.
0615      *
0616      * This is for use of the Generator, that can optionally store an
0617      * handle (a pointer, an identifier, etc) of the "native" annotation
0618      * object, if any.
0619      *
0620      * @note Okular makes no use of this
0621      *
0622      * @since 0.7 (KDE 4.1)
0623      */
0624     void setNativeId(const QVariant &id);
0625 
0626     /**
0627      * Returns the "native" id of the annotation.
0628      *
0629      * @since 0.7 (KDE 4.1)
0630      */
0631     QVariant nativeId() const;
0632 
0633     /**
0634      * Sets a function to be called when the annotation is destroyed.
0635      *
0636      * @warning the function must *not* call any virtual function,
0637      *          nor subcast.
0638      *
0639      * @since 0.7 (KDE 4.1)
0640      */
0641     void setDisposeDataFunction(DisposeDataFunction func);
0642 
0643     /**
0644      * Returns whether the annotation can be moved.
0645      *
0646      * @since 0.7 (KDE 4.1)
0647      */
0648     bool canBeMoved() const;
0649 
0650     /**
0651      * Returns whether the annotation can be resized.
0652      */
0653     bool canBeResized() const;
0654 
0655     /**
0656      * Returns whether the annotation dialog should be open after creation of the annotation or not
0657      *
0658      * @since 0.13 (KDE 4.7)
0659      */
0660     bool openDialogAfterCreation() const;
0661 
0662     /**
0663      * Returns the sub type of the annotation.
0664      */
0665     virtual SubType subType() const = 0;
0666 
0667     /**
0668      * Stores the annotation as xml in @p document under the given parent @p node.
0669      */
0670     virtual void store(QDomNode &node, QDomDocument &document) const;
0671 
0672     /**
0673      * Retrieve the QDomNode representing this annotation's properties
0674 
0675      * @since 0.17 (KDE 4.11)
0676      */
0677     QDomNode getAnnotationPropertiesDomNode() const;
0678 
0679     /**
0680      * Sets annotations internal properties according to the contents of @p node
0681      *
0682      * @since 0.17 (KDE 4.11)
0683      */
0684     void setAnnotationProperties(const QDomNode &node);
0685 
0686 protected:
0687     /// @cond PRIVATE
0688     explicit Annotation(AnnotationPrivate &dd);
0689     Annotation(AnnotationPrivate &dd, const QDomNode &description);
0690     Q_DECLARE_PRIVATE(Annotation)
0691     AnnotationPrivate *d_ptr;
0692     /// @endcond
0693 
0694 private:
0695     Q_DISABLE_COPY(Annotation)
0696 };
0697 
0698 /**
0699  * @short Native annotation interface
0700  *
0701  * Generators can subclass it to provide native annotation support.
0702  * Generators can use Annotation::setNativeId to store per-annotation data.
0703  *
0704  * @since 0.15 (KDE 4.9)
0705  */
0706 class OKULARCORE_EXPORT AnnotationProxy
0707 {
0708 public:
0709     enum Capability {
0710         Addition,     ///< Generator can create native annotations
0711         Modification, ///< Generator can edit native annotations
0712         Removal       ///< Generator can remove native annotations
0713     };
0714 
0715     AnnotationProxy();
0716 
0717     /**
0718      * Destroys the annotation proxy.
0719      */
0720     virtual ~AnnotationProxy();
0721 
0722     AnnotationProxy(const AnnotationProxy &) = delete;
0723     AnnotationProxy &operator=(const AnnotationProxy &) = delete;
0724 
0725     /**
0726      * Query for the supported capabilities.
0727      */
0728     virtual bool supports(Capability capability) const = 0;
0729 
0730     /**
0731      * Called when a new @p annotation is added to a @p page.
0732      *
0733      * @note Only called if supports(Addition) == true
0734      */
0735     virtual void notifyAddition(Annotation *annotation, int page) = 0;
0736 
0737     /**
0738      * Called after an existing @p annotation at a given @p page is modified.
0739      *
0740      * Generator can call @p annotation getters to get the new values.
0741      * @p appearanceChanged tells if a non-visible property was modified
0742      *
0743      * @note Only called if supports(Modification) == true
0744      */
0745     virtual void notifyModification(const Annotation *annotation, int page, bool appearanceChanged) = 0;
0746 
0747     /**
0748      * Called when an existing @p annotation at a given @p page is removed.
0749      *
0750      * @note Only called if supports(Removal) == true
0751      */
0752     virtual void notifyRemoval(Annotation *annotation, int page) = 0;
0753 };
0754 
0755 class OKULARCORE_EXPORT TextAnnotation : public Annotation
0756 {
0757 public:
0758     /**
0759      * Describes the type of the text.
0760      */
0761     enum TextType {
0762         Linked, ///< The annotation is linked to a text
0763         InPlace ///< The annotation is located next to the text
0764     };
0765 
0766     /**
0767      * Describes the style of the text.
0768      */
0769     enum InplaceIntent {
0770         Unknown,   ///< Unknown style
0771         Callout,   ///< Callout style
0772         TypeWriter ///< Type writer style
0773     };
0774 
0775     /**
0776      * Creates a new text annotation.
0777      */
0778     TextAnnotation();
0779 
0780     /**
0781      * Creates a new text annotation from the xml @p description
0782      */
0783     explicit TextAnnotation(const QDomNode &description);
0784 
0785     /**
0786      * Destroys the text annotation.
0787      */
0788     ~TextAnnotation() override;
0789 
0790     /**
0791      * Sets the text @p type of the text annotation.
0792      * @see TextType
0793      */
0794     void setTextType(TextType type);
0795 
0796     /**
0797      * Returns the text type of the text annotation.
0798      */
0799     TextType textType() const;
0800 
0801     /**
0802      * Sets the @p icon of the text annotation.
0803      */
0804     void setTextIcon(const QString &icon);
0805 
0806     /**
0807      * Returns the icon of the text annotation.
0808      */
0809     QString textIcon() const;
0810 
0811     /**
0812      * Sets the @p font of the text annotation.
0813      */
0814     void setTextFont(const QFont &font);
0815 
0816     /**
0817      * Returns the font of the text annotation.
0818      */
0819     QFont textFont() const;
0820 
0821     /**
0822      * Sets the @p color of inplace text.
0823      *
0824      * @since 1.6
0825      */
0826     void setTextColor(const QColor &color);
0827 
0828     /**
0829      * Returns the color of inplace text.
0830      *
0831      * @since 1.6
0832      */
0833     QColor textColor() const;
0834 
0835     /**
0836      * Sets the inplace @p alignment of the text annotation.
0837      * 0:left, 1:center, 2:right
0838      */
0839     void setInplaceAlignment(int alignment);
0840 
0841     /**
0842      * Returns the inplace alignment of the text annotation.
0843      * 0:left, 1:center, 2:right
0844      */
0845     int inplaceAlignment() const;
0846 
0847     /**
0848      * Sets the inplace callout @p point at @p index.
0849      *
0850      * @p index must be between 0 and 2.
0851      */
0852     void setInplaceCallout(const NormalizedPoint &point, int index);
0853 
0854     /**
0855      * Returns the inplace callout point for @p index.
0856      *
0857      * @p index must be between 0 and 2.
0858      */
0859     NormalizedPoint inplaceCallout(int index) const;
0860 
0861     /**
0862      * Returns the transformed (e.g. rotated) inplace callout point for @p index.
0863      *
0864      * @p index must be between 0 and 2.
0865      */
0866     NormalizedPoint transformedInplaceCallout(int index) const;
0867 
0868     /**
0869      * Returns the inplace @p intent of the text annotation.
0870      * @see InplaceIntent
0871      */
0872     void setInplaceIntent(InplaceIntent intent);
0873 
0874     /**
0875      * Returns the inplace intent of the text annotation.
0876      */
0877     InplaceIntent inplaceIntent() const;
0878 
0879     /**
0880      * Returns the sub type of the text annotation.
0881      */
0882     SubType subType() const override;
0883 
0884     /**
0885      * Stores the text annotation as xml in @p document under the given parent @p node.
0886      */
0887     void store(QDomNode &node, QDomDocument &document) const override;
0888 
0889 private:
0890     Q_DECLARE_PRIVATE(TextAnnotation)
0891     Q_DISABLE_COPY(TextAnnotation)
0892 };
0893 
0894 class OKULARCORE_EXPORT LineAnnotation : public Annotation
0895 {
0896 public:
0897     /**
0898      * Describes the line ending style.
0899      */
0900     enum TermStyle {
0901         Square,       ///< Using a square
0902         Circle,       ///< Using a circle
0903         Diamond,      ///< Using a diamond
0904         OpenArrow,    ///< Using an open arrow
0905         ClosedArrow,  ///< Using a closed arrow
0906         None,         ///< No special ending style
0907         Butt,         ///< Using a butt ending
0908         ROpenArrow,   ///< Using an arrow opened at the right side
0909         RClosedArrow, ///< Using an arrow closed at the right side
0910         Slash         ///< Using a slash
0911     };
0912 
0913     /**
0914      * Describes the line intent.
0915      */
0916     enum LineIntent {
0917         Unknown,     ///< Unknown intent
0918         Arrow,       ///< Arrow intent
0919         Dimension,   ///< Dimension intent
0920         PolygonCloud ///< Polygon cloud intent
0921     };
0922 
0923     /**
0924      * Creates a new line annotation.
0925      */
0926     LineAnnotation();
0927 
0928     /**
0929      * Creates a new line annotation from the xml @p description
0930      */
0931     explicit LineAnnotation(const QDomNode &description);
0932 
0933     /**
0934      * Destroys the line annotation.
0935      */
0936     ~LineAnnotation() override;
0937 
0938     /**
0939      * Sets the normalized line @p points of the line annotation.
0940      *
0941      * @since 22.08
0942      */
0943     void setLinePoints(const QList<NormalizedPoint> &points);
0944 
0945     /**
0946      * Returns the normalized line points of the line annotation.
0947      *
0948      * @since 22.08
0949      */
0950     QList<NormalizedPoint> linePoints() const;
0951 
0952     /**
0953      * Returns the transformed (e.g. rotated) normalized line points
0954      * of the line annotation.
0955      *
0956      * @since 22.08
0957      */
0958     QList<NormalizedPoint> transformedLinePoints() const;
0959 
0960     /**
0961      * Sets the line starting @p style of the line annotation.
0962      * @see TermStyle
0963      */
0964     void setLineStartStyle(TermStyle style);
0965 
0966     /**
0967      * Returns the line starting style of the line annotation.
0968      */
0969     TermStyle lineStartStyle() const;
0970 
0971     /**
0972      * Sets the line ending @p style of the line annotation.
0973      * @see TermStyle
0974      */
0975     void setLineEndStyle(TermStyle style);
0976 
0977     /**
0978      * Returns the line ending style of the line annotation.
0979      */
0980     TermStyle lineEndStyle() const;
0981 
0982     /**
0983      * Sets whether the line shall be @p closed.
0984      */
0985     void setLineClosed(bool closed);
0986 
0987     /**
0988      * Returns whether the line shall be closed.
0989      */
0990     bool lineClosed() const;
0991 
0992     /**
0993      * Sets the inner line @p color of the line annotation.
0994      */
0995     void setLineInnerColor(const QColor &color);
0996 
0997     /**
0998      * Returns the inner line color of the line annotation.
0999      */
1000     QColor lineInnerColor() const;
1001 
1002     /**
1003      * Sets the leading forward @p point of the line annotation.
1004      */
1005     void setLineLeadingForwardPoint(double point);
1006 
1007     /**
1008      * Returns the leading forward point of the line annotation.
1009      */
1010     double lineLeadingForwardPoint() const;
1011 
1012     /**
1013      * Sets the leading backward @p point of the line annotation.
1014      */
1015     void setLineLeadingBackwardPoint(double point);
1016 
1017     /**
1018      * Returns the leading backward point of the line annotation.
1019      */
1020     double lineLeadingBackwardPoint() const;
1021 
1022     /**
1023      * Sets whether the caption shall be @p shown.
1024      */
1025     void setShowCaption(bool shown);
1026 
1027     /**
1028      * Returns whether the caption shall be shown.
1029      */
1030     bool showCaption() const;
1031 
1032     /**
1033      * Sets the line @p intent of the line annotation.
1034      * @see LineIntent
1035      */
1036     void setLineIntent(LineIntent intent);
1037 
1038     /**
1039      * Returns the line intent of the line annotation.
1040      */
1041     LineIntent lineIntent() const;
1042 
1043     /**
1044      * Returns the sub type of the line annotation.
1045      */
1046     SubType subType() const override;
1047 
1048     /**
1049      * Stores the line annotation as xml in @p document under the given parent @p node.
1050      */
1051     void store(QDomNode &node, QDomDocument &document) const override;
1052 
1053 private:
1054     Q_DECLARE_PRIVATE(LineAnnotation)
1055     Q_DISABLE_COPY(LineAnnotation)
1056 };
1057 
1058 class OKULARCORE_EXPORT GeomAnnotation : public Annotation
1059 {
1060 public:
1061     // common enums
1062     enum GeomType {
1063         InscribedSquare, ///< Draw a square
1064         InscribedCircle  ///< Draw a circle
1065     };
1066 
1067     /**
1068      * Creates a new geometrical annotation.
1069      */
1070     GeomAnnotation();
1071 
1072     /**
1073      * Creates a new geometrical annotation from the xml @p description
1074      */
1075     explicit GeomAnnotation(const QDomNode &description);
1076 
1077     /**
1078      * Destroys the geometrical annotation.
1079      */
1080     ~GeomAnnotation() override;
1081 
1082     /**
1083      * Sets the geometrical @p type of the geometrical annotation.
1084      * @see GeomType
1085      */
1086     void setGeometricalType(GeomType type);
1087 
1088     /**
1089      * Returns the geometrical type of the geometrical annotation.
1090      */
1091     GeomType geometricalType() const;
1092 
1093     /**
1094      * Sets the inner @p color of the geometrical annotation.
1095      */
1096     void setGeometricalInnerColor(const QColor &color);
1097 
1098     /**
1099      * Returns the inner color of the geometrical annotation.
1100      */
1101     QColor geometricalInnerColor() const;
1102 
1103     /**
1104      * Returns the sub type of the geometrical annotation.
1105      */
1106     SubType subType() const override;
1107 
1108     /**
1109      * Stores the geometrical annotation as xml in @p document
1110      * under the given parent @p node.
1111      */
1112     void store(QDomNode &node, QDomDocument &document) const override;
1113 
1114 private:
1115     Q_DECLARE_PRIVATE(GeomAnnotation)
1116     Q_DISABLE_COPY(GeomAnnotation)
1117 };
1118 
1119 class OKULARCORE_EXPORT HighlightAnnotation : public Annotation
1120 {
1121 public:
1122     /**
1123      * Describes the highlighting style of the annotation.
1124      */
1125     enum HighlightType {
1126         Highlight, ///< Highlights the text
1127         Squiggly,  ///< Squiggles the text
1128         Underline, ///< Underlines the text
1129         StrikeOut  ///< Strikes out the text
1130     };
1131 
1132     /**
1133      * Creates a new highlight annotation.
1134      */
1135     HighlightAnnotation();
1136 
1137     /**
1138      * Creates a new highlight annotation from the xml @p description
1139      */
1140     explicit HighlightAnnotation(const QDomNode &description);
1141 
1142     /**
1143      * Destroys the highlight annotation.
1144      */
1145     ~HighlightAnnotation() override;
1146 
1147     /**
1148      * Sets the @p type of the highlight annotation.
1149      * @see HighlightType
1150      */
1151     void setHighlightType(HighlightType type);
1152 
1153     /**
1154      * Returns the type of the highlight annotation.
1155      */
1156     HighlightType highlightType() const;
1157 
1158     /**
1159      * @short Describes a highlight quad of a text markup annotation.
1160      *
1161      * The Quad is a closed path of 4 NormalizedPoints.
1162      * Another set of 4 NormalizedPoints can be generated with transform(),
1163      * e. g. to get highlighting coordinates on a rotated PageViewItem.
1164      * Additionally, Quad stores some geometry related style attributes.
1165      *
1166      * To enable correct rendering of the annotation,
1167      * the points 0 and 1 must describe the bottom edge of the quad
1168      * (relative to the text orientation).
1169      *
1170      * @see NormalizedPoint
1171      */
1172     class OKULARCORE_EXPORT Quad
1173     {
1174     public:
1175         /**
1176          * Creates a new quad.
1177          */
1178         Quad();
1179 
1180         /**
1181          * Destroys the quad.
1182          */
1183         ~Quad();
1184 
1185         Quad(const Quad &other);
1186         Quad &operator=(const Quad &other);
1187 
1188         /**
1189          * Sets the normalized @p point at @p index.
1190          *
1191          * @p index must be between 0 and 3.
1192          */
1193         void setPoint(const NormalizedPoint &point, int index);
1194 
1195         /**
1196          * Returns the normalized point at @p index.
1197          *
1198          * @p index must be between 0 and 3.
1199          */
1200         NormalizedPoint point(int index) const;
1201 
1202         /**
1203          * Returns the transformed (e.g. rotated) normalized point at @p index.
1204          *
1205          * @p index must be between 0 and 3.
1206          */
1207         NormalizedPoint transformedPoint(int index) const;
1208 
1209         /**
1210          * Sets whether a cap should be used at the start.
1211          */
1212         void setCapStart(bool value);
1213 
1214         /**
1215          * Returns whether a cap should be used at the start.
1216          */
1217         bool capStart() const;
1218 
1219         /**
1220          * Sets whether a cap should be used at the end.
1221          */
1222         void setCapEnd(bool value);
1223 
1224         /**
1225          * Returns whether a cap should be used at the end.
1226          */
1227         bool capEnd() const;
1228 
1229         /**
1230          * Sets the @p width of the drawing feather.
1231          */
1232         void setFeather(double width);
1233 
1234         /**
1235          * Returns the width of the drawing feather.
1236          */
1237         double feather() const;
1238 
1239         /**
1240          * Transforms the quad coordinates with the transformation defined
1241          * by @p matrix.
1242          *
1243          * The transformed coordinates will be accessible with transformedPoint().
1244          * The coordinates returned by point() are not affected.
1245          */
1246         void transform(const QTransform &matrix);
1247 
1248     private:
1249         class Private;
1250         Private *const d;
1251     };
1252 
1253     /**
1254      * Returns a reference to the quad list of the highlight annotation.
1255      */
1256     QList<Quad> &highlightQuads();
1257 
1258     /**
1259      * Returns a const reference to the quad list of the highlight annotation.
1260      * @since 20.12
1261      */
1262     const QList<Quad> &highlightQuads() const;
1263 
1264     /**
1265      * Returns the sub type of the highlight annotation.
1266      */
1267     SubType subType() const override;
1268 
1269     /**
1270      * Stores the highlight annotation as xml in @p document
1271      * under the given parent @p node.
1272      */
1273     void store(QDomNode &node, QDomDocument &document) const override;
1274 
1275 private:
1276     Q_DECLARE_PRIVATE(HighlightAnnotation)
1277     Q_DISABLE_COPY(HighlightAnnotation)
1278 };
1279 
1280 class OKULARCORE_EXPORT StampAnnotation : public Annotation
1281 {
1282 public:
1283     /**
1284      * Creates a new stamp annotation.
1285      */
1286     StampAnnotation();
1287 
1288     /**
1289      * Creates a new stamp annotation from the xml @p description
1290      */
1291     explicit StampAnnotation(const QDomNode &description);
1292 
1293     /**
1294      * Destroys the stamp annotation.
1295      */
1296     ~StampAnnotation() override;
1297 
1298     /**
1299      * Sets the @p name of the icon for the stamp annotation.
1300      */
1301     void setStampIconName(const QString &name);
1302 
1303     /**
1304      * Returns the name of the icon.
1305      */
1306     QString stampIconName() const;
1307 
1308     /**
1309      * Returns the sub type of the stamp annotation.
1310      */
1311     SubType subType() const override;
1312 
1313     /**
1314      * Stores the stamp annotation as xml in @p document
1315      * under the given parent @p node.
1316      */
1317     void store(QDomNode &node, QDomDocument &document) const override;
1318 
1319 private:
1320     Q_DECLARE_PRIVATE(StampAnnotation)
1321     Q_DISABLE_COPY(StampAnnotation)
1322 };
1323 
1324 class OKULARCORE_EXPORT InkAnnotation : public Annotation
1325 {
1326 public:
1327     /**
1328      * Creates a new ink annotation.
1329      */
1330     InkAnnotation();
1331 
1332     /**
1333      * Creates a new ink annotation from the xml @p description
1334      */
1335     explicit InkAnnotation(const QDomNode &description);
1336 
1337     /**
1338      * Destroys the ink annotation.
1339      */
1340     ~InkAnnotation() override;
1341 
1342     /**
1343      * Sets the @p paths of points for the ink annotation.
1344      *
1345      * @since 22.08
1346      */
1347     void setInkPaths(const QList<QList<NormalizedPoint>> &paths);
1348 
1349     /**
1350      * Returns the paths of points of the ink annotation.
1351      *
1352      * @since 22.08
1353      */
1354     QList<QList<NormalizedPoint>> inkPaths() const;
1355 
1356     /**
1357      * Returns the paths of transformed (e.g. rotated) points of
1358      * the ink annotation.
1359      *
1360      * @since 22.08
1361      */
1362     QList<QList<NormalizedPoint>> transformedInkPaths() const;
1363 
1364     /**
1365      * Returns the sub type of the ink annotation.
1366      */
1367     SubType subType() const override;
1368 
1369     /**
1370      * Stores the ink annotation as xml in @p document
1371      * under the given parent @p node.
1372      */
1373     void store(QDomNode &node, QDomDocument &document) const override;
1374 
1375 private:
1376     Q_DECLARE_PRIVATE(InkAnnotation)
1377     Q_DISABLE_COPY(InkAnnotation)
1378 };
1379 
1380 class OKULARCORE_EXPORT CaretAnnotation : public Annotation
1381 {
1382 public:
1383     /**
1384      * Describes the highlighting style of the annotation.
1385      */
1386     enum CaretSymbol {
1387         None, ///< No symbol to be associated with the text
1388         P     ///< A 'paragraph' symbol
1389     };
1390 
1391     /**
1392      * Creates a new caret annotation.
1393      */
1394     CaretAnnotation();
1395 
1396     /**
1397      * Creates a new caret annotation from the xml @p description
1398      */
1399     explicit CaretAnnotation(const QDomNode &description);
1400 
1401     /**
1402      * Destroys the caret annotation.
1403      */
1404     ~CaretAnnotation() override;
1405 
1406     /**
1407      * Sets the @p symbol for the caret annotation.
1408      */
1409     void setCaretSymbol(CaretAnnotation::CaretSymbol symbol);
1410 
1411     /**
1412      * Returns the symbol of the annotation.
1413      */
1414     CaretAnnotation::CaretSymbol caretSymbol() const;
1415 
1416     /**
1417      * Returns the sub type of the caret annotation.
1418      */
1419     SubType subType() const override;
1420 
1421     /**
1422      * Stores the caret annotation as xml in @p document
1423      * under the given parent @p node.
1424      */
1425     void store(QDomNode &node, QDomDocument &document) const override;
1426 
1427 private:
1428     Q_DECLARE_PRIVATE(CaretAnnotation)
1429     Q_DISABLE_COPY(CaretAnnotation)
1430 };
1431 
1432 class OKULARCORE_EXPORT FileAttachmentAnnotation : public Annotation
1433 {
1434 public:
1435     /**
1436      * Creates a new file attachment annotation.
1437      */
1438     FileAttachmentAnnotation();
1439     /**
1440      * Creates a new file attachment annotation from the xml @p description
1441      */
1442     explicit FileAttachmentAnnotation(const QDomNode &description);
1443     /**
1444      * Destroys the file attachment annotation.
1445      */
1446     ~FileAttachmentAnnotation() override;
1447 
1448     /**
1449      * Gets the name of the icon.
1450      */
1451     QString fileIconName() const;
1452 
1453     /**
1454      * Sets the @p iconName of the icon for the file attachment annotation.
1455      */
1456     void setFileIconName(const QString &iconName);
1457 
1458     /**
1459      * Gets the embedded file object.
1460      */
1461     EmbeddedFile *embeddedFile() const;
1462 
1463     /**
1464      * Sets the @p ef representing the embedded file of the file
1465      * attachment annotation.
1466      */
1467     void setEmbeddedFile(EmbeddedFile *ef);
1468 
1469     /**
1470      * Returns the sub type of the file attachment annotation.
1471      */
1472     SubType subType() const override;
1473 
1474     /**
1475      * Stores the file attachment annotation as xml in @p document
1476      * under the given parent @p node.
1477      */
1478     void store(QDomNode &node, QDomDocument &document) const override;
1479 
1480 private:
1481     Q_DECLARE_PRIVATE(FileAttachmentAnnotation)
1482     Q_DISABLE_COPY(FileAttachmentAnnotation)
1483 };
1484 
1485 /**
1486  * \short Sound annotation.
1487  *
1488  * The sound annotation represents a sound to be played when activated.
1489  *
1490  * @since 0.7 (KDE 4.1)
1491  */
1492 class OKULARCORE_EXPORT SoundAnnotation : public Annotation
1493 {
1494 public:
1495     /**
1496      * Creates a new sound annotation.
1497      */
1498     SoundAnnotation();
1499     /**
1500      * Creates a new sound annotation from the xml @p description
1501      */
1502     explicit SoundAnnotation(const QDomNode &description);
1503     /**
1504      * Destroys the sound annotation.
1505      */
1506     ~SoundAnnotation() override;
1507 
1508     /**
1509      * Gets the name of the icon.
1510      */
1511     QString soundIconName() const;
1512 
1513     /**
1514      * Sets the @p iconName of the icon for the sound annotation.
1515      */
1516     void setSoundIconName(const QString &iconName);
1517 
1518     /**
1519      * Gets the sound object.
1520      */
1521     Sound *sound() const;
1522 
1523     /**
1524      * Sets the @p s representing the sound of the file
1525      * attachment annotation.
1526      */
1527     void setSound(Sound *s);
1528 
1529     /**
1530      * Returns the sub type of the sound annotation.
1531      */
1532     SubType subType() const override;
1533 
1534     /**
1535      * Stores the sound annotation as xml in @p document
1536      * under the given parent @p node.
1537      */
1538     void store(QDomNode &node, QDomDocument &document) const override;
1539 
1540 private:
1541     Q_DECLARE_PRIVATE(SoundAnnotation)
1542     Q_DISABLE_COPY(SoundAnnotation)
1543 };
1544 
1545 /**
1546  * \short Movie annotation.
1547  *
1548  * The movie annotation represents a movie to be played when activated.
1549  *
1550  * @since 0.8 (KDE 4.2)
1551  */
1552 class OKULARCORE_EXPORT MovieAnnotation : public Annotation
1553 {
1554 public:
1555     /**
1556      * Creates a new movie annotation.
1557      */
1558     MovieAnnotation();
1559     /**
1560      * Creates a new movie annotation from the xml @p description
1561      */
1562     explicit MovieAnnotation(const QDomNode &description);
1563     /**
1564      * Destroys the movie annotation.
1565      */
1566     ~MovieAnnotation() override;
1567     /**
1568      * Gets the movie object.
1569      */
1570     Movie *movie() const;
1571     /**
1572      * Sets the new @p movie object.
1573      */
1574     void setMovie(Movie *movie);
1575     /**
1576      * Returns the sub type of the movie annotation.
1577      */
1578     SubType subType() const override;
1579     /**
1580      * Stores the movie annotation as xml in @p document
1581      * under the given @p parentNode.
1582      */
1583     void store(QDomNode &parentNode, QDomDocument &document) const override;
1584 
1585 private:
1586     Q_DECLARE_PRIVATE(MovieAnnotation)
1587     Q_DISABLE_COPY(MovieAnnotation)
1588 };
1589 
1590 /**
1591  * \short Screen annotation.
1592  *
1593  * The screen annotation specifies a region of a page upon which media clips
1594  * may be played. It also serves as an object from which actions can be triggered.
1595  *
1596  * @since 0.16 (KDE 4.10)
1597  */
1598 class OKULARCORE_EXPORT ScreenAnnotation : public Annotation
1599 {
1600 public:
1601     /**
1602      * Creates a new screen annotation.
1603      */
1604     ScreenAnnotation();
1605 
1606     /**
1607      * Creates a new screen annotation from the xml @p description
1608      */
1609     explicit ScreenAnnotation(const QDomNode &description);
1610 
1611     /**
1612      * Destroys the screen annotation.
1613      */
1614     ~ScreenAnnotation() override;
1615 
1616     /**
1617      * Returns the sub type of the screen annotation.
1618      */
1619     SubType subType() const override;
1620 
1621     /**
1622      * Stores the screen annotation as xml in @p document
1623      * under the given @p parentNode.
1624      */
1625     void store(QDomNode &parentNode, QDomDocument &document) const override;
1626 
1627     /**
1628      * Sets the @p action that is executed when the annotation is triggered.
1629      *
1630      * @since 0.16 (KDE 4.10)
1631      */
1632     void setAction(Action *action);
1633 
1634     /**
1635      * Returns the action that is executed when the annotation is triggered or @c 0 if not action has been defined.
1636      *
1637      * @since 0.16 (KDE 4.10)
1638      */
1639     Action *action() const;
1640 
1641     /**
1642      * Sets the additional @p action of the given @p type.
1643      *
1644      * @since 0.16 (KDE 4.10)
1645      */
1646     void setAdditionalAction(AdditionalActionType type, Action *action);
1647 
1648     /**
1649      * Returns the additional action of the given @p type or @c 0 if no action has been defined.
1650      *
1651      * @since 0.16 (KDE 4.10)
1652      */
1653     Action *additionalAction(AdditionalActionType type) const;
1654 
1655 private:
1656     Q_DECLARE_PRIVATE(ScreenAnnotation)
1657     Q_DISABLE_COPY(ScreenAnnotation)
1658 };
1659 
1660 /**
1661  * \short Widget annotation.
1662  *
1663  * The widget annotation represents a widget on a page.
1664  *
1665  * @since 0.16 (KDE 4.10)
1666  */
1667 class OKULARCORE_EXPORT WidgetAnnotation : public Annotation
1668 {
1669 public:
1670     /**
1671      * Creates a new widget annotation.
1672      */
1673     WidgetAnnotation();
1674 
1675     /**
1676      * Creates a new widget annotation from the xml @p description
1677      */
1678     explicit WidgetAnnotation(const QDomNode &description);
1679 
1680     /**
1681      * Destroys the widget annotation.
1682      */
1683     ~WidgetAnnotation() override;
1684 
1685     /**
1686      * Returns the sub type of the widget annotation.
1687      */
1688     SubType subType() const override;
1689 
1690     /**
1691      * Stores the widget annotation as xml in @p document
1692      * under the given @p parentNode.
1693      */
1694     void store(QDomNode &parentNode, QDomDocument &document) const override;
1695 
1696     /**
1697      * Sets the additional @p action of the given @p type.
1698      *
1699      * @since 0.16 (KDE 4.10)
1700      */
1701     void setAdditionalAction(AdditionalActionType type, Action *action);
1702 
1703     /**
1704      * Returns the additional action of the given @p type or @c 0 if no action has been defined.
1705      *
1706      * @since 0.16 (KDE 4.10)
1707      */
1708     Action *additionalAction(AdditionalActionType type) const;
1709 
1710 private:
1711     Q_DECLARE_PRIVATE(WidgetAnnotation)
1712     Q_DISABLE_COPY(WidgetAnnotation)
1713 };
1714 
1715 /**
1716  * \short RichMedia annotation.
1717  *
1718  * The rich media annotation represents an video or sound on a page.
1719  *
1720  * @since 1.0
1721  */
1722 class OKULARCORE_EXPORT RichMediaAnnotation : public Annotation
1723 {
1724 public:
1725     /**
1726      * Creates a new rich media annotation.
1727      */
1728     RichMediaAnnotation();
1729 
1730     /**
1731      * Creates a new rich media annotation from the xml @p description
1732      */
1733     explicit RichMediaAnnotation(const QDomNode &description);
1734 
1735     /**
1736      * Destroys the rich media annotation.
1737      */
1738     ~RichMediaAnnotation() override;
1739 
1740     /**
1741      * Returns the sub type of the rich media annotation.
1742      */
1743     SubType subType() const override;
1744 
1745     /**
1746      * Stores the rich media annotation as xml in @p document
1747      * under the given @p parentNode.
1748      */
1749     void store(QDomNode &parentNode, QDomDocument &document) const override;
1750 
1751     /**
1752      * Gets the movie object.
1753      */
1754     Movie *movie() const;
1755 
1756     /**
1757      * Sets the new @p movie object.
1758      */
1759     void setMovie(Movie *movie);
1760 
1761     /**
1762      * Sets the @p embeddedFile representing the embedded file.
1763      */
1764     void setEmbeddedFile(EmbeddedFile *embeddedFile);
1765 
1766     /**
1767      * Gets the embedded file object.
1768      */
1769     EmbeddedFile *embeddedFile() const;
1770 
1771 private:
1772     Q_DECLARE_PRIVATE(RichMediaAnnotation)
1773     Q_DISABLE_COPY(RichMediaAnnotation)
1774 };
1775 
1776 }
1777 
1778 #endif