[poppler] poppler: ChangeLog, 1.122, 1.123 Makefile.am, 1.3, 1.4 configure.ac, 1.26, 1.27 poppler-qt4.pc.in, NONE, 1.1

Brad Hards bradh at freedesktop.org
Tue Jun 28 03:00:11 PDT 2005


Update of /cvs/poppler/poppler
In directory gabe:/tmp/cvs-serv23886

Modified Files:
	ChangeLog Makefile.am configure.ac 
Added Files:
	poppler-qt4.pc.in 
Log Message:
Initial import of Qt4 bindings, and for a Qt4 "Arthur" (QPainter)
backend renderer.

The bindings are currently unstable - you can expect substantial change
in both source and binary interfaces. 

The Arthur renderer currently does a reasonable job of rendering path
and fill, but the image rendering doesn't work (for reasons that aren't
clear to me) and text rendering doesn't use the right glyphs - it just
draws with the current font. There is a lot of work to do on this
too. Help is, of coure, welcome.



Index: ChangeLog
===================================================================
RCS file: /cvs/poppler/poppler/ChangeLog,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -d -r1.122 -r1.123
--- ChangeLog	28 Jun 2005 03:44:12 -0000	1.122
+++ ChangeLog	28 Jun 2005 10:00:09 -0000	1.123
@@ -1,3 +1,15 @@
+2005-06-28  Brad Hards  <bradh at frogmouth.net>
+
+	* qt4/:
+	* Makefile.am:
+	* configure.ac:
+	* poppler-qt4.pc.in: Initial import of Qt4 bindings, based
+	on the Qt3 bindings. API is still in flux.
+
+	* poppler/AuthurOutputDev.[cc,h]:
+	* poppler/Makefile.am: Initial import of Qt4 backend renderer. 
+	Incomplete at this stage.
+
 2005-06-27  Kristian Høgsberg  <krh at redhat.com>
 
 	* poppler/CairoOutputDev.cc:

Index: Makefile.am
===================================================================
RCS file: /cvs/poppler/poppler/Makefile.am,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Makefile.am	6 Apr 2005 14:39:40 -0000	1.3
+++ Makefile.am	28 Jun 2005 10:00:09 -0000	1.4
@@ -17,7 +17,12 @@
 qt_pc_file = poppler-qt.pc
 endif
 
-SUBDIRS = goo fofi $(splash_subdir) poppler $(glib_subdir) $(qt_subdir) test
+if BUILD_POPPLER_QT4
+qt4_subdir = qt4
+qt4_pc_file = poppler-qt4.pc
+endif
+
+SUBDIRS = goo fofi $(splash_subdir) poppler $(glib_subdir) $(qt_subdir) test $(qt4_subdir)
 
 EXTRA_DIST =					\
 	README-XPDF				\
@@ -32,4 +37,5 @@
 	$(cairo_pc_file)			\
 	$(splash_pc_file)			\
 	$(glib_pc_file)				\
-	$(qt_pc_file)
+	$(qt_pc_file)                           \
+	$(qt4_pc_file)

Index: configure.ac
===================================================================
RCS file: /cvs/poppler/poppler/configure.ac,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- configure.ac	26 Jun 2005 11:40:35 -0000	1.26
+++ configure.ac	28 Jun 2005 10:00:09 -0000	1.27
@@ -295,6 +295,93 @@
 fi
 AM_CONDITIONAL(BUILD_POPPLER_QT, test x$enable_poppler_qt = xyes)
 
