1 /* PageTransition.h 2 * Copyright (C) 2005, Net Integration Technologies, Inc. 3 * Copyright (C) 2005, Brad Hards <bradh@frogmouth.net> 4 * Copyright (C) 2015, Arseniy Lartsev <arseniy@alumni.chalmers.se> 5 * Copyright (C) 2018, 2021, Albert Astals Cid <aacid@kde.org> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2, or (at your option) 10 * any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. 20 */ 21 22 #ifndef __PAGETRANSITION_X_H__ 23 #define __PAGETRANSITION_X_H__ 24 25 #include "poppler-export.h" 26 27 #include <QtCore/qglobal.h> 28 29 namespace Poppler { 30 31 class PageTransitionParams; 32 class PageTransitionData; 33 34 /** 35 \brief Describes how a PDF file viewer shall perform the transition 36 from one page to another 37 38 In PDF files there is a way to specify if the viewer shall use 39 certain effects to perform the transition from one page to 40 another. This feature can be used, e.g., in a PDF-based beamer 41 presentation. 42 43 This utility class represents the transition effect, and can be 44 used to extract the information from a PDF object. 45 */ 46 47 class POPPLER_QT6_EXPORT PageTransition 48 { 49 public: 50 /** \brief transition effect that shall be used 51 */ 52 // if changed remember to keep in sync with PageTransition.h enum 53 enum Type 54 { 55 Replace = 0, 56 Split, 57 Blinds, 58 Box, 59 Wipe, 60 Dissolve, 61 Glitter, 62 Fly, 63 Push, 64 Cover, 65 Uncover, 66 Fade 67 }; 68 69 /** \brief alignment of the transition effect that shall be used 70 */ 71 // if changed remember to keep in sync with PageTransition.h enum 72 enum Alignment 73 { 74 Horizontal = 0, 75 Vertical 76 }; 77 78 /** \brief direction of the transition effect that shall be used 79 */ 80 // if changed remember to keep in sync with PageTransition.h enum 81 enum Direction 82 { 83 Inward = 0, 84 Outward 85 }; 86 87 explicit PageTransition(const PageTransitionParams params); 88 89 /** \brief copy constructor */ 90 PageTransition(const PageTransition &pt); 91 92 /** \brief assignment operator */ 93 PageTransition &operator=(const PageTransition &other); 94 95 /** 96 Destructor 97 */ 98 ~PageTransition(); 99 100 /** 101 \brief Get type of the transition. 102 */ 103 Type type() const; 104 105 /** 106 \brief Get duration of the transition in seconds 107 */ 108 double durationReal() const; 109 110 /** 111 \brief Get dimension in which the transition effect occurs. 112 */ 113 Alignment alignment() const; 114 115 /** 116 \brief Get direction of motion of the transition effect. 117 */ 118 Direction direction() const; 119 120 /** 121 \brief Get direction in which the transition effect moves. 122 */ 123 int angle() const; 124 125 /** 126 \brief Get starting or ending scale. 127 */ 128 double scale() const; 129 130 /** 131 \brief Returns true if the area to be flown is rectangular and 132 opaque. 133 */ 134 bool isRectangular() const; 135 136 private: 137 PageTransitionData *data; 138 }; 139 140 } 141 142 #endif 143