Okular

annotations.h
1/*
2 SPDX-FileCopyrightText: 2005 Enrico Ros <eros.kde@email.it>
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#include "signatureutils.h"
20
21namespace Okular
22{
23class Action;
24class Annotation;
25class AnnotationObjectRect;
26class AnnotationPrivate;
27class Document;
28class EmbeddedFile;
29class Page;
30class PagePrivate;
31class Sound;
32class Movie;
33class TextAnnotationPrivate;
34class LineAnnotationPrivate;
35class GeomAnnotationPrivate;
36class HighlightAnnotationPrivate;
37class StampAnnotationPrivate;
38class SignatureAnnotationPrivate;
39class InkAnnotationPrivate;
40class CaretAnnotationPrivate;
41class FileAttachmentAnnotationPrivate;
42class SoundAnnotationPrivate;
43class MovieAnnotationPrivate;
44class ScreenAnnotationPrivate;
45class WidgetAnnotationPrivate;
46class RichMediaAnnotationPrivate;
47class NewSignatureData;
48
49/**
50 * @short Helper class for (recursive) annotation retrieval/storage.
51 */
52class OKULARCORE_EXPORT AnnotationUtils
53{
54public:
55 /**
56 * Restore an annotation (with revisions if needed) from the dom @p element.
57 *
58 * Returns a pointer to the complete annotation or 0 if element is invalid.
59 */
60 static Annotation *createAnnotation(const QDomElement &element);
61
62 /**
63 * Saves the @p annotation as a child of @p element taking
64 * care of saving all revisions if it has any.
65 */
66 static void storeAnnotation(const Annotation *annotation, QDomElement &element, QDomDocument &document);
67
68 /**
69 * Returns the child element with the given @p name from the direct
70 * children of @p parentNode or a null element if not found.
71 */
72 static QDomElement findChildElement(const QDomNode &parentNode, const QString &name);
73
74 /**
75 * Returns the geometry of the given @p annotation scaled by
76 * @p scaleX and @p scaleY.
77 */
78 static QRect annotationGeometry(const Annotation *annotation, double scaleX, double scaleY);
79
80 /**
81 * Returns a pixmap for a stamp symbol
82 *
83 * @p name Name of a Okular stamp symbol, icon or path to an image
84 * @p size Size of the pixmap side
85 * @p keepAspectRatio Whether to keep aspect ratio of the stamp or not
86 *
87 * @since 21.12
88 */
89 static QPixmap loadStamp(const QString &nameOrPath, int size, bool keepAspectRatio = true);
90};
91
92/**
93 * @short Annotation struct holds properties shared by all annotations.
94 *
95 * An Annotation is an object (text note, highlight, sound, popup window, ..)
96 * contained by a Page in the document.
97 */
98class OKULARCORE_EXPORT Annotation
99{
100 /// @cond PRIVATE
101 friend class AnnotationObjectRect;
102 friend class Document;
103 friend class DocumentPrivate;
104 friend class ObjectRect;
105 friend class Page;
106 friend class PagePrivate;
107 /// @endcond
108
109public:
110 /**
111 * Describes the type of annotation as defined in PDF standard.
112 */
113 enum SubType {
114 AText = 1, ///< A textual annotation
115 ALine = 2, ///< A line annotation
116 AGeom = 3, ///< A geometrical annotation
117 AHighlight = 4, ///< A highlight annotation
118 AStamp = 5, ///< A stamp annotation
119 AInk = 6, ///< An ink annotation
120 ACaret = 8, ///< A caret annotation
121 AFileAttachment = 9, ///< A file attachment annotation
122 ASound = 10, ///< A sound annotation
123 AMovie = 11, ///< A movie annotation
124 AScreen = 12, ///< A screen annotation
125 AWidget = 13, ///< A widget annotation
126 ARichMedia = 14, ///< A rich media annotation
127 A_BASE = 0 ///< The annotation base class
128 };
129
130 /**
131 * Describes additional properties of an annotation.
132 */
133 enum Flag {
134 Hidden = 1, ///< Is not shown in the document
135 FixedSize = 2, ///< Has a fixed size
136 FixedRotation = 4, ///< Has a fixed rotation
137 DenyPrint = 8, ///< Cannot be printed
138 DenyWrite = 16, ///< Cannot be changed
139 DenyDelete = 32, ///< Cannot be deleted
140 ToggleHidingOnMouse = 64, ///< Can be hidden/shown by mouse click
141 External = 128, ///< Is stored external
142 ExternallyDrawn = 256, ///< Is drawn externally (by the generator which provided it) @since 0.10 (KDE 4.4)
143 BeingMoved = 512, ///< Is being moved (mouse drag and drop). If ExternallyDrawn, the generator must not draw it @since 0.15 (KDE 4.9)
144 BeingResized = 1024 ///< Is being resized (mouse drag and drop). If ExternallyDrawn, the generator must not draw it @since 1.1.0
145 };
146
147 /**
148 * Describes possible line styles for @see ALine annotation.
149 */
151 Solid = 1, ///< A solid line
152 Dashed = 2, ///< A dashed line
153 Beveled = 4, ///< A beveled line
154 Inset = 8, ///< An inset line
155 Underline = 16 ///< An underline
156 };
157
158 /**
159 * Describes possible line effects for @see ALine annotation.
160 */
162 NoEffect = 1, ///< No effect
163 Cloudy = 2 ///< The cloudy effect
164 };
165
166 /**
167 * Describes the scope of revision information.
168 */
170 Reply = 1, ///< Belongs to a reply
171 Group = 2, ///< Belongs to a group
172 Delete = 4 ///< Belongs to a deleted paragraph
173 };
174
175 /**
176 * Describes the type of revision information.
177 */
179 None = 1, ///< Not specified
180 Marked = 2, ///< Is marked
181 Unmarked = 4, ///< Is unmarked
182 Accepted = 8, ///< Has been accepted
183 Rejected = 16, ///< Was rejected
184 Cancelled = 32, ///< Has been cancelled
185 Completed = 64 ///< Has been completed
186 };
187
188 /**
189 * Describes the type of additional actions.
190 *
191 * @since 0.16 (KDE 4.10)
192 */
194 PageOpening, ///< Performed when the page containing the annotation is opened.
195 PageClosing, ///< Performed when the page containing the annotation is closed.
196 CursorEntering, ///< Performed when the cursor enters the annotation's active area @since 1.5
197 CursorLeaving, ///< Performed when the cursor exists the annotation's active area @since 1.5
198 MousePressed, ///< Performed when the mouse button is pressed inside the annotation's active area @since 1.5
199 MouseReleased, ///< Performed when the mouse button is released inside the annotation's active area @since 1.5
200 FocusIn, ///< Performed when the annotation receives the input focus @since 1.5
201 FocusOut, ///< Performed when the annotation loses the input focus @since 1.5
202 };
203
204 /**
205 * A function to be called when the annotation is destroyed.
206 *
207 * @warning the function must *not* call any virtual function,
208 * nor subcast.
209 *
210 * @since 0.7 (KDE 4.1)
211 */
212 typedef void (*DisposeDataFunction)(const Okular::Annotation *);
213
214 /**
215 * Destroys the annotation.
216 */
217 virtual ~Annotation();
218
219 /**
220 * Sets the @p author of the annotation.
221 */
222 void setAuthor(const QString &author);
223
224 /**
225 * Returns the author of the annotation.
226 */
227 QString author() const;
228
229 /**
230 * Sets the @p contents of the annotation.
231 */
232 void setContents(const QString &contents);
233
234 /**
235 * Returns the contents of the annotation.
236 */
237 QString contents() const;
238
239 /**
240 * Sets the unique @p name of the annotation.
241 */
242 void setUniqueName(const QString &name);
243
244 /**
245 * Returns the unique name of the annotation.
246 */
247 QString uniqueName() const;
248
249 /**
250 * Sets the last modification @p date of the annotation.
251 *
252 * The date must be before or equal to QDateTime::currentDateTime()
253 */
254 void setModificationDate(const QDateTime &date);
255
256 /**
257 * Returns the last modification date of the annotation.
258 */
259 QDateTime modificationDate() const;
260
261 /**
262 * Sets the creation @p date of the annotation.
263 *
264 * The date must be before or equal to @see modificationDate()
265 */
266 void setCreationDate(const QDateTime &date);
267
268 /**
269 * Returns the creation date of the annotation.
270 */
271 QDateTime creationDate() const;
272
273 /**
274 * Sets the @p flags of the annotation.
275 * @see @ref Flag
276 */
277 void setFlags(int flags);
278
279 /**
280 * Returns the flags of the annotation.
281 * @see @ref Flag
282 */
283 int flags() const;
284
285 /**
286 * Sets the bounding @p rectangle of the annotation.
287 */
288 void setBoundingRectangle(const NormalizedRect &rectangle);
289
290 /**
291 * Returns the bounding rectangle of the annotation.
292 */
293 NormalizedRect boundingRectangle() const;
294
295 /**
296 * Returns the transformed bounding rectangle of the annotation.
297 *
298 * This rectangle must be used when showing annotations on screen
299 * to have them rotated correctly.
300 */
301 NormalizedRect transformedBoundingRectangle() const;
302
303 /**
304 * Move the annotation by the specified coordinates.
305 *
306 * @see canBeMoved()
307 */
308 void translate(const NormalizedPoint &coord);
309
310 /**
311 * Adjust the annotation by the specified coordinates.
312 * Adds coordinates of @p deltaCoord1 to annotations top left corner,
313 * and @p deltaCoord2 to the bottom right.
314 *
315 * @see canBeResized()
316 */
317 void adjust(const NormalizedPoint &deltaCoord1, const NormalizedPoint &deltaCoord2);
318
319 /**
320 * The Style class contains all information about style of the
321 * annotation.
322 */
323 class OKULARCORE_EXPORT Style
324 {
325 public:
326 /**
327 * Creates a new style.
328 */
329 Style();
330
331 /**
332 * Destroys the style.
333 */
334 ~Style();
335
336 Style(const Style &other);
337 Style &operator=(const Style &other);
338
339 /**
340 * Sets the @p color of the style.
341 */
342 void setColor(const QColor &color);
343
344 /**
345 * Returns the color of the style.
346 */
347 QColor color() const;
348
349 /**
350 * Sets the @p opacity of the style.
351 */
352 void setOpacity(double opacity);
353
354 /**
355 * Returns the opacity of the style.
356 */
357 double opacity() const;
358
359 /**
360 * Sets the @p width of the style.
361 */
362 void setWidth(double width);
363
364 /**
365 * Returns the width of the style.
366 */
367 double width() const;
368
369 /**
370 * Sets the line @p style of the style.
371 */
372 void setLineStyle(LineStyle style);
373
374 /**
375 * Returns the line style of the style.
376 */
377 LineStyle lineStyle() const;
378
379 /**
380 * Sets the x-corners of the style.
381 */
382 void setXCorners(double xCorners);
383
384 /**
385 * Returns the x-corners of the style.
386 */
387 double xCorners() const;
388
389 /**
390 * Sets the y-corners of the style.
391 */
392 void setYCorners(double yCorners);
393
394 /**
395 * Returns the y-corners of the style.
396 */
397 double yCorners() const;
398
399 /**
400 * Sets the @p marks of the style.
401 */
402 void setMarks(int marks);
403
404 /**
405 * Returns the marks of the style.
406 */
407 int marks() const;
408
409 /**
410 * Sets the @p spaces of the style.
411 */
412 void setSpaces(int spaces);
413
414 /**
415 * Returns the spaces of the style.
416 */
417 int spaces() const;
418
419 /**
420 * Sets the line @p effect of the style.
421 */
422 void setLineEffect(LineEffect effect);
423
424 /**
425 * Returns the line effect of the style.
426 */
427 LineEffect lineEffect() const;
428
429 /**
430 * Sets the effect @p intensity of the style.
431 */
432 void setEffectIntensity(double intensity);
433
434 /**
435 * Returns the effect intensity of the style.
436 */
437 double effectIntensity() const;
438
439 private:
440 class Private;
441 Private *const d;
442 };
443
444 /**
445 * Returns a reference to the style object of the annotation.
446 */
447 Style &style();
448
449 /**
450 * Returns a const reference to the style object of the annotation.
451 */
452 const Style &style() const;
453
454 /**
455 * The Window class contains all information about the popup window
456 * of the annotation that is used to edit the content and properties.
457 */
458 class OKULARCORE_EXPORT Window
459 {
460 public:
461 /**
462 * Creates a new window.
463 */
464 Window();
465
466 /**
467 * Destroys the window.
468 */
469 ~Window();
470
471 Window(const Window &other);
472 Window &operator=(const Window &other);
473
474 /**
475 * Sets the @p flags of the window.
476 */
477 void setFlags(int flags);
478
479 /**
480 * Returns the flags of the window.
481 */
482 int flags() const;
483
484 /**
485 * Sets the top-left @p point of the window.
486 */
487 void setTopLeft(const NormalizedPoint &point);
488
489 /**
490 * Returns the top-left point of the window.
491 */
492 NormalizedPoint topLeft() const;
493
494 /**
495 * Sets the @p width of the window.
496 */
497 void setWidth(int width);
498
499 /**
500 * Returns the width of the window.
501 */
502 int width() const;
503
504 /**
505 * Sets the @p height of the window.
506 */
507 void setHeight(int height);
508
509 /**
510 * Returns the height of the window.
511 */
512 int height() const;
513
514 /**
515 * Sets the @p title of the window.
516 */
517 void setTitle(const QString &title);
518
519 /**
520 * Returns the title of the window.
521 */
522 QString title() const;
523
524 /**
525 * Sets the @p summary of the window.
526 */
527 void setSummary(const QString &summary);
528
529 /**
530 * Returns the summary of the window.
531 */
532 QString summary() const;
533
534 private:
535 class Private;
536 Private *const d;
537 };
538
539 /**
540 * Returns a reference to the window object of the annotation.
541 */
542 Window &window();
543
544 /**
545 * Returns a const reference to the window object of the annotation.
546 */
547 const Window &window() const;
548
549 /**
550 * The Revision class contains all information about the revision
551 * of the annotation.
552 */
553 class OKULARCORE_EXPORT Revision
554 {
555 public:
556 /**
557 * Creates a new revision.
558 */
559 Revision();
560
561 /**
562 * Destroys the revision.
563 */
564 ~Revision();
565
566 Revision(const Revision &other);
567 Revision &operator=(const Revision &other);
568
569 /**
570 * Sets the @p annotation the revision belongs to.
571 */
572 void setAnnotation(Annotation *annotation);
573
574 /**
575 * Returns the annotation the revision belongs to.
576 */
577 Annotation *annotation() const;
578
579 /**
580 * Sets the @p scope of the revision.
581 * @see RevisionScope
582 */
583 void setScope(RevisionScope scope);
584
585 /**
586 * Returns the scope of the revision.
587 */
588 RevisionScope scope() const;
589
590 /**
591 * Sets the @p type of the revision.
592 * @see RevisionType
593 */
594 void setType(RevisionType type);
595
596 /**
597 * Returns the type of the revision.
598 */
599 RevisionType type() const;
600
601 private:
602 class Private;
603 Private *const d;
604 };
605
606 /**
607 * Returns a reference to the revision list of the annotation.
608 */
609 QList<Revision> &revisions();
610
611 /**
612 * Returns a reference to the revision list of the annotation.
613 */
614 const QList<Revision> &revisions() const;
615
616 /**
617 * Sets the "native" @p id of the annotation.
618 *
619 * This is for use of the Generator, that can optionally store an
620 * handle (a pointer, an identifier, etc) of the "native" annotation
621 * object, if any.
622 *
623 * @note Okular makes no use of this
624 *
625 * @since 0.7 (KDE 4.1)
626 */
627 void setNativeId(const QVariant &id);
628
629 /**
630 * Returns the "native" id of the annotation.
631 *
632 * @since 0.7 (KDE 4.1)
633 */
634 QVariant nativeId() const;
635
636 /**
637 * Sets a function to be called when the annotation is destroyed.
638 *
639 * @warning the function must *not* call any virtual function,
640 * nor subcast.
641 *
642 * @since 0.7 (KDE 4.1)
643 */
644 void setDisposeDataFunction(DisposeDataFunction func);
645
646 /**
647 * Returns whether the annotation can be moved.
648 *
649 * @since 0.7 (KDE 4.1)
650 */
651 bool canBeMoved() const;
652
653 /**
654 * Returns whether the annotation can be resized.
655 */
656 bool canBeResized() const;
657
658 /**
659 * Returns whether the annotation dialog should be open after creation of the annotation or not
660 *
661 * @since 0.13 (KDE 4.7)
662 */
663 bool openDialogAfterCreation() const;
664
665 /**
666 * Returns the sub type of the annotation.
667 */
668 virtual SubType subType() const = 0;
669
670 /**
671 * Stores the annotation as xml in @p document under the given parent @p node.
672 */
673 virtual void store(QDomNode &node, QDomDocument &document) const;
674
675 /**
676 * Retrieve the QDomNode representing this annotation's properties
677
678 * @since 0.17 (KDE 4.11)
679 */
680 QDomNode getAnnotationPropertiesDomNode() const;
681
682 /**
683 * Sets annotations internal properties according to the contents of @p node
684 *
685 * @since 0.17 (KDE 4.11)
686 */
687
688 void setAnnotationProperties(const QDomNode &node);
689
690 /**
691 * Sets some native internal data with shared ownership.
692 *
693 * data is kept alive according to shared_ptr refcount.
694 *
695 * Can be cleared in here with just setting a nullptr.
696 *
697 * @since 24.12
698 */
699 void setNativeData(std::shared_ptr<void> data);
700
701 /**
702 * @returns the native data content, or nullptr if nothing set.
703 *
704 * You set it, you know what's in it
705 *
706 * @since 24.12
707 */
708 const void *nativeData() const;
709
710protected:
711 /// @cond PRIVATE
712 explicit Annotation(AnnotationPrivate &dd);
713 Annotation(AnnotationPrivate &dd, const QDomNode &description);
714 Q_DECLARE_PRIVATE(Annotation)
715 AnnotationPrivate *d_ptr;
716 /// @endcond
717
718private:
719 Q_DISABLE_COPY(Annotation)
720};
721
722/**
723 * @short Native annotation interface
724 *
725 * Generators can subclass it to provide native annotation support.
726 * Generators can use Annotation::setNativeId to store per-annotation data.
727 *
728 * @since 0.15 (KDE 4.9)
729 */
730class OKULARCORE_EXPORT AnnotationProxy
731{
732public:
734 Addition, ///< Generator can create native annotations
735 Modification, ///< Generator can edit native annotations
736 Removal ///< Generator can remove native annotations
737 };
738
740
741 /**
742 * Destroys the annotation proxy.
743 */
744 virtual ~AnnotationProxy();
745
746 AnnotationProxy(const AnnotationProxy &) = delete;
747 AnnotationProxy &operator=(const AnnotationProxy &) = delete;
748
749 /**
750 * Query for the supported capabilities.
751 */
752 virtual bool supports(Capability capability) const = 0;
753
754 /**
755 * Called when a new @p annotation is added to a @p page.
756 *
757 * @note Only called if supports(Addition) == true
758 */
759 virtual void notifyAddition(Annotation *annotation, int page) = 0;
760
761 /**
762 * Called after an existing @p annotation at a given @p page is modified.
763 *
764 * Generator can call @p annotation getters to get the new values.
765 * @p appearanceChanged tells if a non-visible property was modified
766 *
767 * @note Only called if supports(Modification) == true
768 */
769 virtual void notifyModification(const Annotation *annotation, int page, bool appearanceChanged) = 0;
770
771 /**
772 * Called when an existing @p annotation at a given @p page is removed.
773 *
774 * @note Only called if supports(Removal) == true
775 */
776 virtual void notifyRemoval(Annotation *annotation, int page) = 0;
777};
778
779class OKULARCORE_EXPORT TextAnnotation : public Annotation
780{
781public:
782 /**
783 * Describes the type of the text.
784 */
785 enum TextType {
786 Linked, ///< The annotation is linked to a text
787 InPlace ///< The annotation is located next to the text
788 };
789
790 /**
791 * Describes the style of the text.
792 */
793 enum InplaceIntent {
794 Unknown, ///< Unknown style
795 Callout, ///< Callout style
796 TypeWriter ///< Type writer style
797 };
798
799 /**
800 * Creates a new text annotation.
801 */
802 TextAnnotation();
803
804 /**
805 * Creates a new text annotation from the xml @p description
806 */
807 explicit TextAnnotation(const QDomNode &description);
808
809 /**
810 * Destroys the text annotation.
811 */
812 ~TextAnnotation() override;
813
814 /**
815 * Sets the text @p type of the text annotation.
816 * @see TextType
817 */
818 void setTextType(TextType type);
819
820 /**
821 * Returns the text type of the text annotation.
822 */
823 TextType textType() const;
824
825 /**
826 * Sets the @p icon of the text annotation.
827 */
828 void setTextIcon(const QString &icon);
829
830 /**
831 * Returns the icon of the text annotation.
832 */
833 QString textIcon() const;
834
835 /**
836 * Sets the @p font of the text annotation.
837 */
838 void setTextFont(const QFont &font);
839
840 /**
841 * Returns the font of the text annotation.
842 */
843 QFont textFont() const;
844
845 /**
846 * Sets the @p color of inplace text.
847 *
848 * @since 1.6
849 */
850 void setTextColor(const QColor &color);
851
852 /**
853 * Returns the color of inplace text.
854 *
855 * @since 1.6
856 */
857 QColor textColor() const;
858
859 /**
860 * Sets the inplace @p alignment of the text annotation.
861 * 0:left, 1:center, 2:right
862 */
863 void setInplaceAlignment(int alignment);
864
865 /**
866 * Returns the inplace alignment of the text annotation.
867 * 0:left, 1:center, 2:right
868 */
869 int inplaceAlignment() const;
870
871 /**
872 * Sets the inplace callout @p point at @p index.
873 *
874 * @p index must be between 0 and 2.
875 */
876 void setInplaceCallout(const NormalizedPoint &point, int index);
877
878 /**
879 * Returns the inplace callout point for @p index.
880 *
881 * @p index must be between 0 and 2.
882 */
883 NormalizedPoint inplaceCallout(int index) const;
884
885 /**
886 * Returns the transformed (e.g. rotated) inplace callout point for @p index.
887 *
888 * @p index must be between 0 and 2.
889 */
890 NormalizedPoint transformedInplaceCallout(int index) const;
891
892 /**
893 * Returns the inplace @p intent of the text annotation.
894 * @see InplaceIntent
895 */
896 void setInplaceIntent(InplaceIntent intent);
897
898 /**
899 * Returns the inplace intent of the text annotation.
900 */
901 InplaceIntent inplaceIntent() const;
902
903 /**
904 * Returns the sub type of the text annotation.
905 */
906 SubType subType() const override;
907
908 /**
909 * Stores the text annotation as xml in @p document under the given parent @p node.
910 */
911 void store(QDomNode &node, QDomDocument &document) const override;
912
913private:
914 Q_DECLARE_PRIVATE(TextAnnotation)
915 Q_DISABLE_COPY(TextAnnotation)
916};
917
918class OKULARCORE_EXPORT LineAnnotation : public Annotation
919{
920public:
921 /**
922 * Describes the line ending style.
923 */
924 enum TermStyle {
925 Square, ///< Using a square
926 Circle, ///< Using a circle
927 Diamond, ///< Using a diamond
928 OpenArrow, ///< Using an open arrow
929 ClosedArrow, ///< Using a closed arrow
930 None, ///< No special ending style
931 Butt, ///< Using a butt ending
932 ROpenArrow, ///< Using an arrow opened at the right side
933 RClosedArrow, ///< Using an arrow closed at the right side
934 Slash ///< Using a slash
935 };
936
937 /**
938 * Describes the line intent.
939 */
940 enum LineIntent {
941 Unknown, ///< Unknown intent
942 Arrow, ///< Arrow intent
943 Dimension, ///< Dimension intent
944 PolygonCloud ///< Polygon cloud intent
945 };
946
947 /**
948 * Creates a new line annotation.
949 */
950 LineAnnotation();
951
952 /**
953 * Creates a new line annotation from the xml @p description
954 */
955 explicit LineAnnotation(const QDomNode &description);
956
957 /**
958 * Destroys the line annotation.
959 */
960 ~LineAnnotation() override;
961
962 /**
963 * Sets the normalized line @p points of the line annotation.
964 *
965 * @since 22.08
966 */
967 void setLinePoints(const QList<NormalizedPoint> &points);
968
969 /**
970 * Returns the normalized line points of the line annotation.
971 *
972 * @since 22.08
973 */
974 QList<NormalizedPoint> linePoints() const;
975
976 /**
977 * Returns the transformed (e.g. rotated) normalized line points
978 * of the line annotation.
979 *
980 * @since 22.08
981 */
982 QList<NormalizedPoint> transformedLinePoints() const;
983
984 /**
985 * Sets the line starting @p style of the line annotation.
986 * @see TermStyle
987 */
988 void setLineStartStyle(TermStyle style);
989
990 /**
991 * Returns the line starting style of the line annotation.
992 */
993 TermStyle lineStartStyle() const;
994
995 /**
996 * Sets the line ending @p style of the line annotation.
997 * @see TermStyle
998 */
999 void setLineEndStyle(TermStyle style);
1000
1001 /**
1002 * Returns the line ending style of the line annotation.
1003 */
1004 TermStyle lineEndStyle() const;
1005
1006 /**
1007 * Sets whether the line shall be @p closed.
1008 */
1009 void setLineClosed(bool closed);
1010
1011 /**
1012 * Returns whether the line shall be closed.
1013 */
1014 bool lineClosed() const;
1015
1016 /**
1017 * Sets the inner line @p color of the line annotation.
1018 */
1019 void setLineInnerColor(const QColor &color);
1020
1021 /**
1022 * Returns the inner line color of the line annotation.
1023 */
1024 QColor lineInnerColor() const;
1025
1026 /**
1027 * Sets the leading forward @p point of the line annotation.
1028 */
1029 void setLineLeadingForwardPoint(double point);
1030
1031 /**
1032 * Returns the leading forward point of the line annotation.
1033 */
1034 double lineLeadingForwardPoint() const;
1035
1036 /**
1037 * Sets the leading backward @p point of the line annotation.
1038 */
1039 void setLineLeadingBackwardPoint(double point);
1040
1041 /**
1042 * Returns the leading backward point of the line annotation.
1043 */
1044 double lineLeadingBackwardPoint() const;
1045
1046 /**
1047 * Sets whether the caption shall be @p shown.
1048 */
1049 void setShowCaption(bool shown);
1050
1051 /**
1052 * Returns whether the caption shall be shown.
1053 */
1054 bool showCaption() const;
1055
1056 /**
1057 * Sets the line @p intent of the line annotation.
1058 * @see LineIntent
1059 */
1060 void setLineIntent(LineIntent intent);
1061
1062 /**
1063 * Returns the line intent of the line annotation.
1064 */
1065 LineIntent lineIntent() const;
1066
1067 /**
1068 * Returns the sub type of the line annotation.
1069 */
1070 SubType subType() const override;
1071
1072 /**
1073 * Stores the line annotation as xml in @p document under the given parent @p node.
1074 */
1075 void store(QDomNode &node, QDomDocument &document) const override;
1076
1077private:
1078 Q_DECLARE_PRIVATE(LineAnnotation)
1079 Q_DISABLE_COPY(LineAnnotation)
1080};
1081
1082class OKULARCORE_EXPORT GeomAnnotation : public Annotation
1083{
1084public:
1085 // common enums
1086 enum GeomType {
1087 InscribedSquare, ///< Draw a square
1088 InscribedCircle ///< Draw a circle
1089 };
1090
1091 /**
1092 * Creates a new geometrical annotation.
1093 */
1094 GeomAnnotation();
1095
1096 /**
1097 * Creates a new geometrical annotation from the xml @p description
1098 */
1099 explicit GeomAnnotation(const QDomNode &description);
1100
1101 /**
1102 * Destroys the geometrical annotation.
1103 */
1104 ~GeomAnnotation() override;
1105
1106 /**
1107 * Sets the geometrical @p type of the geometrical annotation.
1108 * @see GeomType
1109 */
1110 void setGeometricalType(GeomType type);
1111
1112 /**
1113 * Returns the geometrical type of the geometrical annotation.
1114 */
1115 GeomType geometricalType() const;
1116
1117 /**
1118 * Sets the inner @p color of the geometrical annotation.
1119 */
1120 void setGeometricalInnerColor(const QColor &color);
1121
1122 /**
1123 * Returns the inner color of the geometrical annotation.
1124 */
1125 QColor geometricalInnerColor() const;
1126
1127 /**
1128 * Returns the sub type of the geometrical annotation.
1129 */
1130 SubType subType() const override;
1131
1132 /**
1133 * Stores the geometrical annotation as xml in @p document
1134 * under the given parent @p node.
1135 */
1136 void store(QDomNode &node, QDomDocument &document) const override;
1137
1138private:
1139 Q_DECLARE_PRIVATE(GeomAnnotation)
1140 Q_DISABLE_COPY(GeomAnnotation)
1141};
1142
1143class OKULARCORE_EXPORT HighlightAnnotation : public Annotation
1144{
1145public:
1146 /**
1147 * Describes the highlighting style of the annotation.
1148 */
1149 enum HighlightType {
1150 Highlight, ///< Highlights the text
1151 Squiggly, ///< Squiggles the text
1152 Underline, ///< Underlines the text
1153 StrikeOut ///< Strikes out the text
1154 };
1155
1156 /**
1157 * Creates a new highlight annotation.
1158 */
1159 HighlightAnnotation();
1160
1161 /**
1162 * Creates a new highlight annotation from the xml @p description
1163 */
1164 explicit HighlightAnnotation(const QDomNode &description);
1165
1166 /**
1167 * Destroys the highlight annotation.
1168 */
1169 ~HighlightAnnotation() override;
1170
1171 /**
1172 * Sets the @p type of the highlight annotation.
1173 * @see HighlightType
1174 */
1175 void setHighlightType(HighlightType type);
1176
1177 /**
1178 * Returns the type of the highlight annotation.
1179 */
1180 HighlightType highlightType() const;
1181
1182 /**
1183 * @short Describes a highlight quad of a text markup annotation.
1184 *
1185 * The Quad is a closed path of 4 NormalizedPoints.
1186 * Another set of 4 NormalizedPoints can be generated with transform(),
1187 * e. g. to get highlighting coordinates on a rotated PageViewItem.
1188 * Additionally, Quad stores some geometry related style attributes.
1189 *
1190 * To enable correct rendering of the annotation,
1191 * the points 0 and 1 must describe the bottom edge of the quad
1192 * (relative to the text orientation).
1193 *
1194 * @see NormalizedPoint
1195 */
1196 class OKULARCORE_EXPORT Quad
1197 {
1198 public:
1199 /**
1200 * Creates a new quad.
1201 */
1202 Quad();
1203
1204 /**
1205 * Destroys the quad.
1206 */
1207 ~Quad();
1208
1209 Quad(const Quad &other);
1210 Quad &operator=(const Quad &other);
1211
1212 /**
1213 * Sets the normalized @p point at @p index.
1214 *
1215 * @p index must be between 0 and 3.
1216 */
1217 void setPoint(const NormalizedPoint &point, int index);
1218
1219 /**
1220 * Returns the normalized point at @p index.
1221 *
1222 * @p index must be between 0 and 3.
1223 */
1224 NormalizedPoint point(int index) const;
1225
1226 /**
1227 * Returns the transformed (e.g. rotated) normalized point at @p index.
1228 *
1229 * @p index must be between 0 and 3.
1230 */
1231 NormalizedPoint transformedPoint(int index) const;
1232
1233 /**
1234 * Sets whether a cap should be used at the start.
1235 */
1236 void setCapStart(bool value);
1237
1238 /**
1239 * Returns whether a cap should be used at the start.
1240 */
1241 bool capStart() const;
1242
1243 /**
1244 * Sets whether a cap should be used at the end.
1245 */
1246 void setCapEnd(bool value);
1247
1248 /**
1249 * Returns whether a cap should be used at the end.
1250 */
1251 bool capEnd() const;
1252
1253 /**
1254 * Sets the @p width of the drawing feather.
1255 */
1256 void setFeather(double width);
1257
1258 /**
1259 * Returns the width of the drawing feather.
1260 */
1261 double feather() const;
1262
1263 /**
1264 * Transforms the quad coordinates with the transformation defined
1265 * by @p matrix.
1266 *
1267 * The transformed coordinates will be accessible with transformedPoint().
1268 * The coordinates returned by point() are not affected.
1269 */
1270 void transform(const QTransform &matrix);
1271
1272 private:
1273 class Private;
1274 Private *const d;
1275 };
1276
1277 /**
1278 * Returns a reference to the quad list of the highlight annotation.
1279 */
1280 QList<Quad> &highlightQuads();
1281
1282 /**
1283 * Returns a const reference to the quad list of the highlight annotation.
1284 * @since 20.12
1285 */
1286 const QList<Quad> &highlightQuads() const;
1287
1288 /**
1289 * Returns the sub type of the highlight annotation.
1290 */
1291 SubType subType() const override;
1292
1293 /**
1294 * Stores the highlight annotation as xml in @p document
1295 * under the given parent @p node.
1296 */
1297 void store(QDomNode &node, QDomDocument &document) const override;
1298
1299private:
1300 Q_DECLARE_PRIVATE(HighlightAnnotation)
1301 Q_DISABLE_COPY(HighlightAnnotation)
1302};
1303
1304class OKULARCORE_EXPORT StampAnnotation : public Annotation
1305{
1306public:
1307 /**
1308 * Creates a new stamp annotation.
1309 */
1310 StampAnnotation();
1311
1312 /**
1313 * Creates a new stamp annotation from the xml @p description
1314 */
1315 explicit StampAnnotation(const QDomNode &description);
1316
1317 /**
1318 * Destroys the stamp annotation.
1319 */
1320 ~StampAnnotation() override;
1321
1322 /**
1323 * Sets the @p name of the icon for the stamp annotation.
1324 */
1325 void setStampIconName(const QString &name);
1326
1327 /**
1328 * Returns the name of the icon.
1329 */
1330 QString stampIconName() const;
1331
1332 /**
1333 * Returns the sub type of the stamp annotation.
1334 */
1335 SubType subType() const override;
1336
1337 /**
1338 * Stores the stamp annotation as xml in @p document
1339 * under the given parent @p node.
1340 */
1341 void store(QDomNode &node, QDomDocument &document) const override;
1342
1343private:
1344 Q_DECLARE_PRIVATE(StampAnnotation)
1345 Q_DISABLE_COPY(StampAnnotation)
1346};
1347
1348#if HAVE_NEW_SIGNATURE_API
1349/**
1350 * \since 24.12
1351 */
1352class OKULARCORE_EXPORT SignatureAnnotation : public Annotation
1353{
1354public:
1355 /**
1356 * Creates a new signature annotation.
1357 */
1358 SignatureAnnotation();
1359
1360 /**
1361 * Destroys the signature annotation.
1362 */
1363 ~SignatureAnnotation() override;
1364
1365 QString text() const;
1366 void setText(const QString &text);
1367
1368 QString leftText() const;
1369 void setLeftText(const QString &text);
1370
1371 QString imagePath() const;
1372 void setImagePath(const QString &imagePath);
1373
1374 QString fieldPartialName() const;
1375 void setFieldPartialName(const QString &fieldPartialName);
1376
1377 int page() const;
1378 void setPage(int page);
1379
1380 void setSignFunction(std::function<SigningResult(const Okular::NewSignatureData &, const QString &)> func);
1381
1382 SigningResult sign(const Okular::NewSignatureData &data, const QString &fileName);
1383
1384 /**
1385 * Returns the sub type of the stamp annotation.
1386 */
1387 SubType subType() const override;
1388
1389 /**
1390 * Stores the stamp annotation as xml in @p document
1391 * under the given parent @p node.
1392 */
1393 void store(QDomNode &node, QDomDocument &document) const override;
1394
1395private:
1396 Q_DECLARE_PRIVATE(SignatureAnnotation)
1397 Q_DISABLE_COPY(SignatureAnnotation)
1398};
1399#endif
1400
1401class OKULARCORE_EXPORT InkAnnotation : public Annotation
1402{
1403public:
1404 /**
1405 * Creates a new ink annotation.
1406 */
1407 InkAnnotation();
1408
1409 /**
1410 * Creates a new ink annotation from the xml @p description
1411 */
1412 explicit InkAnnotation(const QDomNode &description);
1413
1414 /**
1415 * Destroys the ink annotation.
1416 */
1417 ~InkAnnotation() override;
1418
1419 /**
1420 * Sets the @p paths of points for the ink annotation.
1421 *
1422 * @since 22.08
1423 */
1424 void setInkPaths(const QList<QList<NormalizedPoint>> &paths);
1425
1426 /**
1427 * Returns the paths of points of the ink annotation.
1428 *
1429 * @since 22.08
1430 */
1431 QList<QList<NormalizedPoint>> inkPaths() const;
1432
1433 /**
1434 * Returns the paths of transformed (e.g. rotated) points of
1435 * the ink annotation.
1436 *
1437 * @since 22.08
1438 */
1439 QList<QList<NormalizedPoint>> transformedInkPaths() const;
1440
1441 /**
1442 * Returns the sub type of the ink annotation.
1443 */
1444 SubType subType() const override;
1445
1446 /**
1447 * Stores the ink annotation as xml in @p document
1448 * under the given parent @p node.
1449 */
1450 void store(QDomNode &node, QDomDocument &document) const override;
1451
1452private:
1453 Q_DECLARE_PRIVATE(InkAnnotation)
1454 Q_DISABLE_COPY(InkAnnotation)
1455};
1456
1457class OKULARCORE_EXPORT CaretAnnotation : public Annotation
1458{
1459public:
1460 /**
1461 * Describes the highlighting style of the annotation.
1462 */
1463 enum CaretSymbol {
1464 None, ///< No symbol to be associated with the text
1465 P ///< A 'paragraph' symbol
1466 };
1467
1468 /**
1469 * Creates a new caret annotation.
1470 */
1471 CaretAnnotation();
1472
1473 /**
1474 * Creates a new caret annotation from the xml @p description
1475 */
1476 explicit CaretAnnotation(const QDomNode &description);
1477
1478 /**
1479 * Destroys the caret annotation.
1480 */
1481 ~CaretAnnotation() override;
1482
1483 /**
1484 * Sets the @p symbol for the caret annotation.
1485 */
1486 void setCaretSymbol(CaretAnnotation::CaretSymbol symbol);
1487
1488 /**
1489 * Returns the symbol of the annotation.
1490 */
1491 CaretAnnotation::CaretSymbol caretSymbol() const;
1492
1493 /**
1494 * Returns the sub type of the caret annotation.
1495 */
1496 SubType subType() const override;
1497
1498 /**
1499 * Stores the caret annotation as xml in @p document
1500 * under the given parent @p node.
1501 */
1502 void store(QDomNode &node, QDomDocument &document) const override;
1503
1504private:
1505 Q_DECLARE_PRIVATE(CaretAnnotation)
1506 Q_DISABLE_COPY(CaretAnnotation)
1507};
1508
1509class OKULARCORE_EXPORT FileAttachmentAnnotation : public Annotation
1510{
1511public:
1512 /**
1513 * Creates a new file attachment annotation.
1514 */
1515 FileAttachmentAnnotation();
1516 /**
1517 * Creates a new file attachment annotation from the xml @p description
1518 */
1519 explicit FileAttachmentAnnotation(const QDomNode &description);
1520 /**
1521 * Destroys the file attachment annotation.
1522 */
1523 ~FileAttachmentAnnotation() override;
1524
1525 /**
1526 * Gets the name of the icon.
1527 */
1528 QString fileIconName() const;
1529
1530 /**
1531 * Sets the @p iconName of the icon for the file attachment annotation.
1532 */
1533 void setFileIconName(const QString &iconName);
1534
1535 /**
1536 * Gets the embedded file object.
1537 */
1538 EmbeddedFile *embeddedFile() const;
1539
1540 /**
1541 * Sets the @p ef representing the embedded file of the file
1542 * attachment annotation.
1543 */
1544 void setEmbeddedFile(EmbeddedFile *ef);
1545
1546 /**
1547 * Returns the sub type of the file attachment annotation.
1548 */
1549 SubType subType() const override;
1550
1551 /**
1552 * Stores the file attachment annotation as xml in @p document
1553 * under the given parent @p node.
1554 */
1555 void store(QDomNode &node, QDomDocument &document) const override;
1556
1557private:
1558 Q_DECLARE_PRIVATE(FileAttachmentAnnotation)
1559 Q_DISABLE_COPY(FileAttachmentAnnotation)
1560};
1561
1562/**
1563 * \short Sound annotation.
1564 *
1565 * The sound annotation represents a sound to be played when activated.
1566 *
1567 * @since 0.7 (KDE 4.1)
1568 */
1569class OKULARCORE_EXPORT SoundAnnotation : public Annotation
1570{
1571public:
1572 /**
1573 * Creates a new sound annotation.
1574 */
1576 /**
1577 * Creates a new sound annotation from the xml @p description
1578 */
1579 explicit SoundAnnotation(const QDomNode &description);
1580 /**
1581 * Destroys the sound annotation.
1582 */
1583 ~SoundAnnotation() override;
1584
1585 /**
1586 * Gets the name of the icon.
1587 */
1588 QString soundIconName() const;
1589
1590 /**
1591 * Sets the @p iconName of the icon for the sound annotation.
1592 */
1593 void setSoundIconName(const QString &iconName);
1594
1595 /**
1596 * Gets the sound object.
1597 */
1598 Sound *sound() const;
1599
1600 /**
1601 * Sets the @p s representing the sound of the file
1602 * attachment annotation.
1603 */
1604 void setSound(Sound *s);
1605
1606 /**
1607 * Returns the sub type of the sound annotation.
1608 */
1609 SubType subType() const override;
1610
1611 /**
1612 * Stores the sound annotation as xml in @p document
1613 * under the given parent @p node.
1614 */
1615 void store(QDomNode &node, QDomDocument &document) const override;
1616
1617private:
1618 Q_DECLARE_PRIVATE(SoundAnnotation)
1619 Q_DISABLE_COPY(SoundAnnotation)
1620};
1621
1622/**
1623 * \short Movie annotation.
1624 *
1625 * The movie annotation represents a movie to be played when activated.
1626 *
1627 * @since 0.8 (KDE 4.2)
1628 */
1629class OKULARCORE_EXPORT MovieAnnotation : public Annotation
1630{
1631public:
1632 /**
1633 * Creates a new movie annotation.
1634 */
1636 /**
1637 * Creates a new movie annotation from the xml @p description
1638 */
1639 explicit MovieAnnotation(const QDomNode &description);
1640 /**
1641 * Destroys the movie annotation.
1642 */
1643 ~MovieAnnotation() override;
1644 /**
1645 * Gets the movie object.
1646 */
1647 Movie *movie() const;
1648 /**
1649 * Sets the new @p movie object.
1650 */
1651 void setMovie(Movie *movie);
1652 /**
1653 * Returns the sub type of the movie annotation.
1654 */
1655 SubType subType() const override;
1656 /**
1657 * Stores the movie annotation as xml in @p document
1658 * under the given @p parentNode.
1659 */
1660 void store(QDomNode &parentNode, QDomDocument &document) const override;
1661
1662private:
1663 Q_DECLARE_PRIVATE(MovieAnnotation)
1664 Q_DISABLE_COPY(MovieAnnotation)
1665};
1666
1667/**
1668 * \short Screen annotation.
1669 *
1670 * The screen annotation specifies a region of a page upon which media clips
1671 * may be played. It also serves as an object from which actions can be triggered.
1672 *
1673 * @since 0.16 (KDE 4.10)
1674 */
1675class OKULARCORE_EXPORT ScreenAnnotation : public Annotation
1676{
1677public:
1678 /**
1679 * Creates a new screen annotation.
1680 */
1682
1683 /**
1684 * Creates a new screen annotation from the xml @p description
1685 */
1686 explicit ScreenAnnotation(const QDomNode &description);
1687
1688 /**
1689 * Destroys the screen annotation.
1690 */
1691 ~ScreenAnnotation() override;
1692
1693 /**
1694 * Returns the sub type of the screen annotation.
1695 */
1696 SubType subType() const override;
1697
1698 /**
1699 * Stores the screen annotation as xml in @p document
1700 * under the given @p parentNode.
1701 */
1702 void store(QDomNode &parentNode, QDomDocument &document) const override;
1703
1704 /**
1705 * Sets the @p action that is executed when the annotation is triggered.
1706 *
1707 * @since 0.16 (KDE 4.10)
1708 */
1709 void setAction(Action *action);
1710
1711 /**
1712 * Returns the action that is executed when the annotation is triggered or @c 0 if not action has been defined.
1713 *
1714 * @since 0.16 (KDE 4.10)
1715 */
1716 Action *action() const;
1717
1718 /**
1719 * Sets the additional @p action of the given @p type.
1720 *
1721 * @since 0.16 (KDE 4.10)
1722 */
1723 void setAdditionalAction(AdditionalActionType type, Action *action);
1724
1725 /**
1726 * Returns the additional action of the given @p type or @c 0 if no action has been defined.
1727 *
1728 * @since 0.16 (KDE 4.10)
1729 */
1730 Action *additionalAction(AdditionalActionType type) const;
1731
1732private:
1733 Q_DECLARE_PRIVATE(ScreenAnnotation)
1734 Q_DISABLE_COPY(ScreenAnnotation)
1735};
1736
1737/**
1738 * \short Widget annotation.
1739 *
1740 * The widget annotation represents a widget on a page.
1741 *
1742 * @since 0.16 (KDE 4.10)
1743 */
1744class OKULARCORE_EXPORT WidgetAnnotation : public Annotation
1745{
1746public:
1747 /**
1748 * Creates a new widget annotation.
1749 */
1751
1752 /**
1753 * Creates a new widget annotation from the xml @p description
1754 */
1755 explicit WidgetAnnotation(const QDomNode &description);
1756
1757 /**
1758 * Destroys the widget annotation.
1759 */
1760 ~WidgetAnnotation() override;
1761
1762 /**
1763 * Returns the sub type of the widget annotation.
1764 */
1765 SubType subType() const override;
1766
1767 /**
1768 * Stores the widget annotation as xml in @p document
1769 * under the given @p parentNode.
1770 */
1771 void store(QDomNode &parentNode, QDomDocument &document) const override;
1772
1773 /**
1774 * Sets the additional @p action of the given @p type.
1775 *
1776 * @since 0.16 (KDE 4.10)
1777 */
1778 void setAdditionalAction(AdditionalActionType type, Action *action);
1779
1780 /**
1781 * Returns the additional action of the given @p type or @c 0 if no action has been defined.
1782 *
1783 * @since 0.16 (KDE 4.10)
1784 */
1785 Action *additionalAction(AdditionalActionType type) const;
1786
1787private:
1788 Q_DECLARE_PRIVATE(WidgetAnnotation)
1789 Q_DISABLE_COPY(WidgetAnnotation)
1790};
1791
1792/**
1793 * \short RichMedia annotation.
1794 *
1795 * The rich media annotation represents an video or sound on a page.
1796 *
1797 * @since 1.0
1798 */
1799class OKULARCORE_EXPORT RichMediaAnnotation : public Annotation
1800{
1801public:
1802 /**
1803 * Creates a new rich media annotation.
1804 */
1806
1807 /**
1808 * Creates a new rich media annotation from the xml @p description
1809 */
1810 explicit RichMediaAnnotation(const QDomNode &description);
1811
1812 /**
1813 * Destroys the rich media annotation.
1814 */
1815 ~RichMediaAnnotation() override;
1816
1817 /**
1818 * Returns the sub type of the rich media annotation.
1819 */
1820 SubType subType() const override;
1821
1822 /**
1823 * Stores the rich media annotation as xml in @p document
1824 * under the given @p parentNode.
1825 */
1826 void store(QDomNode &parentNode, QDomDocument &document) const override;
1827
1828 /**
1829 * Gets the movie object.
1830 */
1831 Movie *movie() const;
1832
1833 /**
1834 * Sets the new @p movie object.
1835 */
1836 void setMovie(Movie *movie);
1837
1838 /**
1839 * Sets the @p embeddedFile representing the embedded file.
1840 */
1841 void setEmbeddedFile(EmbeddedFile *embeddedFile);
1842
1843 /**
1844 * Gets the embedded file object.
1845 */
1846 EmbeddedFile *embeddedFile() const;
1847
1848private:
1849 Q_DECLARE_PRIVATE(RichMediaAnnotation)
1850 Q_DISABLE_COPY(RichMediaAnnotation)
1851};
1852
1853}
1854
1855#endif
Encapsulates data that describes an action.
Definition action.h:41
This class describes the object rectangle for an annotation.
Definition area.h:556
Native annotation interface.
virtual bool supports(Capability capability) const =0
Query for the supported capabilities.
virtual void notifyRemoval(Annotation *annotation, int page)=0
Called when an existing annotation at a given page is removed.
virtual void notifyAddition(Annotation *annotation, int page)=0
Called when a new annotation is added to a page.
virtual void notifyModification(const Annotation *annotation, int page, bool appearanceChanged)=0
Called after an existing annotation at a given page is modified.
@ Modification
Generator can edit native annotations.
@ Addition
Generator can create native annotations.
Helper class for (recursive) annotation retrieval/storage.
Definition annotations.h:53
The Revision class contains all information about the revision of the annotation.
The Style class contains all information about style of the annotation.
The Window class contains all information about the popup window of the annotation that is used to ed...
Annotation struct holds properties shared by all annotations.
Definition annotations.h:99
RevisionType
Describes the type of revision information.
Flag
Describes additional properties of an annotation.
LineEffect
Describes possible line effects for.
RevisionScope
Describes the scope of revision information.
AdditionalActionType
Describes the type of additional actions.
@ FocusIn
Performed when the annotation receives the input focus.
@ PageClosing
Performed when the page containing the annotation is closed.
@ MousePressed
Performed when the mouse button is pressed inside the annotation's active area.
@ PageOpening
Performed when the page containing the annotation is opened.
@ MouseReleased
Performed when the mouse button is released inside the annotation's active area.
@ CursorEntering
Performed when the cursor enters the annotation's active area.
@ FocusOut
Performed when the annotation loses the input focus.
@ CursorLeaving
Performed when the cursor exists the annotation's active area.
LineStyle
Describes possible line styles for.
SubType
Describes the type of annotation as defined in PDF standard.
virtual SubType subType() const =0
Returns the sub type of the annotation.
The Document.
Definition document.h:192
An embedded file into the document.
Definition document.h:1555
Describes a highlight quad of a text markup annotation.
Movie annotation.
Contains information about a movie object.
Definition movie.h:26
Data needed to create a new signature.
Definition document.h:1638
NormalizedPoint is a helper class which stores the coordinates of a normalized point.
Definition area.h:117
A NormalizedRect is a rectangle which can be defined by two NormalizedPoints.
Definition area.h:189
An area with normalized coordinates that contains a reference to an object.
Definition area.h:458
Collector for all the data belonging to a page.
Definition page.h:48
RichMedia annotation.
Screen annotation.
Sound annotation.
Contains information about a sound object.
Definition sound.h:24
Widget annotation.
global.h
Definition action.h:17
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:50 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.