mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-12 00:02:25 -04:00
added documentation on new wms layer class
This commit is contained in:
parent
91604f1896
commit
bc0b427005
@ -251,8 +251,12 @@ QgsWMSLayerCollectionItem::QgsWMSLayerCollectionItem( QgsDataItem *parent, QStri
|
|||||||
// Attention, the name may be empty
|
// Attention, the name may be empty
|
||||||
QgsDebugMsgLevel( QString::number( layerProperty.orderId ) + ' ' + layerProperty.name + ' ' + layerProperty.title, 2 );
|
QgsDebugMsgLevel( QString::number( layerProperty.orderId ) + ' ' + layerProperty.name + ' ' + layerProperty.title, 2 );
|
||||||
QString pathName = layerProperty.name.isEmpty() ? QString::number( layerProperty.orderId ) : layerProperty.name;
|
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 );
|
addChildItem( layer );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,6 +41,11 @@ class QgsWMSConnectionItem : public QgsDataCollectionItem
|
|||||||
QgsWmsCapabilitiesDownload *mCapabilitiesDownload = nullptr;
|
QgsWmsCapabilitiesDownload *mCapabilitiesDownload = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief WMS Layer Collection.
|
||||||
|
*
|
||||||
|
* This collection contains a WMS Layer element that can enclose other layers
|
||||||
|
*/
|
||||||
class QgsWMSLayerCollectionItem : public QgsDataCollectionItem
|
class QgsWMSLayerCollectionItem : public QgsDataCollectionItem
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -52,8 +57,13 @@ class QgsWMSLayerCollectionItem : public QgsDataCollectionItem
|
|||||||
|
|
||||||
bool equal( const QgsDataItem *other ) override;
|
bool equal( const QgsDataItem *other ) override;
|
||||||
|
|
||||||
|
//! Stores GetCapabilities response
|
||||||
QgsWmsCapabilitiesProperty mCapabilitiesProperty;
|
QgsWmsCapabilitiesProperty mCapabilitiesProperty;
|
||||||
|
|
||||||
|
//! Stores WMS connection information
|
||||||
QgsDataSourceUri mDataSourceUri;
|
QgsDataSourceUri mDataSourceUri;
|
||||||
|
|
||||||
|
//! WMS Layer properties, can be inherited by subsidiary layers
|
||||||
QgsWmsLayerProperty mLayerProperty;
|
QgsWmsLayerProperty mLayerProperty;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user