compile
[kdegraphics.git] / okular / core / movie.cpp
blob8c7ffa5adfeaf686bc49eb7656382c09e0afd267
1 /***************************************************************************
2 * Copyright (C) 2008 by Pino Toscano <pino@kde.org> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 ***************************************************************************/
10 #include "movie.h"
12 // qt/kde includes
13 #include <qstring.h>
15 using namespace Okular;
17 class Movie::Private
19 public:
20 Private( const QString &url )
21 : m_url( url ),
22 m_rotation( Rotation0 ),
23 m_playMode( PlayOnce ),
24 m_showControls( false )
28 QString m_url;
29 QSize m_aspect;
30 Rotation m_rotation;
31 PlayMode m_playMode;
32 bool m_showControls : 1;
35 Movie::Movie( const QString& fileName )
36 : d( new Private( fileName ) )
40 Movie::~Movie()
42 delete d;
45 QString Movie::url() const
47 return d->m_url;
50 void Movie::setSize( const QSize &aspect )
52 d->m_aspect = aspect;
55 QSize Movie::size() const
57 return d->m_aspect;
60 void Movie::setRotation( Rotation rotation )
62 d->m_rotation = rotation;
65 Rotation Movie::rotation() const
67 return d->m_rotation;
70 void Movie::setShowControls( bool show )
72 d->m_showControls = show;
75 bool Movie::showControls() const
77 return d->m_showControls;
80 void Movie::setPlayMode( Movie::PlayMode mode )
82 d->m_playMode = mode;
85 Movie::PlayMode Movie::playMode() const
87 return d->m_playMode;