Skip to content

Commit

Permalink
Explicitly capture this, fix docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
uclaros committed Jan 10, 2025
1 parent 3cb5582 commit 627f6aa
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/core/pointcloud/qgspointcloudlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ QgsPointCloudLayer::QgsPointCloudLayer( const QString &uri,
setLegend( QgsMapLayerLegend::defaultPointCloudLegend( this ) );
connect( this, &QgsPointCloudLayer::subsetStringChanged, this, &QgsMapLayer::configChanged );
connect( undoStack(), &QUndoStack::indexChanged, this, &QgsMapLayer::layerModified );
connect( this, &QgsMapLayer::layerModified, this, [ = ] { triggerRepaint(); } );
connect( this, &QgsMapLayer::layerModified, this, [this] { triggerRepaint(); } );
}

QgsPointCloudLayer::~QgsPointCloudLayer()
Expand Down
28 changes: 23 additions & 5 deletions src/core/pointcloud/qgspointcloudlayerundocommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,47 @@
#ifndef QGSPOINTCLOUDLAYERUNDOCOMMAND_H
#define QGSPOINTCLOUDLAYERUNDOCOMMAND_H

#define SIP_NO_FILE

#include "qgis_core.h"
#include "qgspointcloudindex.h"
#include "qgspointcloudattribute.h"

#include <QUndoCommand>

/**
* \ingroup core
*
* \brief Base class for undo/redo command for point cloud editing
*
* \since QGIS 3.42
*/
class CORE_EXPORT QgsPointCloudLayerUndoCommand : public QUndoCommand
{
public:
QgsPointCloudLayerUndoCommand( QgsPointCloudIndex index );

protected:
//! Ctor
QgsPointCloudLayerUndoCommand( QgsPointCloudIndex index );
QgsPointCloudIndex mIndex;
};

/**
* \ingroup core
*
* \brief An undo command subclass for changing point attribute values in a point cloud index
*
* \since QGIS 3.42
*/
class CORE_EXPORT QgsPointCloudLayerUndoCommandChangeAttribute : public QgsPointCloudLayerUndoCommand
{
public:

/**
* Constructor for QgsPointCloudLayerUndoCommandChangeAttribute
* \param buffer associated edit buffer
* \param f feature to add to layer
* \param index associated point cloud index
* \param n the node id whose points will be modified
* \param points the list of points to be modified
* \param attribute the attribute whose value will be modified
* \param value the new value for the modified attribure
*/
QgsPointCloudLayerUndoCommandChangeAttribute( QgsPointCloudIndex index, const QgsPointCloudNodeId &n, const QVector<int> &points, const QgsPointCloudAttribute &attribute, double value );

Expand Down

0 comments on commit 627f6aa

Please sign in to comment.