Commit b412aba1 authored by Albert Astals Cid's avatar Albert Astals Cid

more proting, area.h still resists me

svn path=/branches/work/kde4/playground/graphics/okular/; revision=520833
parent 6987b83b
......@@ -101,7 +101,7 @@ Annotation::~Annotation()
// delete all children revisions
if ( revisions.isEmpty() )
return;
QValueList< Revision >::iterator it = revisions.begin(), end = revisions.end();
QLinkedList< Revision >::iterator it = revisions.begin(), end = revisions.end();
for ( ; it != end; ++it )
delete (*it).annotation;
}
......@@ -292,7 +292,7 @@ void Annotation::store( QDomNode & annNode, QDomDocument & document ) const
return;
// add all revisions as children of revisions element
QValueList< Revision >::const_iterator it = revisions.begin(), end = revisions.end();
QLinkedList< Revision >::const_iterator it = revisions.begin(), end = revisions.end();
for ( ; it != end; ++it )
{
// create revision element
......@@ -505,7 +505,7 @@ void LineAnnotation::store( QDomNode & node, QDomDocument & document ) const
int points = linePoints.count();
if ( points > 1 )
{
QValueList<NormalizedPoint>::const_iterator it = linePoints.begin(), end = linePoints.end();
QLinkedList<NormalizedPoint>::const_iterator it = linePoints.begin(), end = linePoints.end();
while ( it != end )
{
const NormalizedPoint & p = *it;
......@@ -633,7 +633,7 @@ void HighlightAnnotation::store( QDomNode & node, QDomDocument & document ) cons
if ( highlightQuads.count() < 1 )
return;
// append highlight quads, all children describe quads
QValueList< Quad >::const_iterator it = highlightQuads.begin(), end = highlightQuads.end();
QLinkedList< Quad >::const_iterator it = highlightQuads.begin(), end = highlightQuads.end();
for ( ; it != end; ++it )
{
QDomElement quadElement = document.createElement( "quad" );
......@@ -727,7 +727,7 @@ InkAnnotation::InkAnnotation( const QDomNode & node )
continue;
// build each path parsing 'point' subnodes
QValueList<NormalizedPoint> path;
QLinkedList<NormalizedPoint> path;
QDomNode pointNode = pathElement.firstChild();
while ( pointNode.isElement() )
{
......@@ -765,13 +765,13 @@ void InkAnnotation::store( QDomNode & node, QDomDocument & document ) const
// append the optional attributes
if ( inkPaths.count() < 1 )
return;
QValueList< QValueList<NormalizedPoint> >::const_iterator pIt = inkPaths.begin(), pEnd = inkPaths.end();
QLinkedList< QLinkedList<NormalizedPoint> >::const_iterator pIt = inkPaths.begin(), pEnd = inkPaths.end();
for ( ; pIt != pEnd; ++pIt )
{
QDomElement pathElement = document.createElement( "path" );
inkElement.appendChild( pathElement );
const QValueList<NormalizedPoint> & path = *pIt;
QValueList<NormalizedPoint>::const_iterator iIt = path.begin(), iEnd = path.end();
const QLinkedList<NormalizedPoint> & path = *pIt;
QLinkedList<NormalizedPoint>::const_iterator iIt = path.begin(), iEnd = path.end();
for ( ; iIt != iEnd; ++iIt )
{
const NormalizedPoint & point = *iIt;
......
This diff is collapsed.
......@@ -30,7 +30,7 @@ class Generator;
class PixmapRequest;
class Annotation;
class KPrinter;
class KURL;
class KUrl;
class KActionCollection;
class QToolBox;
class NotifyRequest;
......@@ -56,13 +56,13 @@ class KPDFDocument : public QObject
{
Q_OBJECT
public:
KPDFDocument( QHash<QString, Generator> * genList );
KPDFDocument( QHash<QString, Generator*> * genList );
~KPDFDocument();
// communication with the part
// document handling
bool openDocument( const QString & docFile, const KURL & url, const KMimeType::Ptr &mime );
bool openDocument( const QString & docFile, const KUrl & url, const KMimeType::Ptr &mime );
void closeDocument();
// observer stuff
......@@ -79,11 +79,11 @@ class KPDFDocument : public QObject
const DocumentInfo * documentInfo() const;
const DocumentSynopsis * documentSynopsis() const;
const DocumentFonts * documentFonts() const;
const KPDFPage * page( uint page ) const;
const KPDFPage * page( int page ) const;
const DocumentViewport & viewport() const;
uint currentPage() const;
uint pages() const;
KURL currentDocument() const;
KUrl currentDocument() const;
bool isAllowed( int /*Document::Permisison(s)*/ ) const;
bool supportsSearching() const;
bool supportsRotation() const;
......@@ -134,7 +134,7 @@ class KPDFDocument : public QObject
void linkGoToPage();
void linkPresentation();
void linkEndPresentation();
void openURL(const KURL &url);
void openURL(const KUrl &url);
void error(QString & string, int duration);
void warning(QString & string, int duration);
void notice(QString & string, int duration);
......@@ -148,7 +148,7 @@ class KPDFDocument : public QObject
void loadDocumentInfo();
QString giveAbsolutePath( const QString & fileName );
bool openRelativeFile( const QString & fileName );
QHash<QString, Generator>* m_loadedGenerators ;
QHash<QString, Generator*>* m_loadedGenerators ;
Generator * generator;
bool m_usingCachedGenerator;
QVector< KPDFPage * > pages_vector;
......
......@@ -21,8 +21,8 @@
#include <qvector.h>
#include <qstring.h>
#include <ostream>
#include "core/document.h"
#include "core/textpage.h"
#include "document.h"
#include "textpage.h"
class KPrinter;
class KPDFPage;
class KPDFLink;
......
......@@ -11,7 +11,7 @@
#ifndef _KPDF_DOCUMENTOBSERVER_H_
#define _KPDF_DOCUMENTOBSERVER_H_
#include <qvaluevector.h>
#include <qvector.h>
#include <qrect.h>
/** IDs for observers. Globally defined here. **/
......@@ -43,13 +43,15 @@ class KPDFPage;
class DocumentObserver
{
public:
virtual ~DocumentObserver() {};
// you must give each observer a unique ID (used for notifications)
virtual uint observerId() const = 0;
// commands from the Document to all observers
enum ChangedFlags { Pixmap = 1, Bookmark = 2, Highlights = 4, Annotations = 8 };
enum NotifyType { Setup = 1, Viewport = 2, Page = 4, Contents = 8 };
virtual void notifySetup( const QValueVector< KPDFPage * > & /*pages*/, bool /*documentChanged*/ ) {};
virtual void notifySetup( const QVector< KPDFPage * > & /*pages*/, bool /*documentChanged*/ ) {};
virtual void notifyViewportChanged( bool /*smoothMove*/ ) {};
virtual void notifyPageChanged( int /*pageNumber*/, int /*changedFlags*/ ) {};
virtual void notifyContentsCleared( int /*changedFlags*/ ) {};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment