~ubuntu-branches/ubuntu/maverick/kdegraphics/maverick-proposed

« back to all changes in this revision

Viewing changes to okular/core/annotations.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Thomas
  • Date: 2009-12-02 14:03:43 UTC
  • mfrom: (1.1.35 upstream)
  • Revision ID: james.westby@ubuntu.com-20091202140343-2732gbkj69g89arq
Tags: 4:4.3.80-0ubuntu1
* New upstream beta release:
  - Add build-depend on shared-desktop-ontologies for nepomuk integration
  - Bump .so versions for libkexiv, libkdcraw and libkipi
  - Update various .install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
763
763
    if ( d->m_style.color().isValid() )
764
764
        e.setAttribute( "color", d->m_style.color().name() );
765
765
    if ( d->m_style.opacity() != 1.0 )
766
 
        e.setAttribute( "opacity", d->m_style.opacity() );
 
766
        e.setAttribute( "opacity", QString::number( d->m_style.opacity() ) );
767
767
 
768
768
    // Sub-Node-1 - boundary
769
769
    QDomElement bE = document.createElement( "boundary" );
770
770
    e.appendChild( bE );
771
 
    bE.setAttribute( "l", (double)d->m_boundary.left );
772
 
    bE.setAttribute( "t", (double)d->m_boundary.top );
773
 
    bE.setAttribute( "r", (double)d->m_boundary.right );
774
 
    bE.setAttribute( "b", (double)d->m_boundary.bottom );
 
771
    bE.setAttribute( "l", QString::number( d->m_boundary.left ) );
 
772
    bE.setAttribute( "t", QString::number( d->m_boundary.top ) );
 
773
    bE.setAttribute( "r", QString::number( d->m_boundary.right ) );
 
774
    bE.setAttribute( "b", QString::number( d->m_boundary.bottom ) );
775
775
 
776
776
    // Sub-Node-2 - penStyle
777
777
    if ( d->m_style.width() != 1 || d->m_style.lineStyle() != Solid || d->m_style.xCorners() != 0 ||
779
779
    {
780
780
        QDomElement psE = document.createElement( "penStyle" );
781
781
        e.appendChild( psE );
782
 
        psE.setAttribute( "width", d->m_style.width() );
 
782
        psE.setAttribute( "width", QString::number( d->m_style.width() ) );
783
783
        psE.setAttribute( "style", (int)d->m_style.lineStyle() );
784
 
        psE.setAttribute( "xcr", d->m_style.xCorners() );
785
 
        psE.setAttribute( "ycr", d->m_style.yCorners() );
 
784
        psE.setAttribute( "xcr", QString::number( d->m_style.xCorners() ) );
 
785
        psE.setAttribute( "ycr", QString::number( d->m_style.yCorners() ) );
786
786
        psE.setAttribute( "marks", d->m_style.marks() );
787
787
        psE.setAttribute( "spaces", d->m_style.spaces() );
788
788
    }
793
793
        QDomElement peE = document.createElement( "penEffect" );
794
794
        e.appendChild( peE );
795
795
        peE.setAttribute( "effect", (int)d->m_style.lineEffect() );
796
 
        peE.setAttribute( "intensity", d->m_style.effectIntensity() );
 
796
        peE.setAttribute( "intensity", QString::number( d->m_style.effectIntensity() ) );
797
797
    }
798
798
 
799
799
    // Sub-Node-4 - window
803
803
        QDomElement wE = document.createElement( "window" );
804
804
        e.appendChild( wE );
805
805
        wE.setAttribute( "flags", d->m_window.flags() );
806
 
        wE.setAttribute( "top", d->m_window.topLeft().x );
807
 
        wE.setAttribute( "left", d->m_window.topLeft().y );
 
806
        wE.setAttribute( "top", QString::number( d->m_window.topLeft().x ) );
 
807
        wE.setAttribute( "left", QString::number( d->m_window.topLeft().y ) );
808
808
        wE.setAttribute( "width", d->m_window.width() );
809
809
        wE.setAttribute( "height", d->m_window.height() );
810
810
        wE.setAttribute( "title", d->m_window.title() );
1105
1105
    {
1106
1106
        QDomElement calloutElement = document.createElement( "callout" );
1107
1107
        textElement.appendChild( calloutElement );
1108
 
        calloutElement.setAttribute( "ax", d->m_inplaceCallout[0].x );
1109
 
        calloutElement.setAttribute( "ay", d->m_inplaceCallout[0].y );
1110
 
        calloutElement.setAttribute( "bx", d->m_inplaceCallout[1].x );
1111
 
        calloutElement.setAttribute( "by", d->m_inplaceCallout[1].y );
1112
 
        calloutElement.setAttribute( "cx", d->m_inplaceCallout[2].x );
1113
 
        calloutElement.setAttribute( "cy", d->m_inplaceCallout[2].y );
 
1108
        calloutElement.setAttribute( "ax", QString::number( d->m_inplaceCallout[0].x ) );
 
1109
        calloutElement.setAttribute( "ay", QString::number( d->m_inplaceCallout[0].y ) );
 
1110
        calloutElement.setAttribute( "bx", QString::number( d->m_inplaceCallout[1].x ) );
 
1111
        calloutElement.setAttribute( "by", QString::number( d->m_inplaceCallout[1].y ) );
 
1112
        calloutElement.setAttribute( "cx", QString::number( d->m_inplaceCallout[2].x ) );
 
1113
        calloutElement.setAttribute( "cy", QString::number( d->m_inplaceCallout[2].y ) );
1114
1114
    }
