diff --git a/qt4/src/poppler-movie.cc b/qt4/src/poppler-movie.cc index 869e381..1723277 100644 --- a/qt4/src/poppler-movie.cc +++ b/qt4/src/poppler-movie.cc @@ -24,6 +24,8 @@ #include "Annot.h" #include "Movie.h" +#include + namespace Poppler { @@ -43,6 +45,7 @@ public: Movie *m_movieObj; QSize m_size; int m_rotation; + QImage m_posterImage; MovieObject::PlayMode m_playMode : 3; bool m_showControls : 1; }; @@ -51,6 +54,7 @@ MovieObject::MovieObject( AnnotMovie *ann ) { m_movieData = new MovieData(); m_movieData->m_movieObj = ann->getMovie()->copy(); + //TODO: copy poster image MovieActivationParameters *mp = m_movieData->m_movieObj->getActivationParameters(); int width, height; @@ -92,4 +96,14 @@ MovieObject::PlayMode MovieObject::playMode() const return m_movieData->m_playMode; } +bool MovieObject::showPosterImage() const +{ + return (m_movieData->m_movieObj->getShowPoster() == gTrue); +} + +QImage MovieObject::posterImage() const +{ + return m_movieData->m_posterImage; +} + } diff --git a/qt4/src/poppler-qt4.h b/qt4/src/poppler-qt4.h index f314108..78ad9f9 100644 --- a/qt4/src/poppler-qt4.h +++ b/qt4/src/poppler-qt4.h @@ -1733,6 +1733,20 @@ height = dummy.height(); */ PlayMode playMode() const; + /** + Returns whether a poster image should be shown if the movie is not playing. + \since 0.22 + */ + bool showPosterImage() const; + + /** + Returns the poster image that should be shown if the movie is not playing. + If the image is null but showImagePoster() returns @c true, the first frame of the movie + should be used as poster image. + \since 0.22 + */ + QImage posterImage() const; + private: /// \cond PRIVATE MovieObject( AnnotMovie *ann );