Skip to content
Permalink
Browse files

Read / write map annotation format to xml

  • Loading branch information
mhugent committed Aug 9, 2012
1 parent fa57840 commit 70138fadfb8f24467cca9c3586136312fc53b6c1
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/core/composer/qgscomposermap.cpp
@@ -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 );
@@ -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() );

0 comments on commit 70138fa

Please sign in to comment.
You can’t perform that action at this time.