diff options
author | Pino Toscano <pino@kde.org> | 2008-08-24 18:45:25 +0200 |
---|---|---|
committer | Pino Toscano <pino@kde.org> | 2008-08-24 18:45:25 +0200 |
commit | 25bd5967f9f550a32e20eea91cd00cbeff98249e (patch) | |
tree | c7c76c806053b9dd983b1db05b0fc533a6e16221 | |
parent | 48a73cc709a8bed9d2d0f9cbd2a9d2b6c0dad05b (diff) |
[Qt4] initialize the MovieObject from an AnnotMovie
the annotation has all the data we need, so just init from that
-rw-r--r-- | qt4/src/poppler-movie.cc | 8 | ||||
-rw-r--r-- | qt4/src/poppler-page.cc | 4 | ||||
-rw-r--r-- | qt4/src/poppler-qt4.h | 4 |
3 files changed, 7 insertions, 9 deletions
diff --git a/qt4/src/poppler-movie.cc b/qt4/src/poppler-movie.cc index c7ebb581..5aa0d493 100644 --- a/qt4/src/poppler-movie.cc +++ b/qt4/src/poppler-movie.cc @@ -41,12 +41,12 @@ public: int m_rotation; }; -MovieObject::MovieObject( Movie *popplermovie, const QSize &size, int rotation ) +MovieObject::MovieObject( AnnotMovie *ann ) { m_movieData = new MovieData(); - m_movieData->m_movieObj = popplermovie->copy(); - m_movieData->m_size = size; - m_movieData->m_rotation = rotation; + m_movieData->m_movieObj = ann->getMovie()->copy(); + ann->getMovieSize( m_movieData->m_size.rwidth(), m_movieData->m_size.rheight() ); + m_movieData->m_rotation = ann->getRotationAngle(); } MovieObject::~MovieObject() diff --git a/qt4/src/poppler-page.cc b/qt4/src/poppler-page.cc index f8c88eb3..4d371991 100644 --- a/qt4/src/poppler-page.cc +++ b/qt4/src/poppler-page.cc @@ -899,9 +899,7 @@ QList<Annotation*> Page::annotations() const annotation = m; // -> movie - QSize movieSize; - movieann->getMovieSize( movieSize.rwidth(), movieSize.rheight() ); - MovieObject *movie = new MovieObject( movieann->getMovie(), movieSize, movieann->getRotationAngle() ); + MovieObject *movie = new MovieObject( movieann ); m->setMovie( movie ); // -> movieTitle GooString * movietitle = movieann->getTitle(); diff --git a/qt4/src/poppler-qt4.h b/qt4/src/poppler-qt4.h index a8e57a14..156bddd6 100644 --- a/qt4/src/poppler-qt4.h +++ b/qt4/src/poppler-qt4.h @@ -33,7 +33,7 @@ class EmbFile; class Sound; -class Movie; +class AnnotMovie; /** The %Poppler Qt4 binding. @@ -1200,7 +1200,7 @@ height = dummy.height(); class POPPLER_QT4_EXPORT MovieObject { public: /// \cond PRIVATE - MovieObject( Movie *popplermovie, const QSize &size, int rotation ); + MovieObject( AnnotMovie *ann ); /// \endcond ~MovieObject(); |