Okular

annotations.h
1 /*
2  SPDX-FileCopyrightText: 2005 Enrico Ros <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #ifndef _OKULAR_ANNOTATIONS_H_
8 #define _OKULAR_ANNOTATIONS_H_
9 
10 #include <QDateTime>
11 #include <QDomDocument>
12 #include <QDomElement>
13 #include <QFont>
14 #include <QRect>
15 #include <QString>
16 
17 #include "area.h"
18 #include "okularcore_export.h"
19 
20 namespace Okular
21 {
22 class Action;
23 class Annotation;
24 class AnnotationObjectRect;
25 class AnnotationPrivate;
26 class Document;
27 class EmbeddedFile;
28 class Page;
29 class PagePrivate;
30 class Sound;
31 class Movie;
32 class TextAnnotationPrivate;
33 class LineAnnotationPrivate;
34 class GeomAnnotationPrivate;
35 class HighlightAnnotationPrivate;
36 class StampAnnotationPrivate;
37 class InkAnnotationPrivate;
38 class CaretAnnotationPrivate;
39 class FileAttachmentAnnotationPrivate;
40 class SoundAnnotationPrivate;
41 class MovieAnnotationPrivate;
42 class ScreenAnnotationPrivate;
43 class WidgetAnnotationPrivate;
44 class RichMediaAnnotationPrivate;
45 
46 /**
47  * @short Helper class for (recursive) annotation retrieval/storage.
48  */
49 class OKULARCORE_EXPORT AnnotationUtils
50 {
51 public:
52  /**
53  * Restore an annotation (with revisions if needed) from the dom @p element.
54  *
55  * Returns a pointer to the complete annotation or 0 if element is invalid.
56  */
57  static Annotation *createAnnotation(const QDomElement &element);
58 
59  /**
60  * Saves the @p annotation as a child of @p element taking
61  * care of saving all revisions if it has any.
62  */
63  static void storeAnnotation(const Annotation *annotation, QDomElement &element, QDomDocument &document);
64 
65  /**
66  * Returns the child element with the given @p name from the direct
67  * children of @p parentNode or a null element if not found.
68  */
69  static QDomElement findChildElement(const QDomNode &parentNode, const QString &name);
70 
71  /**
72  * Returns the geometry of the given @p annotation scaled by
73  * @p scaleX and @p scaleY.
74  */
75  static QRect annotationGeometry(const Annotation *annotation, double scaleX, double scaleY);
76 
77  /**
78  * Returns a pixmap for a stamp symbol
79  *
80  * @p name Name of a Okular stamp symbol, icon or path to an image
81  * @p size Size of the pixmap side
82  * @p keepAspectRatio Whether to keep aspect ratio of the stamp or not
83  *
84  * @since 21.12
85  */
86  static QPixmap loadStamp(const QString &nameOrPath, int size, bool keepAspectRatio = true);
87 };
88 
89 /**
90  * @short Annotation struct holds properties shared by all annotations.
91  *
92  * An Annotation is an object (text note, highlight, sound, popup window, ..)
93  * contained by a Page in the document.
94  */
95 class OKULARCORE_EXPORT Annotation
96 {
97  /// @cond PRIVATE
98  friend class AnnotationObjectRect;
99  friend class Document;
100  friend class DocumentPrivate;
101  friend class ObjectRect;
102  friend class Page;
103  friend class PagePrivate;
104  /// @endcond
105 
106 public:
107  /**
108  * Describes the type of annotation as defined in PDF standard.
109  */
110  enum SubType {
111  AText = 1, ///< A textual annotation
112  ALine = 2, ///< A line annotation
113  AGeom = 3, ///< A geometrical annotation
114  AHighlight = 4, ///< A highlight annotation
115  AStamp = 5, ///< A stamp annotation
116  AInk = 6, ///< An ink annotation
117  ACaret = 8, ///< A caret annotation
118  AFileAttachment = 9, ///< A file attachment annotation
119  ASound = 10, ///< A sound annotation
120  AMovie = 11, ///< A movie annotation
121  AScreen = 12, ///< A screen annotation
122  AWidget = 13, ///< A widget annotation
123  ARichMedia = 14, ///< A rich media annotation
124  A_BASE = 0 ///< The annotation base class
125  };
126 
127  /**
128  * Describes additional properties of an annotation.
129  */
130  enum Flag {
131  Hidden = 1, ///< Is not shown in the document
132  FixedSize = 2, ///< Has a fixed size
133  FixedRotation = 4, ///< Has a fixed rotation
134  DenyPrint = 8, ///< Cannot be printed
135  DenyWrite = 16, ///< Cannot be changed
136  DenyDelete = 32, ///< Cannot be deleted
137  ToggleHidingOnMouse = 64, ///< Can be hidden/shown by mouse click
138  External = 128, ///< Is stored external
139  ExternallyDrawn = 256, ///< Is drawn externally (by the generator which provided it) @since 0.10 (KDE 4.4)
140  BeingMoved = 512, ///< Is being moved (mouse drag and drop). If ExternallyDrawn, the generator must not draw it @since 0.15 (KDE 4.9)
141  BeingResized = 1024 ///< Is being resized (mouse drag and drop). If ExternallyDrawn, the generator must not draw it @since 1.1.0
142  };
143 
144  /**
145  * Describes possible line styles for @see ALine annotation.
146  */
147  enum LineStyle {
148  Solid = 1, ///< A solid line
149  Dashed = 2, ///< A dashed line
150  Beveled = 4, ///< A beveled line
151  Inset = 8, ///< An inset line
152  Underline = 16 ///< An underline
153  };
154 
155  /**
156  * Describes possible line effects for @see ALine annotation.
157  */
158  enum LineEffect {
159  NoEffect = 1, ///< No effect
160  Cloudy = 2 ///< The cloudy effect
161  };
162 
163  /**
164  * Describes the scope of revision information.
165  */
167  Reply = 1, ///< Belongs to a reply
168  Group = 2, ///< Belongs to a group
169  Delete = 4 ///< Belongs to a deleted paragraph
170  };
171 
172  /**
173  * Describes the type of revision information.
174  */
176  None = 1, ///< Not specified
177  Marked = 2, ///< Is marked
178  Unmarked = 4, ///< Is unmarked
179  Accepted = 8, ///< Has been accepted
180  Rejected = 16, ///< Was rejected
181  Cancelled = 32, ///< Has been cancelled
182  Completed = 64 ///< Has been completed
183  };
184 
185  /**
186  * Describes the type of additional actions.
187  *
188  * @since 0.16 (KDE 4.10)
189  */
191  PageOpening, ///< Performed when the page containing the annotation is opened.
192  PageClosing, ///< Performed when the page containing the annotation is closed.
193  CursorEntering, ///< Performed when the cursor enters the annotation's active area @since 1.5
194  CursorLeaving, ///< Performed when the cursor exists the annotation's active area @since 1.5
195  MousePressed, ///< Performed when the mouse button is pressed inside the annotation's active area @since 1.5
196  MouseReleased, ///< Performed when the mouse button is released inside the annotation's active area @since 1.5
197  FocusIn, ///< Performed when the annotation receives the input focus @since 1.5
198  FocusOut, ///< Performed when the annotation loses the input focus @since 1.5
199  };
200 
201  /**
202  * A function to be called when the annotation is destroyed.
203  *
204  * @warning the function must *not* call any virtual function,
205  * nor subcast.
206  *
207  * @since 0.7 (KDE 4.1)
208  */
209  typedef void (*DisposeDataFunction)(const Okular::Annotation *);
210 
211  /**
212  * Destroys the annotation.
213  */
214  virtual ~Annotation();
215 
216  /**
217  * Sets the @p author of the annotation.
218  */
219  void setAuthor(const QString &author);
220 
221  /**
222  * Returns the author of the annotation.
223  */
224  QString author() const;
225 
226  /**
227  * Sets the @p contents of the annotation.
228  */
229  void setContents(const QString &contents);
230 
231  /**
232  * Returns the contents of the annotation.
233  */
234  QString contents() const;
235 
236  /**
237  * Sets the unique @p name of the annotation.
238  */
239  void setUniqueName(const QString &name);
240 
241  /**
242  * Returns the unique name of the annotation.
243  */
244  QString uniqueName() const;
245 
246  /**
247  * Sets the last modification @p date of the annotation.
248  *
249  * The date must be before or equal to QDateTime::currentDateTime()
250  */
251  void setModificationDate(const QDateTime &date);
252 
253  /**
254  * Returns the last modification date of the annotation.
255  */
256  QDateTime modificationDate() const;
257 
258  /**
259  * Sets the creation @p date of the annotation.
260  *
261  * The date must be before or equal to @see modificationDate()
262  */
263  void setCreationDate(const QDateTime &date);
264 
265  /**
266  * Returns the creation date of the annotation.
267  */
268  QDateTime creationDate() const;
269 
270  /**
271  * Sets the @p flags of the annotation.
272  * @see @ref Flag
273  */
274  void setFlags(int flags);
275 
276  /**
277  * Returns the flags of the annotation.
278  * @see @ref Flag
279  */
280  int flags() const;
281 
282  /**
283  * Sets the bounding @p rectangle of the annotation.
284  */
285  void setBoundingRectangle(const NormalizedRect &rectangle);
286 
287  /**
288  * Returns the bounding rectangle of the annotation.
289  */
290  NormalizedRect boundingRectangle() const;
291 
292  /**
293  * Returns the transformed bounding rectangle of the annotation.
294  *
295  * This rectangle must be used when showing annotations on screen
296  * to have them rotated correctly.
297  */
298  NormalizedRect transformedBoundingRectangle() const;
299 
300  /**
301  * Move the annotation by the specified coordinates.
302  *
303  * @see canBeMoved()
304  */
305  void translate(const NormalizedPoint &coord);
306 
307  /**
308  * Adjust the annotation by the specified coordinates.
309  * Adds coordinates of @p deltaCoord1 to annotations top left corner,
310  * and @p deltaCoord2 to the bottom right.
311  *
312  * @see canBeResized()
313  */
314  void adjust(const NormalizedPoint &deltaCoord1, const NormalizedPoint &deltaCoord2);
315 
316  /**
317  * The Style class contains all information about style of the
318  * annotation.
319  */
320  class OKULARCORE_EXPORT Style
321  {
322  public:
323  /**
324  * Creates a new style.
325  */
326  Style();
327 
328  /**
329  * Destroys the style.
330  */
331  ~Style();
332 
333  Style(const Style &other);
334  Style &operator=(const Style &other);
335 
336  /**
337  * Sets the @p color of the style.
338  */
339  void setColor(const QColor &color);
340 
341  /**
342  * Returns the color of the style.
343  */
344  QColor color() const;
345 
346  /**
347  * Sets the @p opacity of the style.
348  */
349  void setOpacity(double opacity);
350 
351  /**
352  * Returns the opacity of the style.
353  */
354  double opacity() const;
355 
356  /**
357  * Sets the @p width of the style.
358  */
359  void setWidth(double width);
360 
361  /**
362  * Returns the width of the style.
363  */
364  double width() const;
365 
366  /**
367  * Sets the line @p style of the style.
368  */
369  void setLineStyle(LineStyle style);
370 
371  /**
372  * Returns the line style of the style.
373  */
374  LineStyle lineStyle() const;
375 
376  /**
377  * Sets the x-corners of the style.
378  */
379  void setXCorners(double xCorners);
380 
381  /**
382  * Returns the x-corners of the style.
383  */
384  double xCorners() const;
385 
386  /**
387  * Sets the y-corners of the style.
388  */
389  void setYCorners(double yCorners);
390 
391  /**
392  * Returns the y-corners of the style.
393  */
394  double yCorners() const;
395 
396  /**
397  * Sets the @p marks of the style.
398  */
399  void setMarks(int marks);
400 
401  /**
402  * Returns the marks of the style.
403  */
404  int marks() const;
405 
406  /**
407  * Sets the @p spaces of the style.
408  */
409  void setSpaces(int spaces);
410 
411  /**
412  * Returns the spaces of the style.
413  */
414  int spaces() const;
415 
416  /**
417  * Sets the line @p effect of the style.
418  */
419  void setLineEffect(LineEffect effect);
420 
421  /**
422  * Returns the line effect of the style.
423  */
424  LineEffect lineEffect() const;
425 
426  /**
427  * Sets the effect @p intensity of the style.
428  */
429  void setEffectIntensity(double intensity);
430 
431  /**
432  * Returns the effect intensity of the style.
433  */
434  double effectIntensity() const;
435 
436  private:
437  class Private;
438  Private *const d;
439  };
440 
441  /**
442  * Returns a reference to the style object of the annotation.
443  */
444  Style &style();
445 
446  /**
447  * Returns a const reference to the style object of the annotation.
448  */
449  const Style &style() const;
450 
451  /**
452  * The Window class contains all information about the popup window
453  * of the annotation that is used to edit the content and properties.
454  */
455  class OKULARCORE_EXPORT Window
456  {
457  public:
458  /**
459  * Creates a new window.
460  */
461  Window();
462 
463  /**
464  * Destroys the window.
465  */
466  ~Window();
467 
468  Window(const Window &other);
469  Window &operator=(const Window &other);
470 
471  /**
472  * Sets the @p flags of the window.
473  */
474  void setFlags(int flags);
475 
476  /**
477  * Returns the flags of the window.
478  */
479  int flags() const;
480 
481  /**
482  * Sets the top-left @p point of the window.
483  */
484  void setTopLeft(const NormalizedPoint &point);
485 
486  /**
487  * Returns the top-left point of the window.
488  */
489  NormalizedPoint topLeft() const;
490 
491  /**
492  * Sets the @p width of the window.
493  */
494  void setWidth(int width);
495 
496  /**
497  * Returns the width of the window.
498  */
499  int width() const;
500 
501  /**
502  * Sets the @p height of the window.
503  */
504  void setHeight(int height);
505 
506  /**
507  * Returns the height of the window.
508  */
509  int height() const;
510 
511  /**
512  * Sets the @p title of the window.
513  */
514  void setTitle(const QString &title);
515 
516  /**
517  * Returns the title of the window.
518  */
519  QString title() const;
520 
521  /**
522  * Sets the @p summary of the window.
523  */
524  void setSummary(const QString &summary);
525 
526  /**
527  * Returns the summary of the window.
528  */
529  QString summary() const;
530 
531  private:
532  class Private;
533  Private *const d;
534  };
535 
536  /**
537  * Returns a reference to the window object of the annotation.
538  */
539  Window &window();
540 
541  /**
542  * Returns a const reference to the window object of the annotation.
543  */
544  const Window &window() const;
545 
546  /**
547  * The Revision class contains all information about the revision
548  * of the annotation.
549  */
550  class OKULARCORE_EXPORT Revision
551  {
552  public:
553  /**
554  * Creates a new revision.
555  */
556  Revision();
557 
558  /**
559  * Destroys the revision.
560  */
561  ~Revision();
562 
563  Revision(const Revision &other);
564  Revision &operator=(const Revision &other);
565 
566  /**
567  * Sets the @p annotation the revision belongs to.
568  */
569  void setAnnotation(Annotation *annotation);
570 
571  /**
572  * Returns the annotation the revision belongs to.
573  */
574  Annotation *annotation() const;
575 
576  /**
577  * Sets the @p scope of the revision.
578  * @see RevisionScope
579  */
580  void setScope(RevisionScope scope);
581 
582  /**
583  * Returns the scope of the revision.
584  */
585  RevisionScope scope() const;
586 
587  /**
588  * Sets the @p type of the revision.
589  * @see RevisionType
590  */
591  void setType(RevisionType type);
592 
593  /**
594  * Returns the type of the revision.
595  */
596  RevisionType type() const;
597 
598  private:
599  class Private;
600  Private *const d;
601  };
602 
603  /**
604  * Returns a reference to the revision list of the annotation.
605  */
606  QList<Revision> &revisions();
607 
608  /**
609  * Returns a reference to the revision list of the annotation.
610  */
611  const QList<Revision> &revisions() const;
612 
613  /**
614  * Sets the "native" @p id of the annotation.
615  *
616  * This is for use of the Generator, that can optionally store an
617  * handle (a pointer, an identifier, etc) of the "native" annotation
618  * object, if any.
619  *
620  * @note Okular makes no use of this
621  *
622  * @since 0.7 (KDE 4.1)
623  */
624  void setNativeId(const QVariant &id);
625 
626  /**
627  * Returns the "native" id of the annotation.
628  *
629  * @since 0.7 (KDE 4.1)
630  */
631  QVariant nativeId() const;
632 
633  /**
634  * Sets a function to be called when the annotation is destroyed.
635  *
636  * @warning the function must *not* call any virtual function,
637  * nor subcast.
638  *
639  * @since 0.7 (KDE 4.1)
640  */
641  void setDisposeDataFunction(DisposeDataFunction func);
642 
643  /**
644  * Returns whether the annotation can be moved.
645  *
646  * @since 0.7 (KDE 4.1)
647  */
648  bool canBeMoved() const;
649 
650  /**
651  * Returns whether the annotation can be resized.
652  */
653  bool canBeResized() const;
654 
655  /**
656  * Returns whether the annotation dialog should be open after creation of the annotation or not
657  *
658  * @since 0.13 (KDE 4.7)
659  */
660  bool openDialogAfterCreation() const;
661 
662  /**
663  * Returns the sub type of the annotation.
664  */
665  virtual SubType subType() const = 0;
666 
667  /**
668  * Stores the annotation as xml in @p document under the given parent @p node.
669  */
670  virtual void store(QDomNode &node, QDomDocument &document) const;
671 
672  /**
673  * Retrieve the QDomNode representing this annotation's properties
674 
675  * @since 0.17 (KDE 4.11)
676  */
677  QDomNode getAnnotationPropertiesDomNode() const;
678 
679  /**
680  * Sets annotations internal properties according to the contents of @p node
681  *
682  * @since 0.17 (KDE 4.11)
683  */
684  void setAnnotationProperties(const QDomNode &node);
685 
686 protected:
687  /// @cond PRIVATE
688  explicit Annotation(AnnotationPrivate &dd);
689  Annotation(AnnotationPrivate &dd, const QDomNode &description);
690  Q_DECLARE_PRIVATE(Annotation)
691  AnnotationPrivate *d_ptr;
692  /// @endcond
693 
694 private:
695  Q_DISABLE_COPY(Annotation)
696 };
697 
698 /**
699  * @short Native annotation interface
700  *
701  * Generators can subclass it to provide native annotation support.
702  * Generators can use Annotation::setNativeId to store per-annotation data.
703  *
704  * @since 0.15 (KDE 4.9)
705  */
706 class OKULARCORE_EXPORT AnnotationProxy
707 {
708 public:
709  enum Capability {
710  Addition, ///< Generator can create native annotations
711  Modification, ///< Generator can edit native annotations
712  Removal ///< Generator can remove native annotations
713  };
714 
715  AnnotationProxy();
716 
717  /**
718  * Destroys the annotation proxy.
719  */
720  virtual ~AnnotationProxy();
721 
722  AnnotationProxy(const AnnotationProxy &) = delete;
723  AnnotationProxy &operator=(const AnnotationProxy &) = delete;
724 
725  /**
726  * Query for the supported capabilities.
727  */
728  virtual bool supports(Capability capability) const = 0;
729 
730  /**
731  * Called when a new @p annotation is added to a @p page.
732  *
733  * @note Only called if supports(Addition) == true
734  */
735  virtual void notifyAddition(Annotation *annotation, int page) = 0;
736 
737  /**
738  * Called after an existing @p annotation at a given @p page is modified.
739  *
740  * Generator can call @p annotation getters to get the new values.
741  * @p appearanceChanged tells if a non-visible property was modified
742  *
743  * @note Only called if supports(Modification) == true
744  */
745  virtual void notifyModification(const Annotation *annotation, int page, bool appearanceChanged) = 0;
746 
747  /**
748  * Called when an existing @p annotation at a given @p page is removed.
749  *
750  * @note Only called if supports(Removal) == true
751  */
752  virtual void notifyRemoval(Annotation *annotation, int page) = 0;
753 };
754 
755 class OKULARCORE_EXPORT TextAnnotation : public Annotation
756 {
757 public:
758  /**
759  * Describes the type of the text.
760  */
761  enum TextType {
762  Linked, ///< The annotation is linked to a text
763  InPlace ///< The annotation is located next to the text
764  };
765 
766  /**
767  * Describes the style of the text.
768  */
769  enum InplaceIntent {
770  Unknown, ///< Unknown style
771  Callout, ///< Callout style
772  TypeWriter ///< Type writer style
773  };
774 
775  /**
776  * Creates a new text annotation.
777  */
778  TextAnnotation();
779 
780  /**
781  * Creates a new text annotation from the xml @p description
782  */
783  explicit TextAnnotation(const QDomNode &description);
784 
785  /**
786  * Destroys the text annotation.
787  */
788  ~TextAnnotation() override;
789 
790  /**
791  * Sets the text @p type of the text annotation.
792  * @see TextType
793  */
794  void setTextType(TextType type);
795 
796  /**
797  * Returns the text type of the text annotation.
798  */
799  TextType textType() const;
800 
801  /**
802  * Sets the @p icon of the text annotation.
803  */
804  void setTextIcon(const QString &icon);
805 
806  /**
807  * Returns the icon of the text annotation.
808  */
809  QString textIcon() const;
810 
811  /**
812  * Sets the @p font of the text annotation.
813  */
814  void setTextFont(const QFont &font);
815 
816  /**
817  * Returns the font of the text annotation.
818  */
819  QFont textFont() const;
820 
821  /**
822  * Sets the @p color of inplace text.
823  *
824  * @since 1.6
825  */
826  void setTextColor(const QColor &color);
827 
828  /**
829  * Returns the color of inplace text.
830  *
831  * @since 1.6
832  */
833  QColor textColor() const;
834 
835  /**
836  * Sets the inplace @p alignment of the text annotation.
837  * 0:left, 1:center, 2:right
838  */
839  void setInplaceAlignment(int alignment);
840 
841  /**
842  * Returns the inplace alignment of the text annotation.
843  * 0:left, 1:center, 2:right
844  */
845  int inplaceAlignment() const;
846 
847  /**
848  * Sets the inplace callout @p point at @p index.
849  *
850  * @p index must be between 0 and 2.
851  */
852  void setInplaceCallout(const NormalizedPoint &point, int index);
853 
854  /**
855  * Returns the inplace callout point for @p index.
856  *
857  * @p index must be between 0 and 2.
858  */
859  NormalizedPoint inplaceCallout(int index) const;
860 
861  /**
862  * Returns the transformed (e.g. rotated) inplace callout point for @p index.
863  *
864  * @p index must be between 0 and 2.
865  */
866  NormalizedPoint transformedInplaceCallout(int index) const;
867 
868  /**
869  * Returns the inplace @p intent of the text annotation.
870  * @see InplaceIntent
871  */
872  void setInplaceIntent(InplaceIntent intent);
873 
874  /**
875  * Returns the inplace intent of the text annotation.
876  */
877  InplaceIntent inplaceIntent() const;
878 
879  /**
880  * Returns the sub type of the text annotation.
881  */
882  SubType subType() const override;
883 
884  /**
885  * Stores the text annotation as xml in @p document under the given parent @p node.
886  */
887  void store(QDomNode &node, QDomDocument &document) const override;
888 
889 private:
890  Q_DECLARE_PRIVATE(TextAnnotation)
891  Q_DISABLE_COPY(TextAnnotation)
892 };
893 
894 class OKULARCORE_EXPORT LineAnnotation : public Annotation
895 {
896 public:
897  /**
898  * Describes the line ending style.
899  */
900  enum TermStyle {
901  Square, ///< Using a square
902  Circle, ///< Using a circle
903  Diamond, ///< Using a diamond
904  OpenArrow, ///< Using an open arrow
905  ClosedArrow, ///< Using a closed arrow
906  None, ///< No special ending style
907  Butt, ///< Using a butt ending
908  ROpenArrow, ///< Using an arrow opened at the right side
909  RClosedArrow, ///< Using an arrow closed at the right side
910  Slash ///< Using a slash
911  };
912 
913  /**
914  * Describes the line intent.
915  */
916  enum LineIntent {
917  Unknown, ///< Unknown intent
918  Arrow, ///< Arrow intent
919  Dimension, ///< Dimension intent
920  PolygonCloud ///< Polygon cloud intent
921  };
922 
923  /**
924  * Creates a new line annotation.
925  */
926  LineAnnotation();
927 
928  /**
929  * Creates a new line annotation from the xml @p description
930  */
931  explicit LineAnnotation(const QDomNode &description);
932 
933  /**
934  * Destroys the line annotation.
935  */
936  ~LineAnnotation() override;
937 
938  /**
939  * Sets the normalized line @p points of the line annotation.
940  *
941  * @since 22.08
942  */
943  void setLinePoints(const QList<NormalizedPoint> &points);
944 
945  /**
946  * Returns the normalized line points of the line annotation.
947  *
948  * @since 22.08
949  */
950  QList<NormalizedPoint> linePoints() const;
951 
952  /**
953  * Returns the transformed (e.g. rotated) normalized line points
954  * of the line annotation.
955  *
956  * @since 22.08
957  */
958  QList<NormalizedPoint> transformedLinePoints() const;
959 
960  /**
961  * Sets the line starting @p style of the line annotation.
962  * @see TermStyle
963  */
964  void setLineStartStyle(TermStyle style);
965 
966  /**
967  * Returns the line starting style of the line annotation.
968  */
969  TermStyle lineStartStyle() const;
970 
971  /**
972  * Sets the line ending @p style of the line annotation.
973  * @see TermStyle
974  */
975  void setLineEndStyle(TermStyle style);
976 
977  /**
978  * Returns the line ending style of the line annotation.
979  */
980  TermStyle lineEndStyle() const;
981 
982  /**
983  * Sets whether the line shall be @p closed.
984  */
985  void setLineClosed(bool closed);
986 
987  /**
988  * Returns whether the line shall be closed.
989  */
990  bool lineClosed() const;
991 
992  /**
993  * Sets the inner line @p color of the line annotation.
994  */
995  void setLineInnerColor(const QColor &color);
996 
997  /**
998  * Returns the inner line color of the line annotation.
999  */
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  */
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
Collector for all the data belonging to a page.
Definition: page.h:47
The Document.
Definition: document.h:190
Contains information about a sound object.
Definition: sound.h:23
RevisionScope
Describes the scope of revision information.
Definition: annotations.h:166
Widget annotation.
Definition: annotations.h:1667
The documentation to the global Okular namespace.
Definition: action.h:16
Annotation struct holds properties shared by all annotations.
Definition: annotations.h:95
Encapsulates data that describes an action.
Definition: action.h:40
@ FocusIn
Performed when the annotation receives the input focus.
Definition: annotations.h:197
AdditionalActionType
Describes the type of additional actions.
Definition: annotations.h:190
NormalizedPoint is a helper class which stores the coordinates of a normalized point.
Definition: area.h:116
@ PageClosing
Performed when the page containing the annotation is closed.
Definition: annotations.h:192
Screen annotation.
Definition: annotations.h:1598
This class describes the object rectangle for an annotation.
Definition: area.h:550
@ Addition
Generator can create native annotations.
Definition: annotations.h:710
Flag
Describes additional properties of an annotation.
Definition: annotations.h:130
The Style class contains all information about style of the annotation.
Definition: annotations.h:320
LineEffect
Describes possible line effects for.
Definition: annotations.h:158
@ CursorEntering
Performed when the cursor enters the annotation's active area.
Definition: annotations.h:193
The Revision class contains all information about the revision of the annotation.
Definition: annotations.h:550
Contains information about a movie object.
Definition: movie.h:25
LineStyle
Describes possible line styles for.
Definition: annotations.h:147
A NormalizedRect is a rectangle which can be defined by two NormalizedPoints.
Definition: area.h:188
@ CursorLeaving
Performed when the cursor exists the annotation's active area.
Definition: annotations.h:194
Sound annotation.
Definition: annotations.h:1492
RichMedia annotation.
Definition: annotations.h:1722
Describes a highlight quad of a text markup annotation.
Definition: annotations.h:1172
Helper class for (recursive) annotation retrieval/storage.
Definition: annotations.h:49
The Window class contains all information about the popup window of the annotation that is used to ed...
Definition: annotations.h:455
RevisionType
Describes the type of revision information.
Definition: annotations.h:175
SubType
Describes the type of annotation as defined in PDF standard.
Definition: annotations.h:110
@ MousePressed
Performed when the mouse button is pressed inside the annotation's active area.
Definition: annotations.h:195
@ MouseReleased
Performed when the mouse button is released inside the annotation's active area.
Definition: annotations.h:196
An area with normalized coordinates that contains a reference to an object.
Definition: area.h:452
Native annotation interface.
Definition: annotations.h:706
@ FocusOut
Performed when the annotation loses the input focus.
Definition: annotations.h:198
@ PageOpening
Performed when the page containing the annotation is opened.
Definition: annotations.h:191
Movie annotation.
Definition: annotations.h:1552
@ Modification
Generator can edit native annotations.
Definition: annotations.h:711
An embedded file into the document.
Definition: document.h:1456
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Oct 6 2022 03:56:39 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.