Commit 1bd879c2 authored by Pino Toscano's avatar Pino Toscano
Browse files

extract the definition of the private class of TextPage to an own file, and...

extract the definition of the private class of TextPage to an own file, and rename it to TextPagePrivate

svn path=/trunk/KDE/kdegraphics/okular/; revision=708084
parent d66f6b8f
......@@ -8,8 +8,7 @@
***************************************************************************/
#include "textpage.h"
#include <QtCore/QMap>
#include "textpage_p.h"
#include <kdebug.h>
......@@ -59,38 +58,26 @@ NormalizedRect TextEntity::transformedArea(const QMatrix &matrix) const
return transformed_area;
}
class TextPage::Private
{
public:
Private( const TextEntity::List &words )
: m_words( words )
{
}
~Private()
{
qDeleteAll( m_searchPoints );
qDeleteAll( m_words );
}
RegularAreaRect * findTextInternalForward( int searchID, const QString &query,
Qt::CaseSensitivity caseSensitivity,
const TextEntity::List::ConstIterator &start,
const TextEntity::List::ConstIterator &end );
TextPagePrivate::TextPagePrivate( const TextEntity::List &words )
: m_words( words )
{
}
TextEntity::List m_words;
QMap< int, SearchPoint* > m_searchPoints;
QMatrix m_transformMatrix;
};
TextPagePrivate::~TextPagePrivate()
{
qDeleteAll( m_searchPoints );
qDeleteAll( m_words );
}
TextPage::TextPage()
: d( new Private( TextEntity::List() ) )
: d( new TextPagePrivate( TextEntity::List() ) )
{
}
TextPage::TextPage( const TextEntity::List &words )
: d( new Private( words ) )
: d( new TextPagePrivate( words ) )
{
}
......@@ -309,7 +296,7 @@ RegularAreaRect* TextPage::findText( int searchID, const QString &query, SearchD
}
RegularAreaRect* TextPage::Private::findTextInternalForward( int searchID, const QString &_query,
RegularAreaRect* TextPagePrivate::findTextInternalForward( int searchID, const QString &_query,
Qt::CaseSensitivity caseSensitivity,
const TextEntity::List::ConstIterator &start,
const TextEntity::List::ConstIterator &end )
......
......@@ -21,6 +21,7 @@ class QMatrix;
namespace Okular {
class NormalizedRect;
class TextPagePrivate;
class TextSelection;
class RegularAreaRect;
......@@ -143,8 +144,7 @@ class OKULAR_EXPORT TextPage
void transform( const QMatrix &matrix );
private:
class Private;
Private* const d;
TextPagePrivate* const d;
Q_DISABLE_COPY( TextPage )
};
......
/***************************************************************************
* Copyright (C) 2006 by Tobias Koenig <tokoe@kde.org> *
* Copyright (C) 2007 by Pino Toscano <pino@kde.org> *
* *
* 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 *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#ifndef _OKULAR_TEXTPAGE_P_H_
#define _OKULAR_TEXTPAGE_P_H_
#include <QtCore/QMap>
#include <QtGui/QMatrix>
#include "textpage.h"
class SearchPoint;
namespace Okular
{
class TextPagePrivate
{
public:
TextPagePrivate( const TextEntity::List &words );
~TextPagePrivate();
RegularAreaRect * findTextInternalForward( int searchID, const QString &query,
Qt::CaseSensitivity caseSensitivity,
const TextEntity::List::ConstIterator &start,
const TextEntity::List::ConstIterator &end );
TextEntity::List m_words;
QMap< int, SearchPoint* > m_searchPoints;
QMatrix m_transformMatrix;
};
}
#endif
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