[poppler] poppler/qt4/src: Makefile.am, 1.2, 1.3 poppler-page.cc, 1.9, 1.10 poppler-qt4.h, 1.20, 1.21

Albert Astals Cid aacid at freedesktop.org
Fri Dec 30 14:31:34 PST 2005


Update of /cvs/poppler/poppler/qt4/src
In directory gabe:/tmp/cvs-serv25153/qt4/src

Modified Files:
	Makefile.am poppler-page.cc poppler-qt4.h 
Log Message:
Puting PageTransition implementation into poppler "core", both Qt and Qt4 frontends use it.


Index: Makefile.am
===================================================================
RCS file: /cvs/poppler/poppler/qt4/src/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Makefile.am	3 Dec 2005 22:20:54 -0000	1.2
+++ Makefile.am	30 Dec 2005 22:31:32 -0000	1.3
@@ -7,7 +7,7 @@
 poppler_includedir = $(includedir)/poppler
 
 poppler_include_HEADERS =			\
-	poppler-qt4.h
+	poppler-qt4.h ../../poppler/PageTransition.h
 
 lib_LTLIBRARIES=libpoppler-qt4.la
 

Index: poppler-page.cc
===================================================================
RCS file: /cvs/poppler/poppler/qt4/src/poppler-page.cc,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- poppler-page.cc	10 Dec 2005 10:52:16 -0000	1.9
+++ poppler-page.cc	30 Dec 2005 22:31:32 -0000	1.10
@@ -26,6 +26,7 @@
 #include <Catalog.h>
 #include <ErrorCodes.h>
 #include <ArthurOutputDev.h>
+#include <Private.h>
 #include <TextOutputDev.h>
 #include "poppler-private.h"
 
@@ -38,12 +39,14 @@
   public:
   const Document *parentDoc;
   int index;
+  PageTransition *transition;
 };
 
 Page::Page(const Document *doc, int index) {
   m_page = new PageData();
   m_page->index = index;
   m_page->parentDoc = doc;
+  m_page->transition = 0;
 }
 
 Page::~Page()
@@ -174,7 +177,7 @@
     double xMin, yMin, xMax, yMax;
     word->getBBox(&xMin, &yMin, &xMax, &yMax);
     
-    TextBox* text_box = new TextBox(string, QRectF(xMin, yMin, xMax, yMax));
+    TextBox* text_box = new TextBox(string, QRectF(xMin, yMin, xMax-xMin, yMax-yMin));
     
     output_list.append(text_box);
   }
@@ -185,6 +188,18 @@
   return output_list;
 }
 
+PageTransition *Page::transition() const
+{
+  if (!m_page->transition) {
+    Object o;
+    PageTransitionParams params;
+    params.dictObj = m_page->parentDoc->m_doc->doc.getCatalog()->getPage(m_page->index + 1)->getTrans(&o);
+    m_page->transition = new PageTransition(params);
+    o.free();
+  }
+  return m_page->transition;
+}
+
 QSizeF Page::pageSizeF() const
 {
   ::Page *p;

Index: poppler-qt4.h
===================================================================
RCS file: /cvs/poppler/poppler/qt4/src/poppler-qt4.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- poppler-qt4.h	28 Dec 2005 09:23:43 -0000	1.20
+++ poppler-qt4.h	30 Dec 2005 22:31:32 -0000	1.21
@@ -26,6 +26,8 @@
 #include <QtCore/QDateTime>
 #include <QtGui/QPixmap>
 
+#include <PageTransition.h>
+
 /**
    The Poppler Qt bindings
 */
@@ -254,7 +256,6 @@
 
 	   \warning This method is not tested with Asian scripts
 	*/
-
 	QList<TextBox*> textList() const;
 
 	/**
@@ -268,6 +269,17 @@
 	QSize pageSize() const;
 
 	/**
+	  \brief Returns the transition of this page
+
+	  @returns a pointer to a PageTransition structure that
+	  defines how transition to this page shall be performed. The
+	  PageTransition structure is owned by this page, and will
+	  automatically be destroyed when this page class is
+	  destroyed.
+	**/
+	PageTransition *transition() const;
+	
+	/**
 	   Types of orientations that are possible
 	*/
 	enum Orientation {



More information about the poppler mailing list