1115
1115
}
1116
1116
 
1388
1388
    if ( d->m_lineInnerColor.isValid() )
1389
1389
        lineElement.setAttribute( "innerColor", d->m_lineInnerColor.name() );
1390
1390
    if ( d->m_lineLeadingFwdPt != 0.0 )
1391
 
        lineElement.setAttribute( "leadFwd", d->m_lineLeadingFwdPt );
 
1391
        lineElement.setAttribute( "leadFwd", QString::number( d->m_lineLeadingFwdPt ) );
1392
1392
    if ( d->m_lineLeadingBackPt != 0.0 )
1393
 
        lineElement.setAttribute( "leadBack", d->m_lineLeadingBackPt );
 
1393
        lineElement.setAttribute( "leadBack", QString::number( d->m_lineLeadingBackPt ) );
1394
1394
    if ( d->m_lineShowCaption )
1395
1395
        lineElement.setAttribute( "showCaption", d->m_lineShowCaption );
1396
1396
    if ( d->m_lineIntent != Unknown )
1406
1406
            const NormalizedPoint & p = *it;
1407
1407
            QDomElement pElement = document.createElement( "point" );
1408
1408
            lineElement.appendChild( pElement );
1409
 
            pElement.setAttribute( "x", p.x );
1410
 
            pElement.setAttribute( "y", p.y );
 
1409
            pElement.setAttribute( "x", QString::number( p.x ) );
 
1410
            pElement.setAttribute( "y", QString::number( p.y ) );
1411
1411
            it++; //to avoid loop
1412
1412
        }
1413
1413
    }
1770
1770
        QDomElement quadElement = document.createElement( "quad" );
1771
1771
        hlElement.appendChild( quadElement );
1772
1772
        const Quad & q = *it;
1773
 
        quadElement.setAttribute( "ax", q.point( 0 ).x );
1774
 
        quadElement.setAttribute( "ay", q.point( 0 ).y );
1775
 
        quadElement.setAttribute( "bx", q.point( 1 ).x );
1776
 
        quadElement.setAttribute( "by", q.point( 1 ).y );
1777
 
        quadElement.setAttribute( "cx", q.point( 2 ).x );
1778
 
        quadElement.setAttribute( "cy", q.point( 2 ).y );
1779
 
        quadElement.setAttribute( "dx", q.point( 3 ).x );
1780
 
        quadElement.setAttribute( "dy", q.point( 3 ).y );
 
1773
        quadElement.setAttribute( "ax", QString::number( q.point( 0 ).x ) );
 
1774
        quadElement.setAttribute( "ay", QString::number( q.point( 0 ).y ) );
 
1775
        quadElement.setAttribute( "bx", QString::number( q.point( 1 ).x ) );
 
1776
        quadElement.setAttribute( "by", QString::number( q.point( 1 ).y ) );
 
1777
        quadElement.setAttribute( "cx", QString::number( q.point( 2 ).x ) );
 
1778
        quadElement.setAttribute( "cy", QString::number( q.point( 2 ).y ) );
 
1779
        quadElement.setAttribute( "dx", QString::number( q.point( 3 ).x ) );
 
1780
        quadElement.setAttribute( "dy", QString::number( q.point( 3 ).y ) );
1781
1781
        if ( q.capStart() )
1782
1782
            quadElement.setAttribute( "start", 1 );
1783
1783
        if ( q.capEnd() )
1784
1784
            quadElement.setAttribute( "end", 1 );
1785
 
        quadElement.setAttribute( "feather", q.feather() );
 
1785
        quadElement.setAttribute( "feather", QString::number( q.feather() ) );
1786
1786
    }
1787
1787
}
1788
1788
 
2014
2014
            const NormalizedPoint & point = *iIt;
2015
2015
            QDomElement pointElement = document.createElement( "point" );
2016
2016
            pathElement.appendChild( pointElement );
2017
 
            pointElement.setAttribute( "x", point.x );
2018
 
            pointElement.setAttribute( "y", point.y );
 
2017
            pointElement.setAttribute( "x", QString::number( point.x ) );
 
2018
            pointElement.setAttribute( "y", QString::number( point.y ) );
2019
2019
        }
2020
2020
    }
2021
2021
}