Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add point cloud layer icon in the map layer model
- Loading branch information
|
@@ -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(); |
|
|