Skip to content

Commit

Permalink
Read / write map annotation format to xml
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Aug 9, 2012
1 parent fa57840 commit 70138fa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/composer/qgscomposermap.cpp
Expand Up @@ -711,6 +711,7 @@ bool QgsComposerMap::writeXML( QDomElement& elem, QDomDocument & doc ) const

//grid annotation
QDomElement annotationElem = doc.createElement( "Annotation" );
annotationElem.setAttribute( "format", mGridAnnotationFormat );
annotationElem.setAttribute( "show", mShowGridAnnotation );
annotationElem.setAttribute( "leftPosition", mLeftGridAnnotationPosition );
annotationElem.setAttribute( "rightPosition", mRightGridAnnotationPosition );
Expand Down Expand Up @@ -849,6 +850,7 @@ bool QgsComposerMap::readXML( const QDomElement& itemElem, const QDomDocument& d
{
QDomElement annotationElem = annotationNodeList.at( 0 ).toElement();
mShowGridAnnotation = ( annotationElem.attribute( "show", "0" ) != "0" );
mGridAnnotationFormat = QgsComposerMap::GridAnnotationFormat( annotationElem.attribute( "format", "0" ).toInt() );
mLeftGridAnnotationPosition = QgsComposerMap::GridAnnotationPosition( annotationElem.attribute( "leftPosition", "0" ).toInt() );
mRightGridAnnotationPosition = QgsComposerMap::GridAnnotationPosition( annotationElem.attribute( "rightPosition", "0" ).toInt() );
mTopGridAnnotationPosition = QgsComposerMap::GridAnnotationPosition( annotationElem.attribute( "topPosition", "0" ).toInt() );
Expand Down

0 comments on commit 70138fa

Please sign in to comment.