18#ifndef QGSPOINTCLOUDCLASSIFIEDRENDERERWIDGET_H
19#define QGSPOINTCLOUDCLASSIFIEDRENDERERWIDGET_H
23#include "ui_qgspointcloudclassifiedrendererwidgetbase.h"
32class QgsPointCloud3DLayer3DRenderer;
38class GUI_EXPORT QgsPointCloudClassifiedRendererModel :
public QAbstractItemModel
42 QgsPointCloudClassifiedRendererModel( QObject *parent =
nullptr );
43 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
44 Qt::DropActions supportedDropActions()
const override;
45 QVariant data(
const QModelIndex &index,
int role )
const override;
46 bool setData(
const QModelIndex &index,
const QVariant &value,
int role )
override;
47 QVariant headerData(
int section, Qt::Orientation orientation,
int role )
const override;
48 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
49 int columnCount(
const QModelIndex & = QModelIndex() )
const override;
50 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex() )
const override;
51 QModelIndex parent(
const QModelIndex &index )
const override;
52 QStringList mimeTypes()
const override;
53 QMimeData *mimeData(
const QModelIndexList &indexes )
const override;
54 bool dropMimeData(
const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent )
override;
60 void deleteRows( QList<int> rows );
65 void setCategoryColor(
int row,
const QColor &color );
66 void setCategoryPointSize(
int row,
double size );
68 void updateCategoriesPercentages(
const QMap< int, float > &percentages ) { mPercentages = percentages; };
71 void categoriesChanged();
75 QMap< int, float > mPercentages;
83class QgsPointCloudClassifiedRendererViewStyle:
public QgsProxyStyle
88 explicit QgsPointCloudClassifiedRendererViewStyle( QWidget *parent );
90 void drawPrimitive( PrimitiveElement element,
const QStyleOption *option, QPainter *painter,
const QWidget *widget =
nullptr )
const override;
94class GUI_EXPORT QgsPointCloudClassifiedRendererWidget:
public QgsPointCloudRendererWidget,
private Ui::QgsPointCloudClassifiedRendererWidgetBase
119 void addCategories();
120 void emitWidgetChanged();
121 void categoriesDoubleClicked(
const QModelIndex &idx );
123 void deleteCategories();
124 void deleteAllCategories();
125 void attributeChanged();
126 void changeCategoryColor();
127 void changeCategoryOpacity();
128 void changeCategoryPointSize();
133 QList<int> selectedCategories();
135 int currentCategoryRow();
137 void updateCategoriesPercentages();
139 QgsPointCloudClassifiedRendererModel *mModel =
nullptr;
140 bool mBlockChangedSignal =
false;
141 QMenu *contextMenu =
nullptr;
Represents an individual category (class) from a QgsPointCloudClassifiedRenderer.
Renders point clouds by a classification attribute.
Represents a map layer supporting display of point clouds.
Abstract base class for 2d point cloud renderers.
A QProxyStyle subclass which correctly sets the base style to match the QGIS application style,...
QList< QgsPointCloudCategory > QgsPointCloudCategoryList