1 /***************************************************************************
2 * Copyright (C) 2005 by Tobias Koenig <tokoe@kde.org> *
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>
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
28 * Describes the type of transition effect.
46 * Describes the alignment that is applied to the @ref Type
47 * of transition effect.
55 * Describes the direction that is applied to the @ref Type
56 * of transition effect.
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
);
71 * Creates a new page transition from an @p other.
73 PageTransition( const PageTransition
&other
);
74 PageTransition
& operator=( const PageTransition
&other
);
77 * Destroys the page transition.
82 * Returns the type of the transition.
87 * Returns the duration of the transition in seconds.
92 * Returns the alignment of the transition.
94 Alignment
alignment() const;
97 * Returns the direction of motion of the transition.
99 Direction
direction() const;
102 * Returns the angle of rotation of the transition.
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
);