mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-02 14:14:10 +00:00
add showControls and playMode properties
svn path=/trunk/KDE/kdegraphics/okular/; revision=851902
This commit is contained in:
parent
723aa28f91
commit
335a091ebc
|
@ -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;
|
||||
}
|
||||
|
|
31
core/movie.h
31
core/movie.h
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue