From d3ce30262914d488de4bc1a1475596d341dc0e37 Mon Sep 17 00:00:00 2001 From: uclaros Date: Fri, 20 Dec 2024 13:37:03 +0200 Subject: [PATCH] Fix docstrings, thread access macro --- src/core/pointcloud/qgspointcloudeditingindex.h | 6 +++++- src/core/pointcloud/qgspointcloudlayer.cpp | 2 +- src/core/pointcloud/qgspointcloudlayer.h | 10 ++++++++++ src/core/pointcloud/qgspointcloudlayereditutils.h | 14 +++++++++++++- 4 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/core/pointcloud/qgspointcloudeditingindex.h b/src/core/pointcloud/qgspointcloudeditingindex.h index a600ef8b4ef..d03e4917a89 100644 --- a/src/core/pointcloud/qgspointcloudeditingindex.h +++ b/src/core/pointcloud/qgspointcloudeditingindex.h @@ -24,9 +24,13 @@ class QgsPointCloudLayer; /** - * The QgsPointCloudEditingIndex class is a QgsPointCloudIndex that is used as an editing + * \ingroup core + * + * \brief The QgsPointCloudEditingIndex class is a QgsPointCloudIndex that is used as an editing * buffer when editing point cloud data. * + * \note Not available in Python bindings + * * \since QGIS 3.42 */ class CORE_EXPORT QgsPointCloudEditingIndex : public QgsPointCloudIndex diff --git a/src/core/pointcloud/qgspointcloudlayer.cpp b/src/core/pointcloud/qgspointcloudlayer.cpp index 140ec241115..26473f42a80 100644 --- a/src/core/pointcloud/qgspointcloudlayer.cpp +++ b/src/core/pointcloud/qgspointcloudlayer.cpp @@ -1081,7 +1081,7 @@ bool QgsPointCloudLayer::changeAttributeValue( const QgsPointCloudNodeId &n, con QgsPointCloudIndex *QgsPointCloudLayer::index() const { - QGIS_PROTECT_QOBJECT_THREAD_ACCESS + QGIS_PROTECT_QOBJECT_THREAD_ACCESS_NON_FATAL if ( mEditIndex ) return mEditIndex.get(); diff --git a/src/core/pointcloud/qgspointcloudlayer.h b/src/core/pointcloud/qgspointcloudlayer.h index 19ccf9c56cf..5ba9d13ffe6 100644 --- a/src/core/pointcloud/qgspointcloudlayer.h +++ b/src/core/pointcloud/qgspointcloudlayer.h @@ -319,6 +319,16 @@ class CORE_EXPORT QgsPointCloudLayer : public QgsMapLayer, public QgsAbstractPro */ bool changeAttributeValue( const QgsPointCloudNodeId &n, const QVector &points, const QgsPointCloudAttribute &attribute, double value ) SIP_SKIP; + /** + * Returns the point cloud index associated with the layer. + * If the layer is editable, its QgsPointCloudEditingIndex is returned, + * otherwise the index is fetched from the data provider. + * + * Can be nullptr (e.g. the index is being created) + * + * \note Not available in Python bindings + * \since QGIS 3.42 + */ QgsPointCloudIndex *index() const SIP_SKIP; diff --git a/src/core/pointcloud/qgspointcloudlayereditutils.h b/src/core/pointcloud/qgspointcloudlayereditutils.h index acaaf796ad4..783a3fa61b1 100644 --- a/src/core/pointcloud/qgspointcloudlayereditutils.h +++ b/src/core/pointcloud/qgspointcloudlayereditutils.h @@ -16,6 +16,8 @@ #ifndef QGSPOINTCLOUDLAYEREDITUTILS_H #define QGSPOINTCLOUDLAYEREDITUTILS_H +#include "qgis_core.h" + #include #include @@ -28,9 +30,19 @@ class QgsPointCloudAttribute; class QgsPointCloudAttributeCollection; class QgsPointCloudRequest; -class QgsPointCloudLayerEditUtils +/** + * \ingroup core + * + * \brief Contains utility functions for editing point cloud layers. + * + * \note Not available in Python bindings + * + * \since QGIS 3.42 + */ +class CORE_EXPORT QgsPointCloudLayerEditUtils { public: + //! Ctor QgsPointCloudLayerEditUtils( QgsPointCloudLayer *layer ); /**