okular
pagetransition.cpp
Go to the documentation of this file.00001 /*************************************************************************** 00002 * Copyright (C) 2005 by Tobias Koenig <tokoe@kde.org> * 00003 * * 00004 * This program is free software; you can redistribute it and/or modify * 00005 * it under the terms of the GNU General Public License as published by * 00006 * the Free Software Foundation; either version 2 of the License, or * 00007 * (at your option) any later version. * 00008 ***************************************************************************/ 00009 00010 // local includes 00011 #include "pagetransition.h" 00012 00013 using namespace Okular; 00014 00017 class PageTransition::Private 00018 { 00019 public: 00020 Private( Type type ) 00021 : m_type( type ), 00022 m_duration( 1 ), 00023 m_alignment( Horizontal ), 00024 m_direction( Inward ), 00025 m_angle( 0 ), 00026 m_scale( 1.0 ), 00027 m_rectangular( false ) 00028 { 00029 } 00030 00031 Type m_type; 00032 int m_duration; 00033 Alignment m_alignment; 00034 Direction m_direction; 00035 int m_angle; 00036 double m_scale; 00037 bool m_rectangular; 00038 }; 00039 00040 PageTransition::PageTransition( Type type ) 00041 : d( new Private( type ) ) 00042 { 00043 } 00044 00045 PageTransition::PageTransition( const PageTransition &other ) 00046 : d( new Private( *other.d ) ) 00047 { 00048 } 00049 00050 PageTransition& PageTransition::operator=( const PageTransition &other ) 00051 { 00052 if ( this == &other ) 00053 return *this; 00054 00055 *d = *other.d; 00056 00057 return *this; 00058 } 00059 00060 PageTransition::~PageTransition() 00061 { 00062 delete d; 00063 } 00064 00065 PageTransition::Type PageTransition::type() const 00066 { 00067 return d->m_type; 00068 } 00069 00070 int PageTransition::duration() const 00071 { 00072 return d->m_duration; 00073 } 00074 00075 PageTransition::Alignment PageTransition::alignment() const 00076 { 00077 return d->m_alignment; 00078 } 00079 00080 PageTransition::Direction PageTransition::direction() const 00081 { 00082 return d->m_direction; 00083 } 00084 00085 int PageTransition::angle() const 00086 { 00087 return d->m_angle; 00088 } 00089 00090 double PageTransition::scale() const 00091 { 00092 return d->m_scale; 00093 } 00094 00095 bool PageTransition::isRectangular() const 00096 { 00097 return d->m_rectangular; 00098 } 00099 00100 void PageTransition::setType( Type type ) 00101 { 00102 d->m_type = type; 00103 } 00104 00105 void PageTransition::setDuration( int duration ) 00106 { 00107 d->m_duration = duration; 00108 } 00109 00110 void PageTransition::setAlignment( Alignment alignment ) 00111 { 00112 d->m_alignment = alignment; 00113 } 00114 00115 void PageTransition::setDirection( Direction direction ) 00116 { 00117 d->m_direction = direction; 00118 } 00119 00120 void PageTransition::setAngle( int angle ) 00121 { 00122 d->m_angle = angle; 00123 } 00124 00125 void PageTransition::setScale( double scale ) 00126 { 00127 d->m_scale = scale; 00128 } 00129 00130 void PageTransition::setIsRectangular( bool rectangular ) 00131 { 00132 d->m_rectangular = rectangular; 00133 } 00134
KDE 4.0 API Reference