QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
pointcloud
qgspointcloudlayerundocommand.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgspointcloudlayerundocommand.h
3
---------------------
4
begin : January 2025
5
copyright : (C) 2025 by Stefanos Natsis
6
email : uclaros at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSPOINTCLOUDLAYERUNDOCOMMAND_H
17
#define QGSPOINTCLOUDLAYERUNDOCOMMAND_H
18
19
20
#include "qgis_core.h"
21
#include "
qgspointcloudattribute.h
"
22
#include "
qgspointcloudindex.h
"
23
24
#include <QUndoCommand>
25
26
#define SIP_NO_FILE
27
28
class
QgsPointCloudLayer
;
29
37
class
CORE_EXPORT
QgsPointCloudLayerUndoCommand
:
public
QUndoCommand
38
{
39
protected
:
41
QgsPointCloudLayerUndoCommand
(
QgsPointCloudLayer
*layer );
42
QgsPointCloudLayer
*
mLayer
;
43
};
44
52
class
CORE_EXPORT
QgsPointCloudLayerUndoCommandChangeAttribute
:
public
QgsPointCloudLayerUndoCommand
53
{
54
public
:
62
QgsPointCloudLayerUndoCommandChangeAttribute
(
QgsPointCloudLayer
*layer,
const
QHash<
int
, QHash<
QgsPointCloudNodeId
, QVector<int>>> &mappedPoints,
const
QgsPointCloudAttribute
&attribute,
double
value );
63
64
void
undo
()
override
;
65
void
redo
()
override
;
66
67
private
:
68
struct
PerNodeData
69
{
70
QHash<int, double> oldPointValues;
71
bool
firstEdit =
false
;
72
int
attributeOffset = 0;
73
};
74
75
struct
NodeProcessData
76
{
77
int
position;
78
QgsPointCloudIndex
index;
79
QgsPointCloudNodeId
nodeId;
80
QVector<int> points;
81
};
82
83
void
undoRedoPrivate(
bool
isUndo );
84
85
QMap<int, QHash<QgsPointCloudNodeId, PerNodeData>> mPerNodeData;
86
QgsPointCloudAttribute
mAttribute;
87
double
mNewValue = 0;
88
};
89
#endif
// QGSPOINTCLOUDLAYERUNDOCOMMAND_H
QgsPointCloudAttribute
Attribute for point cloud data pair of name and size in bytes.
Definition
qgspointcloudattribute.h:43
QgsPointCloudIndex
Smart pointer for QgsAbstractPointCloudIndex.
Definition
qgspointcloudindex.h:439
QgsPointCloudLayerUndoCommandChangeAttribute::undo
void undo() override
Definition
qgspointcloudlayerundocommand.cpp:105
QgsPointCloudLayerUndoCommandChangeAttribute::redo
void redo() override
Definition
qgspointcloudlayerundocommand.cpp:110
QgsPointCloudLayerUndoCommandChangeAttribute::QgsPointCloudLayerUndoCommandChangeAttribute
QgsPointCloudLayerUndoCommandChangeAttribute(QgsPointCloudLayer *layer, const QHash< int, QHash< QgsPointCloudNodeId, QVector< int > > > &mappedPoints, const QgsPointCloudAttribute &attribute, double value)
Constructor for QgsPointCloudLayerUndoCommandChangeAttribute.
Definition
qgspointcloudlayerundocommand.cpp:33
QgsPointCloudLayerUndoCommand::QgsPointCloudLayerUndoCommand
QgsPointCloudLayerUndoCommand(QgsPointCloudLayer *layer)
Ctor.
Definition
qgspointcloudlayerundocommand.cpp:29
QgsPointCloudLayerUndoCommand::mLayer
QgsPointCloudLayer * mLayer
Definition
qgspointcloudlayerundocommand.h:42
QgsPointCloudLayer
Represents a map layer supporting display of point clouds.
Definition
qgspointcloudlayer.h:49
QgsPointCloudNodeId
Represents an indexed point cloud node's position in octree.
Definition
qgspointcloudindex.h:56
qgspointcloudattribute.h
qgspointcloudindex.h
Generated on
for QGIS API Documentation by
1.17.0