From 6195accba0d37c747bc7ff5567e9dfc2f143fdc2 Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Fri, 8 Apr 2005 15:35:54 +0000 Subject: [PATCH] CVS_SILENT cosmetic change. svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=404086 --- core/annotations.cpp | 12 ++++++------ core/annotations.h | 5 ++++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/core/annotations.cpp b/core/annotations.cpp index a44f686df..debc2b2bb 100644 --- a/core/annotations.cpp +++ b/core/annotations.cpp @@ -312,12 +312,12 @@ void Annotation::store( QDomNode & annNode, QDomDocument & document ) const /** TextAnnotation [Annotation] */ TextAnnotation::TextAnnotation() - : Annotation(), textType( Linked ), textFont(), textIcon( "Comment" ), + : Annotation(), textType( Linked ), textIcon( "Comment" ), inplaceAlign( 0 ), inplaceIntent( Unknown ) {} TextAnnotation::TextAnnotation( const QDomNode & node ) - : Annotation( node ), textType( Linked ), textFont(), textIcon( "Comment" ), + : Annotation( node ), textType( Linked ), textIcon( "Comment" ), inplaceAlign( 0 ), inplaceIntent( Unknown ) { // loop through the whole children looking for a 'text' element @@ -332,10 +332,10 @@ TextAnnotation::TextAnnotation( const QDomNode & node ) // parse the attributes if ( e.hasAttribute( "type" ) ) textType = (TextAnnotation::TextType)e.attribute( "type" ).toInt(); - if ( e.hasAttribute( "font" ) ) - textFont.fromString( e.attribute( "font" ) ); if ( e.hasAttribute( "icon" ) ) textIcon = e.attribute( "icon" ); + if ( e.hasAttribute( "font" ) ) + textFont.fromString( e.attribute( "font" ) ); if ( e.hasAttribute( "align" ) ) inplaceAlign = e.attribute( "align" ).toInt(); if ( e.hasAttribute( "intent" ) ) @@ -380,10 +380,10 @@ void TextAnnotation::store( QDomNode & node, QDomDocument & document ) const // store the optional attributes if ( textType != Linked ) textElement.setAttribute( "type", (int)textType ); - if ( textFont != QApplication::font() ) - textElement.setAttribute( "font", textFont.toString() ); if ( textIcon != "Comment" ) textElement.setAttribute( "icon", textIcon ); + if ( textFont != QApplication::font() ) + textElement.setAttribute( "font", textFont.toString() ); if ( inplaceAlign ) textElement.setAttribute( "align", inplaceAlign ); if ( inplaceIntent != Unknown ) diff --git a/core/annotations.h b/core/annotations.h index 4d7cdc8c7..6c95b2af0 100644 --- a/core/annotations.h +++ b/core/annotations.h @@ -40,6 +40,9 @@ class AnnotationUtils // parentNode or a null element if not found static QDomElement findChildElement( const QDomNode & parentNode, const QString & name ); + + //static inline QRect annotationGeometry( const Annotation * ann, + // int pageWidth, int pageHeight, int scaledWidth, int scaledHeight ) const; }; @@ -155,8 +158,8 @@ struct TextAnnotation : public Annotation // data fields TextType textType; // Linked - QFont textFont; // app def font QString textIcon; // 'Comment' + QFont textFont; // app def font int inplaceAlign; // 0:left, 1:center, 2:right QString inplaceText; // '' overrides contents NormalizedPoint inplaceCallout[3]; //