Skip to content
Permalink
Browse files

Add point cloud layer icon in the map layer model

  • Loading branch information
nirvn committed Feb 7, 2021
1 parent fd56251 commit e82df36c0d7c0048916dafae66cff0e27f5d5a2f
@@ -620,7 +620,7 @@ Returns icon for mesh layer type
%Docstring
Returns icon for vector tile layer
%End
static QIcon iconPointCloudLayer();
static QIcon iconPointCloud();
%Docstring
Returns icon for point cloud layer
%End
@@ -213,7 +213,7 @@ QVariant QgsLayerTreeModel::data( const QModelIndex &index, int role ) const
break;

case QgsMapLayerType::PointCloudLayer:
icon = QgsLayerItem::iconPointCloudLayer();
icon = QgsLayerItem::iconPointCloud();
break;

case QgsMapLayerType::VectorLayer:
@@ -106,7 +106,7 @@ QIcon QgsLayerItem::iconVectorTile()
return QgsApplication::getThemeIcon( QStringLiteral( "/mIconVectorTileLayer.svg" ) );
}

QIcon QgsLayerItem::iconPointCloudLayer()
QIcon QgsLayerItem::iconPointCloud()
{
return QgsApplication::getThemeIcon( QStringLiteral( "/mIconPointCloudLayer.svg" ) );
}
@@ -645,7 +645,7 @@ class CORE_EXPORT QgsLayerItem : public QgsDataItem
//! Returns icon for vector tile layer
static QIcon iconVectorTile();
//! Returns icon for point cloud layer
static QIcon iconPointCloudLayer();
static QIcon iconPointCloud();
//! \returns the layer name
virtual QString layerName() const { return name(); }
};
@@ -527,6 +527,11 @@ QIcon QgsMapLayerModel::iconForLayer( QgsMapLayer *layer )
return QgsLayerItem::iconVectorTile();
}

case QgsMapLayerType::PointCloudLayer:
{
return QgsLayerItem::iconPointCloud();
}

case QgsMapLayerType::VectorLayer:
{
QgsVectorLayer *vl = qobject_cast<QgsVectorLayer *>( layer );
@@ -559,6 +564,7 @@ QIcon QgsMapLayerModel::iconForLayer( QgsMapLayer *layer )
}
}
}

default:
{
return QIcon();

0 comments on commit e82df36

Please sign in to comment.