[poppler] 3 commits - qt4/src

Pino Toscano pino at kemper.freedesktop.org
Wed Feb 27 10:28:34 PST 2008


 qt4/src/poppler-optcontent-private.h |    2 ++
 qt4/src/poppler-optcontent.cc        |    8 ++++----
 qt4/src/poppler-optcontent.h         |   14 ++++++++------
 3 files changed, 14 insertions(+), 10 deletions(-)

New commits:
commit d8eba8c10834116b4f0f295375805172f5216993
Author: Pino Toscano <pino at kde.org>
Date:   Wed Feb 27 19:07:46 2008 +0100

    export the OptContentModel

diff --git a/qt4/src/poppler-optcontent.h b/qt4/src/poppler-optcontent.h
index 36f3056..2b0c5ec 100644
--- a/qt4/src/poppler-optcontent.h
+++ b/qt4/src/poppler-optcontent.h
@@ -22,6 +22,8 @@
 
 #include <QtCore/QAbstractListModel>
 
+#include "poppler-export.h"
+
 class OCGs;
 
 namespace Poppler
@@ -29,7 +31,7 @@ namespace Poppler
   class Document;
   class OptContentModelPrivate;
 
-  class OptContentModel : public QAbstractItemModel
+  class POPPLER_QT4_EXPORT OptContentModel : public QAbstractItemModel
   {
     friend class Document;
 
commit 0445e64a4124af7c1b84673f237022e133eb8542
Author: Pino Toscano <pino at kde.org>
Date:   Wed Feb 27 19:04:03 2008 +0100

    make only the Document able to create OptContentsModel's

diff --git a/qt4/src/poppler-optcontent.h b/qt4/src/poppler-optcontent.h
index e644ac6..36f3056 100644
--- a/qt4/src/poppler-optcontent.h
+++ b/qt4/src/poppler-optcontent.h
@@ -26,14 +26,16 @@ class OCGs;
 
 namespace Poppler
 {
+  class Document;
   class OptContentModelPrivate;
 
   class OptContentModel : public QAbstractItemModel
   {
+    friend class Document;
+
     Q_OBJECT
 
     public:
-    OptContentModel( OCGs *optContent, QObject *parent = 0);
     virtual ~OptContentModel();
 
     QModelIndex index(int row, int column, const QModelIndex &parent) const;
@@ -50,6 +52,8 @@ namespace Poppler
     virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
 
     private:
+    OptContentModel( OCGs *optContent, QObject *parent = 0);
+
     friend class OptContentModelPrivate;
     OptContentModelPrivate *d;
   };
commit c965437b67a4f97ee8365a217bd10406fba3767a
Author: Pino Toscano <pino at kde.org>
Date:   Wed Feb 27 18:58:31 2008 +0100

    setRootNode() is private (and unused) API

diff --git a/qt4/src/poppler-optcontent-private.h b/qt4/src/poppler-optcontent-private.h
index 8261839..7471a42 100644
--- a/qt4/src/poppler-optcontent-private.h
+++ b/qt4/src/poppler-optcontent-private.h
@@ -29,6 +29,7 @@ class OptionalContentGroup;
 
 namespace Poppler
 {
+  class OptContentItem;
 
   class RadioButtonGroup
   {
@@ -91,6 +92,7 @@ namespace Poppler
        \return the matching optional content item, or null if the reference wasn't found
     */
     OptContentItem *itemFromRef( const QString &ref ) const;
+    void setRootNode(OptContentItem *node);
 
     OptContentModel *q;
 
diff --git a/qt4/src/poppler-optcontent.cc b/qt4/src/poppler-optcontent.cc
index 68a44a6..4f3e6d9 100644
--- a/qt4/src/poppler-optcontent.cc
+++ b/qt4/src/poppler-optcontent.cc
@@ -227,11 +227,11 @@ namespace Poppler
     delete d;
   }
 
-  void OptContentModel::setRootNode( OptContentItem *node )
+  void OptContentModelPrivate::setRootNode(OptContentItem *node)
   {
-    delete d->m_rootNode;
-    d->m_rootNode = node;
-    reset();
+    delete m_rootNode;
+    m_rootNode = node;
+    q->reset();
   }
 
   QModelIndex OptContentModel::index(int row, int column, const QModelIndex &parent) const
diff --git a/qt4/src/poppler-optcontent.h b/qt4/src/poppler-optcontent.h
index 325a8e4..e644ac6 100644
--- a/qt4/src/poppler-optcontent.h
+++ b/qt4/src/poppler-optcontent.h
@@ -26,8 +26,6 @@ class OCGs;
 
 namespace Poppler
 {
-  class OptContentItem;
-  class OptContentModel;
   class OptContentModelPrivate;
 
   class OptContentModel : public QAbstractItemModel
@@ -38,8 +36,6 @@ namespace Poppler
     OptContentModel( OCGs *optContent, QObject *parent = 0);
     virtual ~OptContentModel();
 
-    void setRootNode(OptContentItem *node);
-
     QModelIndex index(int row, int column, const QModelIndex &parent) const;
     QModelIndex parent(const QModelIndex &child) const;
 


More information about the poppler mailing list