Okular

movie.h
1/*
2 SPDX-FileCopyrightText: 2008 Pino Toscano <pino@kde.org>
3 SPDX-FileCopyrightText: 2012 Guillermo A. Amaral B. <gamaral@kde.org>
4
5 SPDX-License-Identifier: GPL-2.0-or-later
6*/
7
8#ifndef _OKULAR_MOVIE_H_
9#define _OKULAR_MOVIE_H_
10
11#include "global.h"
12#include "okularcore_export.h"
13
14#include <QSize>
15
16class QImage;
17
18namespace Okular
19{
20/**
21 * @short Contains information about a movie object.
22 *
23 * @since 0.8 (KDE 4.2)
24 */
25class OKULARCORE_EXPORT Movie
26{
27public:
28 /**
29 * The play mode for playing the movie
30 */
31 enum PlayMode {
32 PlayLimited, ///< Play a fixed amount of times, closing the movie controls at the end @since 0.24
33 PlayOpen, ///< Like PlayLimited, but leaving the controls open
34 PlayRepeat, ///< Play continuously until stopped
35 PlayPalindrome ///< Play forward, then backward, then again forward and so on until stopped
36 };
37
38 /**
39 * Creates a new movie object with the given external @p fileName.
40 */
41 explicit Movie(const QString &fileName);
42
43 /**
44 * Creates a new movie object with the given movie data.
45 */
46 explicit Movie(const QString &fileName, const QByteArray &data);
47
48 /**
49 * Destroys the movie object.
50 */
51 ~Movie();
52
53 /**
54 * Returns the url of the movie.
55 */
56 QString url() const;
57
58 /**
59 * Sets the size for the movie.
60 */
61 void setSize(const QSize aspect);
62
63 /**
64 * Returns the size of the movie.
65 */
66 QSize size() const;
67
68 /**
69 * Sets the @p rotation of the movie.
70 */
71 void setRotation(Rotation rotation);
72
73 /**
74 * Returns the rotation of the movie.
75 */
76 Rotation rotation() const;
77
78 /**
79 * Sets whether show a bar with movie controls
80 */
81 void setShowControls(bool show);
82
83 /**
84 * Whether show a bar with movie controls
85 */
86 bool showControls() const;
87
88 /**
89 * Sets the way the movie should be played
90 */
91 void setPlayMode(PlayMode mode);
92
93 /**
94 * How to play the movie
95 */
96 PlayMode playMode() const;
97
98 /**
99 * Sets how many times the movie should be played
100 * @since 0.24
101 */
102 void setPlayRepetitions(double repetitions);
103
104 /**
105 * How many times to play the movie
106 * @since 0.24
107 */
108 double playRepetitions() const;
109
110 /**
111 * Sets whether to play the movie automatically
112 */
113 void setAutoPlay(bool autoPlay);
114
115 /**
116 * Whether to play the movie automatically
117 */
118 bool autoPlay() const;
119
120 /**
121 * Sets whether to start the movie in paused mode
122 */
123 void setStartPaused(bool startPaused);
124
125 /**
126 * Whether to start the movie in paused mode
127 */
128 bool startPaused() const;
129
130 /**
131 * Sets whether to show a poster image.
132 *
133 * @since 4.10
134 */
135 void setShowPosterImage(bool show);
136
137 /**
138 * Whether to show a poster image.
139 *
140 * @since 4.10
141 */
142 bool showPosterImage() const;
143
144 /**
145 * Sets the poster image.
146 *
147 * @since 4.10
148 */
149 void setPosterImage(const QImage &image);
150
151 /**
152 * Returns the poster image.
153 *
154 * @since 4.10
155 */
156 QImage posterImage() const;
157
158private:
159 class Private;
160 Private *const d;
161
162 Q_DISABLE_COPY(Movie)
163};
164
165}
166
167#endif
Contains information about a movie object.
Definition movie.h:26
PlayMode
The play mode for playing the movie.
Definition movie.h:31
@ PlayOpen
Like PlayLimited, but leaving the controls open.
Definition movie.h:33
@ PlayLimited
Play a fixed amount of times, closing the movie controls at the end.
Definition movie.h:32
@ PlayRepeat
Play continuously until stopped.
Definition movie.h:34
global.h
Definition action.h:17
Rotation
A rotation.
Definition global.h:46
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:50 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.