• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegraphics API Reference
  • KDE Home
  • Contact Us
 

okular

  • sources
  • kde-4.12
  • kdegraphics
  • okular
  • core
pagetransition.cpp
Go to the documentation of this file.
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  ***************************************************************************/
9 
10 // local includes
11 #include "pagetransition.h"
12 
13 using namespace Okular;
14 
17 class PageTransition::Private
18 {
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 )
28  {
29  }
30 
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;
38 };
39 
40 PageTransition::PageTransition( Type type )
41  : d( new Private( type ) )
42 {
43 }
44 
45 PageTransition::PageTransition( const PageTransition &other )
46  : d( new Private( *other.d ) )
47 {
48 }
49 
50 PageTransition& PageTransition::operator=( const PageTransition &other )
51 {
52  if ( this == &other )
53  return *this;
54 
55  *d = *other.d;
56 
57  return *this;
58 }
59 
60 PageTransition::~PageTransition()
61 {
62  delete d;
63 }
64 
65 PageTransition::Type PageTransition::type() const
66 {
67  return d->m_type;
68 }
69 
70 int PageTransition::duration() const
71 {
72  return d->m_duration;
73 }
74 
75 PageTransition::Alignment PageTransition::alignment() const
76 {
77  return d->m_alignment;
78 }
79 
80 PageTransition::Direction PageTransition::direction() const
81 {
82  return d->m_direction;
83 }
84 
85 int PageTransition::angle() const
86 {
87  return d->m_angle;
88 }
89 
90 double PageTransition::scale() const
91 {
92  return d->m_scale;
93 }
94 
95 bool PageTransition::isRectangular() const
96 {
97  return d->m_rectangular;
98 }
99 
100 void PageTransition::setType( Type type )
101 {
102  d->m_type = type;
103 }
104 
105 void PageTransition::setDuration( int duration )
106 {
107  d->m_duration = duration;
108 }
109 
110 void PageTransition::setAlignment( Alignment alignment )
111 {
112  d->m_alignment = alignment;
113 }
114 
115 void PageTransition::setDirection( Direction direction )
116 {
117  d->m_direction = direction;
118 }
119 
120 void PageTransition::setAngle( int angle )
121 {
122  d->m_angle = angle;
123 }
124 
125 void PageTransition::setScale( double scale )
126 {
127  d->m_scale = scale;
128 }
129 
130 void PageTransition::setIsRectangular( bool rectangular )
131 {
132  d->m_rectangular = rectangular;
133 }
134 
Okular::PageTransition::alignment
Alignment alignment() const
Returns the alignment of the transition.
Definition: pagetransition.cpp:75
Okular::PageTransition::type
Type type() const
Returns the type of the transition.
Definition: pagetransition.cpp:65
Okular::PageTransition::setType
void setType(Type type)
Sets the type of the transition (Type).
Definition: pagetransition.cpp:100
Okular::PageTransition::setScale
void setScale(double scale)
Sets the starting or ending scale of the transition (Only if type == 'Fly').
Definition: pagetransition.cpp:125
Okular::PageTransition::operator=
PageTransition & operator=(const PageTransition &other)
Definition: pagetransition.cpp:50
Okular::PageTransition::Type
Type
Describes the type of transition effect.
Definition: pagetransition.h:30
Okular::PageTransition::scale
double scale() const
Returns the starting or ending scale (Only if type == 'Fly').
Definition: pagetransition.cpp:90
Okular::PageTransition::isRectangular
bool isRectangular() const
Returns true if the area to be flown is rectangular and opaque (Only if type == 'Fly').
Definition: pagetransition.cpp:95
Okular::PageTransition::setAlignment
void setAlignment(Alignment alignment)
Sets the alignment of the transition (Alignment).
Definition: pagetransition.cpp:110
Okular::PageTransition::Direction
Direction
Describes the direction that is applied to the Type of transition effect.
Definition: pagetransition.h:58
Okular::PageTransition::setIsRectangular
void setIsRectangular(bool rectangular)
Sets whether the area to be flown is rectangular and opaque (Only if type == 'Fly').
Definition: pagetransition.cpp:130
Okular::PageTransition::duration
int duration() const
Returns the duration of the transition in seconds.
Definition: pagetransition.cpp:70
Okular::PageTransition::setAngle
void setAngle(int angle)
Sets the moving angle of the transition.
Definition: pagetransition.cpp:120
Okular::PageTransition::angle
int angle() const
Returns the angle of rotation of the transition.
Definition: pagetransition.cpp:85
pagetransition.h
Okular::PageTransition::Alignment
Alignment
Describes the alignment that is applied to the Type of transition effect.
Definition: pagetransition.h:49
Okular::PageTransition::Horizontal
Definition: pagetransition.h:50
Okular::PageTransition::direction
Direction direction() const
Returns the direction of motion of the transition.
Definition: pagetransition.cpp:80
Okular::PageTransition::setDirection
void setDirection(Direction direction)
Sets the direction of the transition (.
Definition: pagetransition.cpp:115
Okular::PageTransition::setDuration
void setDuration(int duration)
Sets the duration in seconds for the transition.
Definition: pagetransition.cpp:105
Okular::PageTransition::PageTransition
PageTransition(Type type=Replace)
Creates a new page transition of the given type.
Definition: pagetransition.cpp:40
Okular::PageTransition
Information object for the transition effect of a page.
Definition: pagetransition.h:24
Okular::PageTransition::~PageTransition
~PageTransition()
Destroys the page transition.
Definition: pagetransition.cpp:60
Okular::PageTransition::Inward
Definition: pagetransition.h:59
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:45:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okular

Skip menu "okular"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdegraphics API Reference

Skip menu "kdegraphics API Reference"
  •     libkdcraw
  •     libkexiv2
  •     libkipi
  •     libksane
  • okular

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal