14#include <QTemporaryFile>
29 , m_playRepetitions(1.0)
31 , m_showControls(false)
33 , m_startPaused(false)
34 , m_showPosterImage(false)
42 double m_playRepetitions;
45 bool m_showControls : 1;
47 bool m_startPaused : 1;
48 bool m_showPosterImage : 1;
52 : d(new Private(fileName))
57 : d(new Private(fileName))
67 if (d->m_tmp->
open()) {
68 d->m_tmp->
write(data);
71 qCDebug(OkularCoreDebug) <<
"Failed to create temporary file for video data.";
107 return d->m_rotation;
112 d->m_showControls = show;
117 return d->m_showControls;
122 d->m_playMode = mode;
127 return d->m_playMode;
132 d->m_playRepetitions = repetitions;
137 return d->m_playRepetitions;
147 return d->m_autoPlay;
157 return d->m_startPaused;
162 d->m_showPosterImage = show;
167 return d->m_showPosterImage;
172 d->m_posterImage = image;
177 return d->m_posterImage;
Rotation rotation() const
Returns the rotation of the movie.
bool showControls() const
Whether show a bar with movie controls.
void setPosterImage(const QImage &image)
Sets the poster image.
bool autoPlay() const
Whether to play the movie automatically.
QString url() const
Returns the url of the movie.
Movie(const QString &fileName)
Creates a new movie object with the given external fileName.
void setRotation(Rotation rotation)
Sets the rotation of the movie.
PlayMode playMode() const
How to play the movie.
void setSize(const QSize aspect)
Sets the size for the movie.
void setStartPaused(bool startPaused)
Sets whether to start the movie in paused mode.
void setShowPosterImage(bool show)
Sets whether to show a poster image.
double playRepetitions() const
How many times to play the movie.
void setShowControls(bool show)
Sets whether show a bar with movie controls.
void setAutoPlay(bool autoPlay)
Sets whether to play the movie automatically.
bool startPaused() const
Whether to start the movie in paused mode.
~Movie()
Destroys the movie object.
PlayMode
The play mode for playing the movie.
@ PlayLimited
Play a fixed amount of times, closing the movie controls at the end.
bool showPosterImage() const
Whether to show a poster image.
QSize size() const
Returns the size of the movie.
void setPlayMode(PlayMode mode)
Sets the way the movie should be played.
void setPlayRepetitions(double repetitions)
Sets how many times the movie should be played.
QImage posterImage() const
Returns the poster image.
qint64 write(const QByteArray &data)
virtual QString fileName() const const override