QGIS API Documentation 3.41.0-Master (d2aaa9c6e02)
Loading...
Searching...
No Matches
qgspointcloudrendererpropertieswidget.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgspointcloudrendererpropertieswidget.cpp
3 ---------------------
4 begin : November 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 ***************************************************************************/
16#include "moc_qgspointcloudrendererpropertieswidget.cpp"
17
18#include "qgis.h"
19#include "qgsapplication.h"
20#include "qgsfontbutton.h"
21#include "qgslogger.h"
26#include "qgspointcloudlayer.h"
31#include "qgsproject.h"
32#include "qgsprojectutils.h"
33#include "qgsstyle.h"
35#include "qgstextformatwidget.h"
36#include "qgsvirtualpointcloudprovider.h"
37
38static bool initPointCloudRenderer( const QString &name, QgsPointCloudRendererWidgetFunc f, const QString &iconName = QString() )
39{
41 if ( !rendererAbstractMetadata )
42 return false;
43 QgsPointCloudRendererMetadata *rendererMetadata = dynamic_cast<QgsPointCloudRendererMetadata *>( rendererAbstractMetadata );
44 if ( !rendererMetadata )
45 return false;
46
47 rendererMetadata->setWidgetFunction( f );
48
49 if ( !iconName.isEmpty() )
50 {
51 rendererMetadata->setIcon( QgsApplication::getThemeIcon( iconName ) );
52 }
53
54 QgsDebugMsgLevel( "Set for " + name, 2 );
55 return true;
56}
57
58void QgsPointCloudRendererPropertiesWidget::initRendererWidgetFunctions()
59{
60 static bool sInitialized = false;
61 if ( sInitialized )
62 return;
63
64 initPointCloudRenderer( QStringLiteral( "extent" ), QgsPointCloudExtentRendererWidget::create, QStringLiteral( "styleicons/pointcloudextent.svg" ) );
65 initPointCloudRenderer( QStringLiteral( "rgb" ), QgsPointCloudRgbRendererWidget::create, QStringLiteral( "styleicons/multibandcolor.svg" ) );
66 initPointCloudRenderer( QStringLiteral( "ramp" ), QgsPointCloudAttributeByRampRendererWidget::create, QStringLiteral( "styleicons/singlebandpseudocolor.svg" ) );
67 initPointCloudRenderer( QStringLiteral( "classified" ), QgsPointCloudClassifiedRendererWidget::create, QStringLiteral( "styleicons/paletted.svg" ) );
68
69 sInitialized = true;
70}
71
73 : QgsMapLayerConfigWidget( layer, nullptr, parent )
74 , mLayer( layer )
75 , mStyle( style )
76{
77 setupUi( this );
78
79 layout()->setContentsMargins( 0, 0, 0, 0 );
80
81 // initialize registry's widget functions
82 initRendererWidgetFunctions();
83
85 const QStringList renderers = reg->renderersList();
86 for ( const QString &name : renderers )
87 {
89 cboRenderers->addItem( m->icon(), m->visibleName(), name );
90 }
91
92 cboRenderers->setCurrentIndex( -1 ); // set no current renderer
93
94 mPointStyleComboBox->addItem( tr( "Square" ), QVariant::fromValue( Qgis::PointCloudSymbol::Square ) );
95 mPointStyleComboBox->addItem( tr( "Circle" ), QVariant::fromValue( Qgis::PointCloudSymbol::Circle ) );
96
97 connect( cboRenderers, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsPointCloudRendererPropertiesWidget::rendererChanged );
98
99 connect( mBlendModeComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsPointCloudRendererPropertiesWidget::emitWidgetChanged );
100 connect( mOpacityWidget, &QgsOpacityWidget::opacityChanged, this, &QgsPointCloudRendererPropertiesWidget::emitWidgetChanged );
101
103
104 connect( mPointSizeSpinBox, qOverload<double>( &QgsDoubleSpinBox::valueChanged ), this, &QgsPointCloudRendererPropertiesWidget::emitWidgetChanged );
105 connect( mPointSizeUnitWidget, &QgsUnitSelectionWidget::changed, this, &QgsPointCloudRendererPropertiesWidget::emitWidgetChanged );
106
107 mDrawOrderComboBox->addItem( tr( "Default" ), QVariant::fromValue( Qgis::PointCloudDrawOrder::Default ) );
108 mDrawOrderComboBox->addItem( tr( "Bottom to Top" ), QVariant::fromValue( Qgis::PointCloudDrawOrder::BottomToTop ) );
109 mDrawOrderComboBox->addItem( tr( "Top to Bottom" ), QVariant::fromValue( Qgis::PointCloudDrawOrder::TopToBottom ) );
110
112 mMaxErrorSpinBox->setClearValue( 0.3 );
113
114 mHorizontalTriangleThresholdSpinBox->setClearValue( 5.0 );
116
117 connect( mMaxErrorSpinBox, qOverload<double>( &QgsDoubleSpinBox::valueChanged ), this, &QgsPointCloudRendererPropertiesWidget::emitWidgetChanged );
118 connect( mMaxErrorUnitWidget, &QgsUnitSelectionWidget::changed, this, &QgsPointCloudRendererPropertiesWidget::emitWidgetChanged );
119
120 connect( mPointStyleComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsPointCloudRendererPropertiesWidget::emitWidgetChanged );
121 connect( mDrawOrderComboBox, static_cast<void ( QComboBox::* )( int )>( &QComboBox::currentIndexChanged ), this, &QgsPointCloudRendererPropertiesWidget::emitWidgetChanged );
122
123 connect( mTriangulateGroupBox, &QGroupBox::toggled, this, &QgsPointCloudRendererPropertiesWidget::emitWidgetChanged );
124 connect( mHorizontalTriangleCheckBox, &QCheckBox::clicked, this, &QgsPointCloudRendererPropertiesWidget::emitWidgetChanged );
125 connect( mHorizontalTriangleThresholdSpinBox, qOverload<double>( &QgsDoubleSpinBox::valueChanged ), this, &QgsPointCloudRendererPropertiesWidget::emitWidgetChanged );
126 connect( mHorizontalTriangleUnitWidget, &QgsUnitSelectionWidget::changed, this, &QgsPointCloudRendererPropertiesWidget::emitWidgetChanged );
127
128 // show virtual point cloud options only when vpc layer is selected
129 if ( !mLayer->dataProvider()->subIndexes().isEmpty() )
130 {
131 mLabelOptions->setDialogTitle( tr( "Customize label text" ) );
132 mLabelOptions->setText( tr( "Label format" ) );
133 connect( mLabels, &QCheckBox::stateChanged, this, &QgsPointCloudRendererPropertiesWidget::emitWidgetChanged );
134 connect( mLabelOptions, &QgsFontButton::changed, this, &QgsPointCloudRendererPropertiesWidget::emitWidgetChanged );
135 mZoomOutOptions->addItem( tr( "Show Extents Only" ), QVariant::fromValue( Qgis::PointCloudZoomOutRenderBehavior::RenderExtents ) );
136
137 if ( const QgsVirtualPointCloudProvider *vpcProvider = dynamic_cast<QgsVirtualPointCloudProvider *>( mLayer->dataProvider() ) )
138 {
139 if ( vpcProvider->overview() )
140 {
141 mZoomOutOptions->addItem( tr( "Show Overview Only" ), QVariant::fromValue( Qgis::PointCloudZoomOutRenderBehavior::RenderOverview ) );
142 mZoomOutOptions->addItem( tr( "Show Extents Over Overview" ), QVariant::fromValue( Qgis::PointCloudZoomOutRenderBehavior::RenderOverviewAndExtents ) );
143 }
144 }
145 else
146 {
147 mZoomOutOptions->setEnabled( false );
148 }
149
150 connect( mZoomOutOptions, qOverload<int>( &QComboBox::currentIndexChanged ), this, [this]( int ) {
151 switch ( mZoomOutOptions->currentData().value<Qgis::PointCloudZoomOutRenderBehavior>() )
152 {
153 case Qgis::PointCloudZoomOutRenderBehavior::RenderOverview:
154 mLabels->setEnabled( false );
155 mLabelOptions->setEnabled( false );
156 break;
157 case Qgis::PointCloudZoomOutRenderBehavior::RenderExtents:
158 case Qgis::PointCloudZoomOutRenderBehavior::RenderOverviewAndExtents:
159 mLabels->setEnabled( true );
160 mLabelOptions->setEnabled( true );
161 }
162 emitWidgetChanged();
163 } );
164 }
165 else
166 {
167 mVpcGroupBox->setVisible( false );
168 }
169
170 syncToLayer( layer );
171}
172
174{
175 mMapCanvas = context.mapCanvas();
176 mMessageBar = context.messageBar();
177 if ( mActiveWidget )
178 {
179 mActiveWidget->setContext( context );
180 }
181}
182
184{
185 mLayer = qobject_cast<QgsPointCloudLayer *>( layer );
186
187 mBlockChangedSignal = true;
188 mOpacityWidget->setOpacity( mLayer->opacity() );
189 mBlendModeComboBox->setShowClippingModes( QgsProjectUtils::layerIsContainedInGroupLayer( QgsProject::instance(), mLayer ) );
190 mBlendModeComboBox->setBlendMode( mLayer->blendMode() );
191
192 if ( mLayer->renderer() )
193 {
194 // set current renderer from layer
195 const QString rendererName = mLayer->renderer()->type();
196
197 const int rendererIdx = cboRenderers->findData( rendererName );
198 if ( cboRenderers->currentIndex() != rendererIdx )
199 {
200 cboRenderers->setCurrentIndex( rendererIdx );
201 }
202 else
203 {
204 rendererChanged();
205 }
206
207 // no renderer found... this mustn't happen
208 Q_ASSERT( rendererIdx != -1 && "there must be a renderer!" );
209
210 mPointSizeSpinBox->setValue( mLayer->renderer()->pointSize() );
211 mPointSizeUnitWidget->setUnit( mLayer->renderer()->pointSizeUnit() );
212 mPointSizeUnitWidget->setMapUnitScale( mLayer->renderer()->pointSizeMapUnitScale() );
213
214 mPointStyleComboBox->setCurrentIndex( mPointStyleComboBox->findData( QVariant::fromValue( mLayer->renderer()->pointSymbol() ) ) );
215 mDrawOrderComboBox->setCurrentIndex( mDrawOrderComboBox->findData( QVariant::fromValue( mLayer->renderer()->drawOrder2d() ) ) );
216
217 mMaxErrorSpinBox->setValue( mLayer->renderer()->maximumScreenError() );
218 mMaxErrorUnitWidget->setUnit( mLayer->renderer()->maximumScreenErrorUnit() );
219
220 mTriangulateGroupBox->setChecked( mLayer->renderer()->renderAsTriangles() );
221 mHorizontalTriangleCheckBox->setChecked( mLayer->renderer()->horizontalTriangleFilter() );
222 mHorizontalTriangleThresholdSpinBox->setValue( mLayer->renderer()->horizontalTriangleFilterThreshold() );
223 mHorizontalTriangleUnitWidget->setUnit( mLayer->renderer()->horizontalTriangleFilterUnit() );
224
225 if ( !mLayer->dataProvider()->subIndexes().isEmpty() )
226 {
227 mLabels->setChecked( mLayer->renderer()->showLabels() );
228 mLabelOptions->setTextFormat( mLayer->renderer()->labelTextFormat() );
229 mZoomOutOptions->setCurrentIndex( mZoomOutOptions->findData( QVariant::fromValue( mLayer->renderer()->zoomOutBehavior() ) ) );
230 switch ( mLayer->renderer()->zoomOutBehavior() )
231 {
233 mLabels->setEnabled( false );
234 mLabelOptions->setEnabled( false );
235 break;
236 default:
237 mLabels->setEnabled( true );
238 mLabelOptions->setEnabled( true );
239 }
240 }
241 }
242
243 mBlockChangedSignal = false;
244}
245
247{
248 if ( mActiveWidget )
249 mActiveWidget->setDockMode( dockMode );
251}
252
254{
255 mLayer->setOpacity( mOpacityWidget->opacity() );
256 mLayer->setBlendMode( mBlendModeComboBox->blendMode() );
257
258 if ( mActiveWidget )
259 mLayer->setRenderer( mActiveWidget->renderer() );
260 else if ( !cboRenderers->currentData().toString().isEmpty() )
261 {
262 QDomElement elem;
263 mLayer->setRenderer( QgsApplication::pointCloudRendererRegistry()->rendererMetadata( cboRenderers->currentData().toString() )->createRenderer( elem, QgsReadWriteContext() ) );
264 }
265
266 mLayer->renderer()->setPointSize( mPointSizeSpinBox->value() );
267 mLayer->renderer()->setPointSizeUnit( mPointSizeUnitWidget->unit() );
268 mLayer->renderer()->setPointSizeMapUnitScale( mPointSizeUnitWidget->getMapUnitScale() );
269
270 mLayer->renderer()->setPointSymbol( mPointStyleComboBox->currentData().value<Qgis::PointCloudSymbol>() );
271
272 mLayer->renderer()->setMaximumScreenError( mMaxErrorSpinBox->value() );
273 mLayer->renderer()->setMaximumScreenErrorUnit( mMaxErrorUnitWidget->unit() );
274 mLayer->renderer()->setDrawOrder2d( mDrawOrderComboBox->currentData().value<Qgis::PointCloudDrawOrder>() );
275
276 mLayer->renderer()->setRenderAsTriangles( mTriangulateGroupBox->isChecked() );
277 mLayer->renderer()->setHorizontalTriangleFilter( mHorizontalTriangleCheckBox->isChecked() );
278 mLayer->renderer()->setHorizontalTriangleFilterThreshold( mHorizontalTriangleThresholdSpinBox->value() );
279 mLayer->renderer()->setHorizontalTriangleFilterUnit( mHorizontalTriangleUnitWidget->unit() );
280
281 mLayer->renderer()->setShowLabels( mLabels->isChecked() );
282 mLayer->renderer()->setLabelTextFormat( mLabelOptions->textFormat() );
283 mLayer->renderer()->setZoomOutBehavior( mZoomOutOptions->currentData().value<Qgis::PointCloudZoomOutRenderBehavior>() );
284}
285
286void QgsPointCloudRendererPropertiesWidget::rendererChanged()
287{
288 if ( cboRenderers->currentIndex() == -1 )
289 {
290 QgsDebugError( QStringLiteral( "No current item -- this should never happen!" ) );
291 return;
292 }
293
294 const QString rendererName = cboRenderers->currentData().toString();
295
296 //Retrieve the previous renderer: from the old active widget if possible, otherwise from the layer
297 std::unique_ptr<QgsPointCloudRenderer> oldRenderer;
298 std::unique_ptr<QgsPointCloudRenderer> newRenderer;
299 if ( mActiveWidget )
300 newRenderer.reset( mActiveWidget->renderer() );
301
302 if ( newRenderer )
303 {
304 oldRenderer = std::move( newRenderer );
305 }
306 else
307 {
308 oldRenderer.reset( mLayer->renderer()->clone() );
309 }
310
311 // get rid of old active widget (if any)
312 if ( mActiveWidget )
313 {
314 stackedWidget->removeWidget( mActiveWidget );
315
316 delete mActiveWidget;
317 mActiveWidget = nullptr;
318 }
319
320 QgsPointCloudRendererWidget *widget = nullptr;
322 if ( rendererMetadata )
323 widget = rendererMetadata->createRendererWidget( mLayer, mStyle, oldRenderer.get() );
324 oldRenderer.reset();
325
326 if ( widget )
327 {
328 // instantiate the widget and set as active
329 mActiveWidget = widget;
330 stackedWidget->addWidget( mActiveWidget );
331 stackedWidget->setCurrentWidget( mActiveWidget );
332
333 if ( mMapCanvas || mMessageBar )
334 {
336 context.setMapCanvas( mMapCanvas );
337 context.setMessageBar( mMessageBar );
338 mActiveWidget->setContext( context );
339 }
340
343 widget->setDockMode( dockMode() );
344 }
345 else
346 {
347 // set default "no edit widget available" page
348 stackedWidget->setCurrentWidget( pageNoWidget );
349 }
350 emitWidgetChanged();
351}
352
353void QgsPointCloudRendererPropertiesWidget::emitWidgetChanged()
354{
355 if ( !mBlockChangedSignal )
356 emit widgetChanged();
357}
PointCloudSymbol
Rendering symbols for point cloud points.
Definition qgis.h:4013
@ Circle
Renders points as circles.
@ Square
Renders points as squares.
PointCloudDrawOrder
Pointcloud rendering order for 2d views.
Definition qgis.h:4025
@ BottomToTop
Draw points with larger Z values last.
@ Default
Draw points in the order they are stored.
@ TopToBottom
Draw points with larger Z values first.
PointCloudZoomOutRenderBehavior
Point cloud zoom out options.
Definition qgis.h:5742
@ RenderOverviewAndExtents
Render point cloud extents over overview point cloud.
@ RenderExtents
Render only point cloud extents when zoomed out.
@ RenderOverview
Render overview point cloud when zoomed out.
@ Millimeters
Millimeters.
@ Points
Points (e.g., for font sizes)
@ MapUnits
Map units.
@ MetersInMapUnits
Meters value as Map units.
static QgsPointCloudRendererRegistry * pointCloudRendererRegistry()
Returns the application's point cloud renderer registry, used for managing point cloud layer 2D rende...
static QIcon getThemeIcon(const QString &name, const QColor &fillColor=QColor(), const QColor &strokeColor=QColor())
Helper to get a theme icon.
void changed()
Emitted when the widget's text format settings are changed.
A panel widget that can be shown in the map style dock.
Base class for all map layer types.
Definition qgsmaplayer.h:76
void setBlendMode(QPainter::CompositionMode blendMode)
Set the blending mode used for rendering a layer.
QPainter::CompositionMode blendMode() const
Returns the current blending mode for a layer.
virtual void setOpacity(double opacity)
Sets the opacity for the layer, where opacity is a value between 0 (totally transparent) and 1....
double opacity
Definition qgsmaplayer.h:88
void opacityChanged(double opacity)
Emitted when the opacity is changed in the widget, where opacity ranges from 0.0 (transparent) to 1....
void showPanel(QgsPanelWidget *panel)
Emit when you require a panel to be show in the interface.
void openPanel(QgsPanelWidget *panel)
Open a panel or dialog depending on dock mode setting If dock mode is true this method will emit the ...
void widgetChanged()
Emitted when the widget state changes.
virtual void setDockMode(bool dockMode)
Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs.
bool dockMode()
Returns the dock mode state.
virtual QVector< QgsPointCloudSubIndex > subIndexes()
Returns a list of sub indexes available if the provider supports multiple indexes,...
Represents a map layer supporting display of point clouds.
QgsPointCloudRenderer * renderer()
Returns the 2D renderer for the point cloud.
QgsPointCloudDataProvider * dataProvider() override
Returns the layer's data provider, it may be nullptr.
void setRenderer(QgsPointCloudRenderer *renderer)
Sets the 2D renderer for the point cloud.
Stores metadata about one point cloud renderer class.
void setIcon(const QIcon &icon)
Sets an icon representing the renderer.
virtual QgsPointCloudRendererWidget * createRendererWidget(QgsPointCloudLayer *layer, QgsStyle *style, QgsPointCloudRenderer *oldRenderer)
Returns new instance of settings widget for the renderer.
Convenience metadata class that uses static functions to create point cloud renderer and its widget.
void setWidgetFunction(QgsPointCloudRendererWidgetFunc f)
QgsPointCloudRenderer * createRenderer(QDomElement &elem, const QgsReadWriteContext &context) override
Returns new instance of the renderer given the DOM element.
void setContext(const QgsSymbolWidgetContext &context)
Sets the context in which the widget is shown, e.g., the associated map canvas and expression context...
QgsPointCloudRendererPropertiesWidget(QgsPointCloudLayer *layer, QgsStyle *style, QWidget *parent=nullptr)
Constructor for QgsPointCloudRendererPropertiesWidget, associated with the specified layer and style ...
void syncToLayer(QgsMapLayer *layer) final
Reset to original (vector layer) values.
void setDockMode(bool dockMode) final
Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs.
Registry of 2D renderers for point clouds.
QgsPointCloudRendererAbstractMetadata * rendererMetadata(const QString &rendererName)
Returns the metadata for a specified renderer.
QStringList renderersList() const
Returns a list of available renderers.
Base class for point cloud 2D renderer settings widgets.
virtual void setContext(const QgsSymbolWidgetContext &context)
Sets the context in which the renderer widget is shown, e.g., the associated map canvas and expressio...
virtual QgsPointCloudRenderer * renderer()=0
Returns a new instance of a renderer as defined by the settings in the widget.
Qgis::PointCloudZoomOutRenderBehavior zoomOutBehavior() const
Returns the renderer behavior when zoomed out.
bool renderAsTriangles() const
Returns whether points are triangulated to render solid surface.
void setMaximumScreenError(double error)
Sets the maximum screen error allowed when rendering the point cloud.
QgsTextFormat labelTextFormat() const
Returns the text format renderer is using for rendering labels.
void setMaximumScreenErrorUnit(Qgis::RenderUnit unit)
Sets the unit for the maximum screen error allowed when rendering the point cloud.
const QgsMapUnitScale & pointSizeMapUnitScale() const
Returns the map unit scale used for the point size.
void setPointSizeMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for the point size.
void setPointSize(double size)
Sets the point size.
bool horizontalTriangleFilter() const
Returns whether large triangles will get rendered.
virtual QString type() const =0
Returns the identifier of the renderer type.
void setHorizontalTriangleFilterThreshold(double threshold)
Sets threshold for filtering of triangles.
void setHorizontalTriangleFilterUnit(Qgis::RenderUnit unit)
Sets units of the threshold for filtering of triangles.
bool showLabels() const
Returns whether the renderer shows file labels inside the extent rectangle.
virtual QgsPointCloudRenderer * clone() const =0
Create a deep copy of this renderer.
Qgis::RenderUnit maximumScreenErrorUnit() const
Returns the unit for the maximum screen error allowed when rendering the point cloud.
void setDrawOrder2d(Qgis::PointCloudDrawOrder order)
Sets the drawing order used by the renderer for drawing points.
void setPointSizeUnit(const Qgis::RenderUnit units)
Sets the units used for the point size.
Qgis::RenderUnit horizontalTriangleFilterUnit() const
Returns units of the threshold for filtering of triangles.
void setRenderAsTriangles(bool asTriangles)
Sets whether points are triangulated to render solid surface.
void setPointSymbol(Qgis::PointCloudSymbol symbol)
Sets the symbol used by the renderer for drawing points.
void setLabelTextFormat(const QgsTextFormat &textFormat)
Sets the text format renderers should use for rendering labels.
double maximumScreenError() const
Returns the maximum screen error allowed when rendering the point cloud.
void setShowLabels(const bool show)
Set whether the renderer should also render file labels inside extent.
Qgis::RenderUnit pointSizeUnit() const
Returns the units used for the point size.
double horizontalTriangleFilterThreshold() const
Returns threshold for filtering of triangles.
Qgis::PointCloudSymbol pointSymbol() const
Returns the symbol used by the renderer for drawing points.
Qgis::PointCloudDrawOrder drawOrder2d() const
Returns the drawing order used by the renderer for drawing points.
void setHorizontalTriangleFilter(bool enabled)
Sets whether large triangles will get rendered.
double pointSize() const
Returns the point size.
void setZoomOutBehavior(const Qgis::PointCloudZoomOutRenderBehavior behavior)
Sets the renderer behavior when zoomed out.
static bool layerIsContainedInGroupLayer(QgsProject *project, QgsMapLayer *layer)
Returns true if the specified layer is a child layer from any QgsGroupLayer in the given project.
static QgsProject * instance()
Returns the QgsProject singleton instance.
The class is used as a container of context for various read/write operations on other objects.
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
void setMapCanvas(QgsMapCanvas *canvas)
Sets the map canvas associated with the widget.
void setMessageBar(QgsMessageBar *bar)
Sets the message bar associated with the widget.
QgsMapCanvas * mapCanvas() const
Returns the map canvas associated with the widget.
QgsMessageBar * messageBar() const
Returns the message bar associated with the widget.
void changed()
Emitted when the selected unit is changed, or the definition of the map unit scale is changed.
#define QgsDebugMsgLevel(str, level)
Definition qgslogger.h:39
#define QgsDebugError(str)
Definition qgslogger.h:38
QgsPointCloudRendererWidget *(* QgsPointCloudRendererWidgetFunc)(QgsPointCloudLayer *, QgsStyle *, QgsPointCloudRenderer *)