QGIS API Documentation 3.99.0-Master (7d2ca374f2d)
Loading...
Searching...
No Matches
qgspointcloudlayerproperties.h
Go to the documentation of this file.
1/***************************************************************************
2 qgspointcloudlayerproperties.h
3 --------------------------------------
4 Date : October 2020
5 Copyright : (C) 2020 by Nyall Dawson
6 Email : nyall dot dawson 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 QGSPOINTCLOUDLAYERPROPERTIES_H
17#define QGSPOINTCLOUDLAYERPROPERTIES_H
18
19#include "ui_qgspointcloudlayerpropertiesbase.h"
20
21#include "qgis_gui.h"
24
25#include <QAbstractTableModel>
26
27#define SIP_NO_FILE
28
29class QgsMapLayer;
30class QgsMapCanvas;
31class QgsMessageBar;
36class QgsLayerPropertiesGuiUtils;
37
39
40class QgsPointCloudAttributeStatisticsModel : public QAbstractTableModel
41{
42 Q_OBJECT
43
44 public:
45 enum Columns
46 {
47 Name,
48 Min,
49 Max,
50 Mean,
51 StDev
52 };
53
54 QgsPointCloudAttributeStatisticsModel( QgsPointCloudLayer *layer, QObject *parent );
55 int columnCount( const QModelIndex &parent = QModelIndex() ) const override;
56 int rowCount( const QModelIndex &parent = QModelIndex() ) const override;
57 QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const override;
58 QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const override;
59
60 private:
61 QgsPointCloudLayer *mLayer = nullptr;
62 QgsPointCloudAttributeCollection mAttributes;
63};
64
65class QgsPointCloudClassificationStatisticsModel : public QAbstractTableModel
66{
67 Q_OBJECT
68
69 public:
70 enum Columns
71 {
72 Value,
73 Classification,
74 Count,
75 Percent
76 };
77
78 QgsPointCloudClassificationStatisticsModel( QgsPointCloudLayer *layer, const QString &attribute, QObject *parent );
79 int columnCount( const QModelIndex &parent = QModelIndex() ) const override;
80 int rowCount( const QModelIndex &parent = QModelIndex() ) const override;
81 QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const override;
82 QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const override;
83
84 private:
85 QgsPointCloudLayer *mLayer = nullptr;
86 QString mAttribute;
87 QList<int> mClassifications;
88};
89
91
98class GUI_EXPORT QgsPointCloudLayerProperties : public QgsLayerPropertiesDialog, private Ui::QgsPointCloudLayerPropertiesBase
99{
100 Q_OBJECT
101 public:
103 QgsPointCloudLayerProperties( QgsPointCloudLayer *lyr, QgsMapCanvas *canvas, QgsMessageBar *messageBar, QWidget *parent = nullptr, Qt::WindowFlags = QgsGuiUtils::ModalDialogFlags );
104
105 protected slots:
106 void apply() final;
107 void rollback() final;
108
109 private slots:
110
111 void aboutToShowStyleMenu();
112 void showHelp();
113 void pbnQueryBuilder_clicked();
114 void crsChanged( const QgsCoordinateReferenceSystem &crs );
115
116 private:
117 void syncToLayer() final;
118
119 private:
120 QgsPointCloudLayer *mLayer = nullptr;
121
122 QAction *mActionLoadMetadata = nullptr;
123 QAction *mActionSaveMetadataAs = nullptr;
124
125 QgsMetadataWidget *mMetadataWidget = nullptr;
126
127 QgsCoordinateReferenceSystem mBackupCrs;
128};
129
130#endif // QGSPOINTCLOUDLAYERPROPERTIES_H
Base class for "layer properties" dialogs, containing common utilities for handling functionality in ...
virtual void apply()=0
Applies the dialog settings to the layer.
Map canvas is a class for displaying all GIS data types on a canvas.
Factory class for creating custom map layer property pages.
A panel widget that can be shown in the map style dock.
Base class for all map layer types.
Definition qgsmaplayer.h:83
A bar for displaying non-blocking messages to the user.
A wizard to edit metadata on a map layer.
Represents a map layer supporting display of point clouds.