summaryrefslogtreecommitdiffstats
path: root/kpdf/core/pagetransition.h
blob: 25280437e179a668234951d8e5cc8ac8a8f94738 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/***************************************************************************
 *   Copyright (C) 2005 by Tobias Koenig <[email protected]>                   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 ***************************************************************************/

#ifndef _KPDF_PAGE_TRANSITION_H_
#define _KPDF_PAGE_TRANSITION_H_

/**
 * @short Information object for the transition effect of a page.
 */
class KPDFPageTransition
{
    public:
        enum Type {
            Replace,
            Split,
            Blinds,
            Box,
            Wipe,
            Dissolve,
            Glitter,
            Fly,
            Push,
            Cover,
            Uncover,
            Fade
        };

        enum Alignment {
            Horizontal,
            Vertical
        };

        enum Direction {
            Inward,
            Outward
        };

        KPDFPageTransition( Type type = Replace );
        ~KPDFPageTransition();

        // Get type of the transition.
        inline Type type() const { return m_type; }

        // Get duration of the transition in seconds.
        inline int duration() const { return m_duration; }

        // Get dimension in which the transition effect occurs.
        inline Alignment tqalignment() const { return m_tqalignment; }

        // Get direction of motion of the transition effect.
        inline Direction direction() const { return m_direction; }

        // Get direction in which the transition effect moves.
        inline int angle() const { return m_angle; }

        // Get starting or ending scale. (Fly only)
        inline double scale() const { return m_scale; }

        // Returns true if the area to be flown is rectangular and opaque.  (Fly only)
        inline bool isRectangular() const { return m_rectangular; }

        inline void setType( Type type ) { m_type = type; }
        inline void setDuration( int duration ) { m_duration = duration; }
        inline void tqsetAlignment( Alignment tqalignment ) { m_tqalignment = tqalignment; }
        inline void setDirection( Direction direction ) { m_direction = direction; }
        inline void setAngle( int angle ) { m_angle = angle; }
        inline void setScale( double scale ) { m_scale = scale; }
        inline void setIsRectangular( bool rectangular ) { m_rectangular = rectangular; }

    private:
        Type m_type;
        int m_duration;
        Alignment m_tqalignment;
        Direction m_direction;
        int m_angle;
        double m_scale;
        bool m_rectangular;
};

#endif