From kde-commits Fri Apr 08 15:35:55 2005 From: Enrico Ros Date: Fri, 08 Apr 2005 15:35:55 +0000 To: kde-commits Subject: kpdf_annotations: kdegraphics/kpdf/core (silent) Message-Id: <20050408153555.14A4163E () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=111297458622969 CVS commit by eros: CVS_SILENT cosmetic change. M +6 -6 annotations.cpp 1.2.2.13 M +4 -1 annotations.h 1.2.2.14 --- kdegraphics/kpdf/core/annotations.cpp #1.2.2.12:1.2.2.13 @@ -313,10 +313,10 @@ void Annotation::store( QDomNode & annNo 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 ) { @@ -333,8 +333,8 @@ TextAnnotation::TextAnnotation( const QD 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(); @@ -381,8 +381,8 @@ void TextAnnotation::store( QDomNode & n 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 ); --- kdegraphics/kpdf/core/annotations.h #1.2.2.13:1.2.2.14 @@ -41,4 +41,7 @@ class AnnotationUtils 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; }; @@ -156,6 +159,6 @@ struct TextAnnotation : public Annotatio // 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