+dnl 
+dnl Try Qt4
+dnl
+AC_ARG_ENABLE(poppler-qt4,
+	      AC_HELP_STRING([--disable-poppler-qt4],
+			     [Don't compile poppler Qt4 wrapper.]),
+	      enable_poppler_qt4=$enableval,
+	      enable_poppler_qt4="try")
+
+have_qt4=no
+dnl ===================================================================
+dnl Check whether the Qt4 libraries are available.
+dnl Adapted from Qt3 check above!
+dnl ===================================================================
+
+dnl Search paths for Qt4 - not much real experience with this yet.
+qt4_incdirs="/usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/lib/qt/include"
+qt4_libdirs="/usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt/lib"
+
+if test -n "$QTDIR" ; then
+    qt4_incdirs="$QTDIR/include $qt4_incdirs"
+    qt4_libdirs="$QTDIR/lib $qt4_libdirs"
+fi
+
+dnl What to test
+qt4_test_include="QtCore/QCoreApplication"
+qt4_test_la_library="libQtCore.la"
+qt4_test_library="libQtCore.so"
+
+dnl Check for Qt4 headers
+AC_MSG_CHECKING([for Qt4 headers])
+qt4_incdir="no"
+for it in $qt4_incdirs ; do
+    if test -r "$it/$qt4_test_include" ; then
+        qt4_incdir="$it"
+        break
+    fi
+done
+AC_MSG_RESULT([$qt4_incdir])
+
+dnl Check for Qt4 libraries
+AC_MSG_CHECKING([for Qt4 libraries])
+qt4_libdir="no"
+for qt4_check in $qt4_libdirs ; do
+    if test -r "$qt4_check/$qt4_test_la_library" ; then
+        qt4_libdir="$qt4_check"
+        break
+    fi
+
+    if test -r "$qt4_check/$qt4_test_library" ; then
+        qt4_libdir="$qt4_check"
+        break
+    fi
+done
+AC_MSG_RESULT([$qt4_libdir])
+
+if test "x$qt4_libdir" != "xno" ; then
+    if test "x$qt4_incdir" != "xno" ; then
+        have_qt4=yes;
+    fi
+fi
+
+dnl Set the variables
+POPPLER_QT4_CXXFLAGS="-I$qt4_incdir"
+POPPLER_QT4_LIBS="-L$qt4_libdir -lQtCore -lQtGui"
+
+AC_SUBST(POPPLER_QT4_CXXFLAGS)
+AC_SUBST(POPPLER_QT4_LIBS)
+
+if test x$have_qt4 = xno ; then
+    AC_MSG_WARN([Qt4 development libraries not found])
+fi
+
+if test x$enable_poppler_qt4 = xyes; then
+  if test x$have_qt4 = xno; then
+    AC_MSG_ERROR([Qt4 integration explicitly required, and Qt4 libraries not found])
+  fi
+elif test x$enable_poppler_qt4 = xtry; then
+  if test x$have_qt4 = xyes; then
+    enable_poppler_qt4="yes"
+  else
+    enable_poppler_qt4="no"
+  fi
+fi
+AM_CONDITIONAL(BUILD_POPPLER_QT4, test x$enable_poppler_qt4 = xyes)
+
+
 AC_ARG_ENABLE(gtk-test,
               AC_HELP_STRING([--disable-gtk-test],
 	                     [Don't compile GTK+ test program.]),
@@ -339,11 +426,15 @@
 glib/Makefile
 test/Makefile
 qt/Makefile
+qt4/Makefile
+qt4/src/Makefile
+qt4/tests/Makefile
 poppler.pc
 poppler-cairo.pc
 poppler-splash.pc
 poppler-glib.pc
-poppler-qt.pc])
+poppler-qt.pc
+poppler-qt4.pc])
 
 
 echo ""
@@ -351,6 +442,7 @@
 echo "  splash output: $enable_splash_output"
 echo "  cairo output:  $enable_cairo_output"
 echo "  qt wrapper:    $enable_poppler_qt"
+echo "  qt4 wrapper:   $enable_poppler_qt4"
 echo "  glib wrapper:  $enable_poppler_glib"
 echo "  use libjpeg:   $enable_libjpeg"
 echo "  use zlib:      $enable_zlib"

--- NEW FILE: poppler-qt4.pc.in ---
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: poppler-qt4
Description: Qt4 bindings for poppler
Version: @VERSION@
Requires: poppler = @VERSION@

Libs: -L${libdir} -lpoppler-qt4
Cflags: -I${includedir}/poppler



More information about the poppler mailing list