move modifyAnnotation to the private class

svn path=/trunk/KDE/kdegraphics/okular/; revision=655132
remotes/origin/KDE/4.0
Pino Toscano 19 years ago
parent 55a06c9b00
commit 3f84c8ccad
  1. 2
      core/document.cpp
  2. 6
      core/page.cpp
  3. 8
      core/page.h
  4. 8
      core/page_p.h

@ -1419,7 +1419,7 @@ void Document::modifyPageAnnotation( int page, Annotation * newannotation )
if ( !d->m_generator || !kp )
return;
kp->modifyAnnotation( newannotation );
kp->d->modifyAnnotation( newannotation );
// notify observers about the change
foreachObserver( notifyPageChanged( page, DocumentObserver::Annotations ) );
}

@ -488,12 +488,12 @@ void Page::addAnnotation( Annotation * annotation )
m_rects.append( rect );
}
void Page::modifyAnnotation(Annotation * newannotation )
void PagePrivate::modifyAnnotation(Annotation * newannotation )
{
if(!newannotation)
return;
QLinkedList< Annotation * >::iterator aIt = m_annotations.begin(), aEnd = m_annotations.end();
QLinkedList< Annotation * >::iterator aIt = m_page->m_annotations.begin(), aEnd = m_page->m_annotations.end();
for ( ; aIt != aEnd; ++aIt )
{
if((*aIt)==newannotation)
@ -501,7 +501,7 @@ void Page::modifyAnnotation(Annotation * newannotation )
if((*aIt) && (*aIt)->uniqueName()==newannotation->uniqueName())
{
int rectfound = false;
QLinkedList< ObjectRect * >::iterator it = m_rects.begin(), end = m_rects.end();
QLinkedList< ObjectRect * >::iterator it = m_page->m_rects.begin(), end = m_page->m_rects.end();
for ( ; it != end && !rectfound; ++it )
if ( ( (*it)->objectType() == ObjectRect::OAnnotation ) && ( (*it)->object() == (*aIt) ) )
{

@ -277,13 +277,6 @@ class OKULAR_EXPORT Page
*/
void addAnnotation( Annotation * annotation );
/**
* Modifies an existing annotation by replacing it with a new @p annotation.
*
* The unique name is used to find the old annotation.
*/
void modifyAnnotation( Annotation * annotation );
/**
* Removes the @p annotation from the page.
*/
@ -342,6 +335,7 @@ class OKULAR_EXPORT Page
private:
PagePrivate* const d;
friend class PagePrivate;
friend class Document;
friend class DocumentPrivate;
/**

@ -25,6 +25,7 @@ class QDomNode;
namespace Okular {
class Annotation;
class FormField;
class HighlightAreaRect;
class Link;
@ -52,6 +53,13 @@ class PagePrivate
*/
void saveLocalContents( QDomNode & parentNode, QDomDocument & document ) const;
/**
* Modifies an existing annotation by replacing it with a new @p annotation.
*
* The unique name is used to find the old annotation.
*/
void modifyAnnotation( Annotation * annotation );
class PixmapObject
{
public:

Loading…
Cancel
Save