30   QMap<int, QString> labels;
 
   42     if ( dim.name == wmsDimInfo.
name )
 
   47   mWmsDimensions.append( wmsDimInfo );
 
   53   for ( 
int i = 0; i < mWmsDimensions.size(); ++i )
 
   55     if ( mWmsDimensions[ i ].name == wmsDimName )
 
   57       mWmsDimensions.removeAt( i );
 
   66   return mWmsDimensions;
 
   73   const QDomNode wmsDimsNode = layer_node.namedItem( QStringLiteral( 
"wmsDimensions" ) );
 
   74   if ( !wmsDimsNode.isNull() )
 
   76     const QDomElement wmsDimsElem = wmsDimsNode.toElement();
 
   77     QDomNodeList wmsDimsList = wmsDimsElem.elementsByTagName( QStringLiteral( 
"dimension" ) );
 
   78     for ( 
int i = 0; i < wmsDimsList.size(); ++i )
 
   80       QDomElement dimElem = wmsDimsList.
at( i ).toElement();
 
   81       QString dimName = dimElem.attribute( QStringLiteral( 
"name" ) );
 
   82       QString dimFieldName = dimElem.attribute( QStringLiteral( 
"fieldName" ) );
 
   84       int dimFieldNameIndex = fields.
indexOf( dimFieldName );
 
   85       if ( dimFieldNameIndex == -1 )
 
   90       int dimDefaultDisplayType = dimElem.attribute( QStringLiteral( 
"defaultDisplayType" ) ).toInt();
 
   93         QString dimRefValueStr = dimElem.attribute( QStringLiteral( 
"referenceValue" ) );
 
   94         if ( !dimRefValueStr.isEmpty() )
 
   96           QgsField dimField = fields.
at( dimFieldNameIndex );
 
   97           dimRefValue = QVariant( dimRefValueStr );
 
  105           dimElem.attribute( QStringLiteral( 
"endFieldName" ) ),
 
  106           dimElem.attribute( QStringLiteral( 
"units" ) ),
 
  107           dimElem.attribute( QStringLiteral( 
"unitSymbol" ) ),
 
  108           dimDefaultDisplayType, dimRefValue );
 
  117   if ( mWmsDimensions.size() > 0 )
 
  119     QDomElement wmsDimsElem = document.createElement( QStringLiteral( 
"wmsDimensions" ) );
 
  122       QDomElement dimElem = document.createElement( QStringLiteral( 
"dimension" ) );
 
  123       dimElem.setAttribute( QStringLiteral( 
"name" ), dim.name );
 
  124       dimElem.setAttribute( QStringLiteral( 
"fieldName" ), dim.fieldName );
 
  125       dimElem.setAttribute( QStringLiteral( 
"endFieldName" ), dim.endFieldName );
 
  126       dimElem.setAttribute( QStringLiteral( 
"units" ), dim.units );
 
  127       dimElem.setAttribute( QStringLiteral( 
"unitSymbol" ), dim.unitSymbol );
 
  128       dimElem.setAttribute( QStringLiteral( 
"defaultDisplayType" ), dim.defaultDisplayType );
 
  129       dimElem.setAttribute( QStringLiteral( 
"referenceValue" ), dim.referenceValue.toString() );
 
  130       wmsDimsElem.appendChild( dimElem );
 
  132     layer_node.appendChild( wmsDimsElem );