compile
[kdegraphics.git] / okular / core / pagetransition.cpp
blobd57106dda5facadcec21a9d2d824129a2d1e4a06
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 // local includes
11 #include "pagetransition.h"
13 using namespace Okular;
15 /** class Okular::PageTransition **/
17 class PageTransition::Private
19 public:
20 Private( Type type )
21 : m_type( type ),
22 m_duration( 1 ),
23 m_alignment( Horizontal ),
24 m_direction( Inward ),
25 m_angle( 0 ),
26 m_scale( 1.0 ),
27 m_rectangular( false )
31 Type m_type;
32 int m_duration;
33 Alignment m_alignment;
34 Direction m_direction;
35 int m_angle;
36 double m_scale;
37 bool m_rectangular;
40 PageTransition::PageTransition( Type type )
41 : d( new Private( type ) )
45 PageTransition::PageTransition( const PageTransition &other )
46 : d( new Private( *other.d ) )
50 PageTransition& PageTransition::operator=( const PageTransition &other )
52 if ( this == &other )
53 return *this;
55 *d = *other.d;
57 return *this;
60 PageTransition::~PageTransition()
62 delete d;
65 PageTransition::Type PageTransition::type() const
67 return d->m_type;
70 int PageTransition::duration() const
72 return d->m_duration;
75 PageTransition::Alignment PageTransition::alignment() const
77 return d->m_alignment;
80 PageTransition::Direction PageTransition::direction() const
82 return d->m_direction;
85 int PageTransition::angle() const
87 return d->m_angle;
90 double PageTransition::scale() const
92 return d->m_scale;
95 bool PageTransition::isRectangular() const
97 return d->m_rectangular;
100 void PageTransition::setType( Type type )
102 d->m_type = type;
105 void PageTransition::setDuration( int duration )
107 d->m_duration = duration;
110 void PageTransition::setAlignment( Alignment alignment )
112 d->m_alignment = alignment;
115 void PageTransition::setDirection( Direction direction )
117 d->m_direction = direction;
120 void PageTransition::setAngle( int angle )
122 d->m_angle = angle;
125 void PageTransition::setScale( double scale )
127 d->m_scale = scale;
130 void PageTransition::setIsRectangular( bool rectangular )
132 d->m_rectangular = rectangular;