Skip to content

Commit

Permalink
Merge pull request #35408 from mhugent/server_project_settings_expanded
Browse files Browse the repository at this point in the history
Server project settings, add 'expanded' attribute
  • Loading branch information
mhugent committed Mar 30, 2020
2 parents f8897d8 + 934e30f commit 7523ec2
Show file tree
Hide file tree
Showing 21 changed files with 19 additions and 18 deletions.
Binary file not shown.
Binary file not shown.
Binary file modified python/plugins/processing/tests/testdata/custom/pol.gpkg
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions src/server/services/wms/qgswmsgetcapabilities.cpp
Expand Up @@ -891,6 +891,7 @@ namespace QgsWms
if ( projectSettings )
{
layerElem.setAttribute( QStringLiteral( "visible" ), treeNode->isVisible() );
layerElem.setAttribute( QStringLiteral( "expanded" ), treeNode->isExpanded() );
}

if ( treeNode->nodeType() == QgsLayerTreeNode::NodeGroup )
Expand Down
Binary file modified tests/testdata/curved_polys.gpkg
Binary file not shown.
Binary file modified tests/testdata/points_gpkg.gpkg
Binary file not shown.
Binary file modified tests/testdata/polys_overlapping_with_id.dbf
Binary file not shown.
Binary file modified tests/testdata/projects/communes.gpkg
Binary file not shown.
Binary file modified tests/testdata/provider/bug_17795.gpkg
Binary file not shown.
Binary file not shown.
Binary file modified tests/testdata/qgis_server/db.gpkg
Binary file not shown.
18 changes: 9 additions & 9 deletions tests/testdata/qgis_server/getprojectsettings.txt
Expand Up @@ -141,7 +141,7 @@ Content-Type: text/xml; charset=utf-8
<Keyword vocabulary="ISO">infoMapAccessService</Keyword>
</KeywordList>
<TreeName>QGIS Test Project</TreeName>
<Layer geometryType="Point" queryable="1" displayField="id" visible="1" opacity="1">
<Layer geometryType="Point" queryable="1" displayField="id" visible="1" opacity="1" expanded="1">
<Name>layer_with_short_name</Name>
<Title>A Layer with a short name</Title>
<Abstract>A Layer with an abstract</Abstract>
Expand Down Expand Up @@ -171,7 +171,7 @@ Content-Type: text/xml; charset=utf-8
<Attribute precision="0" type="QString" editType="TextEdit" typeName="String" name="utf8nameè" comment="" length="13"/>
</Attributes>
</Layer>
<Layer queryable="1" visible="1" opacity="1">
<Layer queryable="1" visible="1" opacity="1" expanded="0">
<Name>landsat</Name>
<Title>landsat</Title>
<CRS>CRS:84</CRS>
Expand All @@ -195,7 +195,7 @@ Content-Type: text/xml; charset=utf-8
</Style>
<TreeName>landsat</TreeName>
</Layer>
<Layer geometryType="Point" queryable="1" displayField="name" visible="1" opacity="1">
<Layer geometryType="Point" queryable="1" displayField="name" visible="1" opacity="1" expanded="1">
<Name>testlayer èé</Name>
<Title>A test vector layer</Title>
<Abstract>A test vector layer with unicode òà</Abstract>
Expand Down Expand Up @@ -225,7 +225,7 @@ Content-Type: text/xml; charset=utf-8
<Attribute precision="0" type="QString" editType="TextEdit" typeName="String" name="utf8nameè" comment="" length="13"/>
</Attributes>
</Layer>
<Layer geometryType="Point" queryable="1" displayField="alias_name" visible="1" opacity="1">
<Layer geometryType="Point" queryable="1" displayField="alias_name" visible="1" opacity="1" expanded="1">
<Name>fields_alias</Name>
<Title>A test vector layer</Title>
<Abstract>A test vector layer with unicode òà</Abstract>
Expand Down Expand Up @@ -255,7 +255,7 @@ Content-Type: text/xml; charset=utf-8
<Attribute precision="0" type="QString" editType="TextEdit" typeName="String" name="utf8nameè" comment="" length="13"/>
</Attributes>
</Layer>
<Layer geometryType="Point" queryable="1" displayField="name" visible="1" opacity="1">
<Layer geometryType="Point" queryable="1" displayField="name" visible="1" opacity="1" expanded="1">
<Name>exclude_attribute</Name>
<Title>A test vector layer</Title>
<Abstract>A test vector layer with unicode òà</Abstract>
Expand Down Expand Up @@ -284,7 +284,7 @@ Content-Type: text/xml; charset=utf-8
<Attribute precision="0" type="QString" editType="TextEdit" typeName="String" name="utf8nameè" comment="" length="13"/>
</Attributes>
</Layer>
<Layer mutuallyExclusive="0" visible="1" queryable="1">
<Layer mutuallyExclusive="0" visible="1" queryable="1" expanded="1">
<Name>group_name</Name>
<Title>Group title</Title>
<Abstract>Group abstract</Abstract>
Expand All @@ -300,7 +300,7 @@ Content-Type: text/xml; charset=utf-8
<BoundingBox maxy="5606025.239" maxx="913214.676" miny="5606011.456" CRS="EPSG:3857" minx="913204.911"/>
<BoundingBox maxy="8.203548" maxx="44.901483" miny="8.203459" CRS="EPSG:4326" minx="44.901394"/>
<TreeName>groupwithshortname</TreeName>
<Layer geometryType="Point" queryable="1" displayField="id" visible="1" opacity="1">
<Layer geometryType="Point" queryable="1" displayField="id" visible="1" opacity="1" expanded="1">
<Name>testlayer2</Name>
<Title>testlayer2</Title>
<CRS>CRS:84</CRS>
Expand Down Expand Up @@ -330,7 +330,7 @@ Content-Type: text/xml; charset=utf-8
</Attributes>
</Layer>
</Layer>
<Layer mutuallyExclusive="0" queryable="0" visible="1">
<Layer mutuallyExclusive="0" queryable="0" visible="1" expanded="1">
<Name>groupwithoutshortname</Name>
<Title>groupwithoutshortname</Title>
<CRS>CRS:84</CRS>
Expand All @@ -345,7 +345,7 @@ Content-Type: text/xml; charset=utf-8
<BoundingBox maxy="5606025.239" maxx="913214.676" miny="5606011.456" CRS="EPSG:3857" minx="913204.911"/>
<BoundingBox maxy="8.203548" maxx="44.901483" miny="8.203459" CRS="EPSG:4326" minx="44.901394"/>
<TreeName>groupwithoutshortname</TreeName>
<Layer geometryType="Point" queryable="0" displayField="name" visible="1" opacity="1">
<Layer geometryType="Point" queryable="0" displayField="name" visible="1" opacity="1" expanded="1">
<Name>testlayer3</Name>
<Title>testlayer3</Title>
<CRS>CRS:84</CRS>
Expand Down
18 changes: 9 additions & 9 deletions tests/testdata/qgis_server/getprojectsettings_opacity.txt
Expand Up @@ -141,7 +141,7 @@ Content-Type: text/xml; charset=utf-8
<Keyword vocabulary="ISO">infoMapAccessService</Keyword>
</KeywordList>
<TreeName>QGIS Test Project</TreeName>
<Layer geometryType="Point" queryable="1" displayField="id" visible="1" opacity="1">
<Layer geometryType="Point" queryable="1" displayField="id" visible="1" opacity="1" expanded="1">
<Name>layer_with_short_name</Name>
<Title>A Layer with a short name</Title>
<Abstract>A Layer with an abstract</Abstract>
Expand Down Expand Up @@ -171,7 +171,7 @@ Content-Type: text/xml; charset=utf-8
<Attribute precision="0" type="QString" editType="TextEdit" typeName="String" name="utf8nameè" comment="" length="13"/>
</Attributes>
</Layer>
<Layer queryable="1" visible="1" opacity="1">
<Layer queryable="1" visible="1" opacity="1" expanded="0">
<Name>landsat</Name>
<Title>landsat</Title>
<CRS>CRS:84</CRS>
Expand All @@ -195,7 +195,7 @@ Content-Type: text/xml; charset=utf-8
</Style>
<TreeName>landsat</TreeName>
</Layer>
<Layer geometryType="Point" queryable="1" displayField="name" visible="1" opacity="0.5">
<Layer geometryType="Point" queryable="1" displayField="name" visible="1" opacity="0.5" expanded="1">
<Name>testlayer èé</Name>
<Title>A test vector layer</Title>
<Abstract>A test vector layer with unicode òà</Abstract>
Expand Down Expand Up @@ -225,7 +225,7 @@ Content-Type: text/xml; charset=utf-8
<Attribute precision="0" type="QString" editType="TextEdit" typeName="String" name="utf8nameè" comment="" length="13"/>
</Attributes>
</Layer>
<Layer geometryType="Point" queryable="1" displayField="alias_name" visible="1" opacity="1">
<Layer geometryType="Point" queryable="1" displayField="alias_name" visible="1" opacity="1" expanded="1">
<Name>fields_alias</Name>
<Title>A test vector layer</Title>
<Abstract>A test vector layer with unicode òà</Abstract>
Expand Down Expand Up @@ -255,7 +255,7 @@ Content-Type: text/xml; charset=utf-8
<Attribute precision="0" type="QString" editType="TextEdit" typeName="String" name="utf8nameè" comment="" length="13"/>
</Attributes>
</Layer>
<Layer geometryType="Point" queryable="1" displayField="name" visible="1" opacity="1">
<Layer geometryType="Point" queryable="1" displayField="name" visible="1" opacity="1" expanded="1">
<Name>exclude_attribute</Name>
<Title>A test vector layer</Title>
<Abstract>A test vector layer with unicode òà</Abstract>
Expand Down Expand Up @@ -284,7 +284,7 @@ Content-Type: text/xml; charset=utf-8
<Attribute precision="0" type="QString" editType="TextEdit" typeName="String" name="utf8nameè" comment="" length="13"/>
</Attributes>
</Layer>
<Layer mutuallyExclusive="0" visible="1" queryable="1">
<Layer mutuallyExclusive="0" visible="1" queryable="1" expanded="1">
<Name>group_name</Name>
<Title>Group title</Title>
<Abstract>Group abstract</Abstract>
Expand All @@ -300,7 +300,7 @@ Content-Type: text/xml; charset=utf-8
<BoundingBox maxy="5606025.239" maxx="913214.676" miny="5606011.456" CRS="EPSG:3857" minx="913204.911"/>
<BoundingBox maxy="8.203548" maxx="44.901483" miny="8.203459" CRS="EPSG:4326" minx="44.901394"/>
<TreeName>groupwithshortname</TreeName>
<Layer geometryType="Point" queryable="1" displayField="id" visible="1" opacity="1">
<Layer geometryType="Point" queryable="1" displayField="id" visible="1" opacity="1" expanded="1">
<Name>testlayer2</Name>
<Title>testlayer2</Title>
<CRS>CRS:84</CRS>
Expand Down Expand Up @@ -330,7 +330,7 @@ Content-Type: text/xml; charset=utf-8
</Attributes>
</Layer>
</Layer>
<Layer mutuallyExclusive="0" queryable="0" visible="1">
<Layer mutuallyExclusive="0" queryable="0" visible="1" expanded="1">
<Name>groupwithoutshortname</Name>
<Title>groupwithoutshortname</Title>
<CRS>CRS:84</CRS>
Expand All @@ -345,7 +345,7 @@ Content-Type: text/xml; charset=utf-8
<BoundingBox maxy="5606025.239" maxx="913214.676" miny="5606011.456" CRS="EPSG:3857" minx="913204.911"/>
<BoundingBox maxy="8.203548" maxx="44.901483" miny="8.203459" CRS="EPSG:4326" minx="44.901394"/>
<TreeName>groupwithoutshortname</TreeName>
<Layer geometryType="Point" queryable="0" displayField="name" visible="1" opacity="0.8">
<Layer geometryType="Point" queryable="0" displayField="name" visible="1" opacity="0.8" expanded="1">
<Name>testlayer3</Name>
<Title>testlayer3</Title>
<CRS>CRS:84</CRS>
Expand Down
Binary file modified tests/testdata/qgis_server/test_project_wms_filter.gpkg
Binary file not shown.
Binary file modified tests/testdata/qgis_server/test_project_wms_grouped_layers.gpkg
Binary file not shown.
Binary file not shown.
Binary file modified tests/testdata/qgis_server_accesscontrol/dimensions.gpkg
Binary file not shown.
Binary file modified tests/testdata/qgis_server_accesscontrol/geo.gpkg
Binary file not shown.

0 comments on commit 7523ec2

Please sign in to comment.