compile
[kdegraphics.git] / okular / core / movie.h
blob7f7ac12540d0b81d16b81f1ca630d400e0d73e0d
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 #ifndef _OKULAR_MOVIE_H_
11 #define _OKULAR_MOVIE_H_
13 #include <okular/core/global.h>
14 #include <okular/core/okular_export.h>
16 #include <QtCore/QSize>
18 namespace Okular {
20 /**
21 * @short Contains information about a movie object.
23 * @since 0.8 (KDE 4.2)
25 class OKULAR_EXPORT Movie
27 public:
28 /**
29 * The play mode for playing the movie
31 enum PlayMode
33 PlayOnce, ///< Play the movie once, closing the movie controls at the end
34 PlayOpen, ///< Like PlayOnce, but leaving the controls open
35 PlayRepeat, ///< Play continuously until stopped
36 PlayPalindrome ///< Play forward, then backward, then again forward and so on until stopped
39 /**
40 * Creates a new movie object with the given external @p fileName.
42 explicit Movie( const QString& fileName );
44 /**
45 * Destroys the movie object.
47 ~Movie();
49 /**
50 * Returns the url of the movie.
52 QString url() const;
54 /**
55 * Sets the size for the movie.
57 void setSize( const QSize &aspect );
59 /**
60 * Returns the size of the movie.
62 QSize size() const;
64 /**
65 * Sets the @p rotation of the movie.
67 void setRotation( Rotation rotation );
69 /**
70 * Returns the rotation of the movie.
72 Rotation rotation() const;
74 /**
75 * Sets whether show a bar with movie controls
77 void setShowControls( bool show );
79 /**
80 * Whether show a bar with movie controls
82 bool showControls() const;
84 /**
85 * Sets the way the movie should be played
87 void setPlayMode( PlayMode mode );
89 /**
90 * How to play the movie
92 PlayMode playMode() const;
94 private:
95 class Private;
96 Private* const d;
98 Q_DISABLE_COPY( Movie )
103 #endif