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 );
67 void updateCategoriesPercentages(
const QMap< int, float > &percentages ) { mPercentages = percentages; };
70 void categoriesChanged();
74 QMap< int, float > mPercentages;
82class QgsPointCloudClassifiedRendererViewStyle:
public QgsProxyStyle
87 explicit QgsPointCloudClassifiedRendererViewStyle( QWidget *parent );
89 void drawPrimitive( PrimitiveElement element,
const QStyleOption *option, QPainter *painter,
const QWidget *widget =
nullptr )
const override;
93class GUI_EXPORT QgsPointCloudClassifiedRendererWidget:
public QgsPointCloudRendererWidget,
private Ui::QgsPointCloudClassifiedRendererWidgetBase
118 void addCategories();
119 void emitWidgetChanged();
120 void categoriesDoubleClicked(
const QModelIndex &idx );
122 void deleteCategories();
123 void deleteAllCategories();
124 void attributeChanged();
128 void changeCategorySymbol();
130 QList<int> selectedCategories();
132 int currentCategoryRow();
134 void updateCategoriesPercentages();
136 QgsPointCloudClassifiedRendererModel *mModel =
nullptr;
137 bool mBlockChangedSignal =
false;
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