Commit 335a091e authored by Pino Toscano's avatar Pino Toscano

add showControls and playMode properties

svn path=/trunk/KDE/kdegraphics/okular/; revision=851902
parent 723aa28f
......@@ -19,13 +19,17 @@ class Movie::Private
public:
Private( const QString &url )
: m_url( url ),
m_rotation( Rotation0 )
m_rotation( Rotation0 ),
m_playMode( PlayOnce ),
m_showControls( false )
{
}
QString m_url;
QSize m_aspect;
Rotation m_rotation;
PlayMode m_playMode;
bool m_showControls : 1;
};
Movie::Movie( const QString& fileName )
......@@ -62,3 +66,23 @@ Rotation Movie::rotation() const
{
return d->m_rotation;
}
void Movie::setShowControls( bool show )
{
d->m_showControls = show;
}
bool Movie::showControls() const
{
return d->m_showControls;
}
void Movie::setPlayMode( Movie::PlayMode mode )
{
d->m_playMode = mode;
}
Movie::PlayMode Movie::playMode() const
{
return d->m_playMode;
}
......@@ -25,6 +25,17 @@ namespace Okular {
class OKULAR_EXPORT Movie
{
public:
/**
* The play mode for playing the movie
*/
enum PlayMode
{
PlayOnce, ///< Play the movie once, closing the movie controls at the end
PlayOpen, ///< Like PlayOnce, but leaving the controls open
PlayRepeat, ///< Play continuously until stopped
PlayPalindrome ///< Play forward, then backward, then again foward and so on until stopped
};
/**
* Creates a new movie object with the given external @p fileName.
*/
......@@ -60,6 +71,26 @@ class OKULAR_EXPORT Movie
*/
Rotation rotation() const;
/**
* Sets whether show a bar with movie controls
*/
void setShowControls( bool show );
/**
* Whether show a bar with movie controls
*/
bool showControls() const;
/**
* Sets the way the movie should be played
*/
void setPlayMode( PlayMode mode );
/**
* How to play the movie
*/
PlayMode playMode() const;
private:
class Private;
Private* const d;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment