Okular

pagetransition.h
1/*
2 SPDX-FileCopyrightText: 2005 Tobias Koenig <tokoe@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#ifndef _OKULAR_PAGETRANSITION_H_
8#define _OKULAR_PAGETRANSITION_H_
9
10#include "okularcore_export.h"
11
12namespace Okular
13{
14/**
15 * @short Information object for the transition effect of a page.
16 *
17 * This class encapsulates the information about the effect of
18 * a page transition. It supports mainly the transition effects as
19 * defined in PDF specification 1.6.
20 */
21class OKULARCORE_EXPORT PageTransition
22{
23public:
24 /**
25 * Describes the type of transition effect.
26 */
27 enum Type { Replace, Split, Blinds, Box, Wipe, Dissolve, Glitter, Fly, Push, Cover, Uncover, Fade };
28
29 /**
30 * Describes the alignment that is applied to the @ref Type
31 * of transition effect.
32 */
33 enum Alignment { Horizontal, Vertical };
34
35 /**
36 * Describes the direction that is applied to the @ref Type
37 * of transition effect.
38 */
39 enum Direction { Inward, Outward };
40
41 /**
42 * Creates a new page transition of the given @p type.
43 *
44 * If no type is given, the normal @ref Replace transition is used.
45 */
46 explicit PageTransition(Type type = Replace);
47
48 /**
49 * Creates a new page transition from an @p other.
50 */
51 PageTransition(const PageTransition &other);
52 PageTransition &operator=(const PageTransition &other);
53
54 /**
55 * Destroys the page transition.
56 */
58
59 /**
60 * Returns the type of the transition.
61 */
62 Type type() const;
63
64 /**
65 * Returns the duration of the transition in seconds.
66 */
67 double duration() const;
68
69 /**
70 * Returns the alignment of the transition.
71 */
72 Alignment alignment() const;
73
74 /**
75 * Returns the direction of motion of the transition.
76 */
77 Direction direction() const;
78
79 /**
80 * Returns the angle of rotation of the transition.
81 */
82 int angle() const;
83
84 /**
85 * Returns the starting or ending scale (Only if type == 'Fly').
86 */
87 double scale() const;
88
89 /**
90 * Returns true if the area to be flown is rectangular and opaque (Only if type == 'Fly').
91 */
92 bool isRectangular() const;
93
94 /**
95 * Sets the @p type of the transition (@ref Type).
96 */
97 void setType(Type type);
98
99 /**
100 * Sets the @p duration in seconds for the transition.
101 */
102 void setDuration(double duration);
103
104 /**
105 * Sets the @p alignment of the transition (@ref Alignment).
106 */
107 void setAlignment(Alignment alignment);
108
109 /**
110 * Sets the @p direction of the transition (@see Direction).
111 */
112 void setDirection(Direction direction);
113
114 /**
115 * Sets the moving @p angle of the transition.
116 */
117 void setAngle(int angle);
118
119 /**
120 * Sets the starting or ending scale of the transition (Only if type == 'Fly').
121 */
122 void setScale(double scale);
123
124 /**
125 * Sets whether the area to be flown is rectangular and opaque (Only if type == 'Fly').
126 */
127 void setIsRectangular(bool rectangular);
128
129private:
130 class Private;
131 Private *const d;
132};
133
134}
135
136#endif
Information object for the transition effect of a page.
Type
Describes the type of transition effect.
Direction
Describes the direction that is applied to the Type of transition effect.
Alignment
Describes the alignment that is applied to the Type of transition effect.
global.h
Definition action.h:17
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:17:35 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.