Skip to content
Permalink
Browse files

Add element to group composer templates in WMS capabilities

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15082 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Jan 26, 2011
1 parent 12f2691 commit 46ceae5457a589f4cc775ab684c360f46a71e8e0
Showing with 12 additions and 4 deletions.
  1. +12 −4 src/mapserver/qgsprojectparser.cpp
@@ -951,6 +951,16 @@ void QgsProjectParser::printCapabilities( QDomElement& parentElement, QDomDocume
}

QDomNodeList composerNodeList = mXMLDoc->elementsByTagName( "Composer" );
if ( composerNodeList.size() < 1 )
{
return;
}

QDomElement composerTemplatesElem = doc.createElement( "ComposerTemplates" );
composerTemplatesElem.setAttribute( "xmlns:wms", "http://www.opengis.net/wms" );
composerTemplatesElem.setAttribute( "xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance" );
composerTemplatesElem.setAttribute( "xsi:type", "wms:_ExtendedCapabilities" );

for ( int i = 0; i < composerNodeList.size(); ++i )
{
QDomElement composerTemplateElem = doc.createElement( "ComposerTemplate" );
@@ -961,9 +971,6 @@ void QgsProjectParser::printCapabilities( QDomElement& parentElement, QDomDocume
}

composerTemplateElem.setAttribute( "name", currentComposerElem.attribute( "title" ) );
composerTemplateElem.setAttribute( "xmlns:wms", "http://www.opengis.net/wms" );
composerTemplateElem.setAttribute( "xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance" );
composerTemplateElem.setAttribute( "xsi:type", "wms:_ExtendedCapabilities" );

//get paper width and hight in mm from composition
QDomElement compositionElem = currentComposerElem.firstChildElement( "Composition" );
@@ -1008,8 +1015,9 @@ void QgsProjectParser::printCapabilities( QDomElement& parentElement, QDomDocume
composerTemplateElem.appendChild( composerLabelElem );
}

parentElement.appendChild( composerTemplateElem );
composerTemplatesElem.appendChild( composerTemplateElem );
}
parentElement.appendChild( composerTemplatesElem );
}

QDomElement QgsProjectParser::composerByName( const QString& composerName ) const

0 comments on commit 46ceae5

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