compile
[kdegraphics.git] / okular / core / pagetransition.h
blob11927820753e222a60ed589953f489c4a1296987
1 /***************************************************************************
2 * Copyright (C) 2005 by Tobias Koenig <tokoe@kde.org> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 ***************************************************************************/
10 #ifndef _OKULAR_PAGETRANSITION_H_
11 #define _OKULAR_PAGETRANSITION_H_
13 #include <okular/core/okular_export.h>
15 namespace Okular {
17 /**
18 * @short Information object for the transition effect of a page.
20 * This class encapsulates the information about the effect of
21 * a page transition. It supports mainly the transition effects as
22 * defined in PDF specification 1.6.
24 class OKULAR_EXPORT PageTransition
26 public:
27 /**
28 * Describes the type of transition effect.
30 enum Type {
31 Replace,
32 Split,
33 Blinds,
34 Box,
35 Wipe,
36 Dissolve,
37 Glitter,
38 Fly,
39 Push,
40 Cover,
41 Uncover,
42 Fade
45 /**
46 * Describes the alignment that is applied to the @ref Type
47 * of transition effect.
49 enum Alignment {
50 Horizontal,
51 Vertical
54 /**
55 * Describes the direction that is applied to the @ref Type
56 * of transition effect.
58 enum Direction {
59 Inward,
60 Outward
63 /**
64 * Creates a new page transition of the given @p type.
66 * If no type is given, the normal @ref Replace transition is used.
68 PageTransition( Type type = Replace );
70 /**
71 * Creates a new page transition from an @p other.
73 PageTransition( const PageTransition &other );
74 PageTransition& operator=( const PageTransition &other );
76 /**
77 * Destroys the page transition.
79 ~PageTransition();
81 /**
82 * Returns the type of the transition.
84 Type type() const;
86 /**
87 * Returns the duration of the transition in seconds.
89 int duration() const;
91 /**
92 * Returns the alignment of the transition.
94 Alignment alignment() const;
96 /**
97 * Returns the direction of motion of the transition.
99 Direction direction() const;
102 * Returns the angle of rotation of the transition.
104 int angle() const;
107 * Returns the starting or ending scale (Only if type == 'Fly').
109 double scale() const;
112 * Returns true if the area to be flown is rectangular and opaque (Only if type == 'Fly').
114 bool isRectangular() const;
117 * Sets the @p type of the transition (@ref Type).
119 void setType( Type type );
122 * Sets the @p duration in seconds for the transition.
124 void setDuration( int duration );
127 * Sets the @p alignment of the transition (@ref Alignment).
129 void setAlignment( Alignment alignment );
132 * Sets the @p direction of the transition (@see Direction).
134 void setDirection( Direction direction );
137 * Sets the moving @p angle of the transition.
139 void setAngle( int angle );
142 * Sets the starting or ending scale of the transition (Only if type == 'Fly').
144 void setScale( double scale );
147 * Sets whether the area to be flown is rectangular and opaque (Only if type == 'Fly').
149 void setIsRectangular( bool rectangular );
151 private:
152 class Private;
153 Private* const d;
158 #endif