Okular

pagetransition.cpp
1 /*
2  SPDX-FileCopyrightText: 2005 Tobias Koenig <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 // local includes
8 #include "pagetransition.h"
9 
10 using namespace Okular;
11 
12 /** class Okular::PageTransition **/
13 
14 class PageTransition::Private
15 {
16 public:
17  explicit Private(Type type)
18  : m_type(type)
19  , m_duration(1)
20  , m_alignment(Horizontal)
21  , m_direction(Inward)
22  , m_angle(0)
23  , m_scale(1.0)
24  , m_rectangular(false)
25  {
26  }
27 
28  Type m_type;
29  double m_duration;
30  Alignment m_alignment;
31  Direction m_direction;
32  int m_angle;
33  double m_scale;
34  bool m_rectangular;
35 };
36 
38  : d(new Private(type))
39 {
40 }
41 
43  : d(new Private(*other.d))
44 {
45 }
46 
47 PageTransition &PageTransition::operator=(const PageTransition &other)
48 {
49  if (this == &other) {
50  return *this;
51  }
52 
53  *d = *other.d;
54 
55  return *this;
56 }
57 
59 {
60  delete d;
61 }
62 
64 {
65  return d->m_type;
66 }
67 
69 {
70  return d->m_duration;
71 }
72 
74 {
75  return d->m_alignment;
76 }
77 
79 {
80  return d->m_direction;
81 }
82 
84 {
85  return d->m_angle;
86 }
87 
88 double PageTransition::scale() const
89 {
90  return d->m_scale;
91 }
92 
94 {
95  return d->m_rectangular;
96 }
97 
99 {
100  d->m_type = type;
101 }
102 
103 void PageTransition::setDuration(double duration)
104 {
105  d->m_duration = duration;
106 }
107 
109 {
110  d->m_alignment = alignment;
111 }
112 
114 {
115  d->m_direction = direction;
116 }
117 
119 {
120  d->m_angle = angle;
121 }
122 
123 void PageTransition::setScale(double scale)
124 {
125  d->m_scale = scale;
126 }
127 
128 void PageTransition::setIsRectangular(bool rectangular)
129 {
130  d->m_rectangular = rectangular;
131 }
bool isRectangular() const
Returns true if the area to be flown is rectangular and opaque (Only if type == 'Fly').
Direction
void setType(Type type)
Sets the type of the transition (Type).
double duration() const
Returns the duration of the transition in seconds.
void setDirection(Direction direction)
Sets the direction of the transition (.
Alignment
Describes the alignment that is applied to the Type of transition effect.
The documentation to the global Okular namespace.
Definition: action.h:16
void setScale(double scale)
Sets the starting or ending scale of the transition (Only if type == 'Fly').
Type type() const
Returns the type of the transition.
Information object for the transition effect of a page.
int angle() const
Returns the angle of rotation of the transition.
Direction direction() const
Returns the direction of motion of the transition.
PageTransition(Type type=Replace)
Creates a new page transition of the given type.
Horizontal
double scale() const
Returns the starting or ending scale (Only if type == 'Fly').
void setAlignment(Alignment alignment)
Sets the alignment of the transition (Alignment).
void setDuration(double duration)
Sets the duration in seconds for the transition.
Direction
Describes the direction that is applied to the Type of transition effect.
void setAngle(int angle)
Sets the moving angle of the transition.
void setIsRectangular(bool rectangular)
Sets whether the area to be flown is rectangular and opaque (Only if type == 'Fly').
Alignment alignment() const
Returns the alignment of the transition.
Type
Describes the type of transition effect.
~PageTransition()
Destroys the page transition.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Mar 27 2023 04:09:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.