Skip to content
Permalink
Browse files

added documentation on new wms layer class

  • Loading branch information
Samweli authored and nyalldawson committed Jan 7, 2020
1 parent 91604f1 commit bc0b42700571a4f97e56df253e91f356b256e480
Showing with 16 additions and 2 deletions.
  1. +6 −2 src/providers/wms/qgswmsdataitems.cpp
  2. +10 −0 src/providers/wms/qgswmsdataitems.h
@@ -251,8 +251,12 @@ QgsWMSLayerCollectionItem::QgsWMSLayerCollectionItem( QgsDataItem *parent, QStri
// Attention, the name may be empty
QgsDebugMsgLevel( QString::number( layerProperty.orderId ) + ' ' + layerProperty.name + ' ' + layerProperty.title, 2 );
QString pathName = layerProperty.name.isEmpty() ? QString::number( layerProperty.orderId ) : layerProperty.name;
QgsWMSLayerItem *layer = new QgsWMSLayerItem( this, layerProperty.title, mPath + '/' + pathName, mCapabilitiesProperty, dataSourceUri, layerProperty );
//mChildren.append( layer );

if ( layerProperty.name.isEmpty() )
layer = new QgsWMSLayerCollectionItem( this, layerProperty.title, mPath + '/' + pathName, capabilitiesProperty, dataSourceUri, layerProperty );
else
layer = new QgsWMSLayerItem( this, layerProperty.title, mPath + '/' + pathName, mCapabilitiesProperty, dataSourceUri, layerProperty );

addChildItem( layer );
}

@@ -41,6 +41,11 @@ class QgsWMSConnectionItem : public QgsDataCollectionItem
QgsWmsCapabilitiesDownload *mCapabilitiesDownload = nullptr;
};

/**
* \brief WMS Layer Collection.
*
* This collection contains a WMS Layer element that can enclose other layers
*/
class QgsWMSLayerCollectionItem : public QgsDataCollectionItem
{
Q_OBJECT
@@ -52,8 +57,13 @@ class QgsWMSLayerCollectionItem : public QgsDataCollectionItem

bool equal( const QgsDataItem *other ) override;

//! Stores GetCapabilities response
QgsWmsCapabilitiesProperty mCapabilitiesProperty;

//! Stores WMS connection information
QgsDataSourceUri mDataSourceUri;

//! WMS Layer properties, can be inherited by subsidiary layers
QgsWmsLayerProperty mLayerProperty;
};

0 comments on commit bc0b427

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