[poppler] qt4/src
Albert Astals Cid
aacid at kemper.freedesktop.org
Sun Jun 10 08:48:22 PDT 2012
qt4/src/poppler-movie.cc | 15 +++++++++++++++
qt4/src/poppler-qt4.h | 15 +++++++++++++++
2 files changed, 30 insertions(+)
New commits:
commit 8b3fa65f293804dab7ae2fd069132d0d6f44bbb2
Author: Tobias Koenig <tobias.koenig at kdab.com>
Date: Sun Jun 10 17:48:08 2012 +0200
[qt4] Add accessor methods for poster information
diff --git a/qt4/src/poppler-movie.cc b/qt4/src/poppler-movie.cc
index 869e381..a64847c 100644
--- a/qt4/src/poppler-movie.cc
+++ b/qt4/src/poppler-movie.cc
@@ -2,6 +2,7 @@
* Copyright (C) 2008, 2010, Pino Toscano <pino at kde.org>
* Copyright (C) 2008, Albert Astals Cid <aacid at kde.org>
* Copyright (C) 2010, Carlos Garcia Campos <carlosgc at gnome.org>
+ * Copyright (C) 2012, Tobias Koenig <tobias.koenig at kdab.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,6 +25,8 @@
#include "Annot.h"
#include "Movie.h"
+#include <QtGui/QImage>
+
namespace Poppler
{
@@ -43,6 +46,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 +55,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 +97,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..827ea53 100644
--- a/qt4/src/poppler-qt4.h
+++ b/qt4/src/poppler-qt4.h
@@ -11,6 +11,7 @@
* Copyright (C) 2011 Glad Deschrijver <glad.deschrijver at gmail.com>
* Copyright (C) 2012, Guillermo A. Amaral B. <gamaral at kde.org>
* Copyright (C) 2012, Fabio D'Urso <fabiodurso at hotmail.it>
+ * Copyright (C) 2012, Tobias Koenig <tobias.koenig at kdab.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1733,6 +1734,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 );
More information about the poppler
mailing list