From c35d17b6e401d21c6e0bf6f7bd48a7a21cf1c85d Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Thu, 28 Apr 2022 13:33:19 +1000 Subject: [PATCH] Move useful point cloud renderer enums to Qgis namespace --- python/core/auto_additions/qgis.py | 16 +++++++++ .../auto_additions/qgspointcloudrenderer.py | 7 ---- .../pointcloud/qgspointcloudrenderer.sip.in | 21 +++-------- python/core/auto_generated/qgis.sip.in | 13 +++++++ .../pointcloud/qgspointcloudlayerrenderer.cpp | 18 +++++----- .../pointcloud/qgspointcloudlayerrenderer.h | 2 +- src/core/pointcloud/qgspointcloudrenderer.cpp | 20 +++++------ src/core/pointcloud/qgspointcloudrenderer.h | 36 +++++-------------- src/core/qgis.h | 25 +++++++++++++ .../qgspointcloudrendererpropertieswidget.cpp | 14 ++++---- src/gui/qgshighlight.cpp | 4 +-- 11 files changed, 95 insertions(+), 81 deletions(-) delete mode 100644 python/core/auto_additions/qgspointcloudrenderer.py diff --git a/python/core/auto_additions/qgis.py b/python/core/auto_additions/qgis.py index 5088c4435ba..6ee49f67a24 100644 --- a/python/core/auto_additions/qgis.py +++ b/python/core/auto_additions/qgis.py @@ -1500,3 +1500,19 @@ Qgis.ProfileGeneratorFlag.__doc__ = 'Flags that control the way the :py:class:`Q Qgis.ProfileGeneratorFlag.baseClass = Qgis Qgis.ProfileGeneratorFlags.baseClass = Qgis ProfileGeneratorFlags = Qgis # dirty hack since SIP seems to introduce the flags in module +QgsPointCloudRenderer.PointSymbol = Qgis.PointCloudSymbol +Qgis.PointCloudSymbol.baseClass = Qgis +QgsPointCloudRenderer.DrawOrder = Qgis.PointCloudDrawOrder +# monkey patching scoped based enum +QgsPointCloudRenderer.Default = Qgis.PointCloudDrawOrder.Default +QgsPointCloudRenderer.Default.is_monkey_patched = True +QgsPointCloudRenderer.Default.__doc__ = "Draw points in the order they are stored" +QgsPointCloudRenderer.BottomToTop = Qgis.PointCloudDrawOrder.BottomToTop +QgsPointCloudRenderer.BottomToTop.is_monkey_patched = True +QgsPointCloudRenderer.BottomToTop.__doc__ = "Draw points with larger Z values last" +QgsPointCloudRenderer.TopToBottom = Qgis.PointCloudDrawOrder.TopToBottom +QgsPointCloudRenderer.TopToBottom.is_monkey_patched = True +QgsPointCloudRenderer.TopToBottom.__doc__ = "Draw points with larger Z values first" +Qgis.PointCloudDrawOrder.__doc__ = 'Pointcloud rendering order for 2d views\n\n/since QGIS 3.26\n\n' + '* ``Default``: ' + Qgis.PointCloudDrawOrder.Default.__doc__ + '\n' + '* ``BottomToTop``: ' + Qgis.PointCloudDrawOrder.BottomToTop.__doc__ + '\n' + '* ``TopToBottom``: ' + Qgis.PointCloudDrawOrder.TopToBottom.__doc__ +# -- +Qgis.PointCloudDrawOrder.baseClass = Qgis diff --git a/python/core/auto_additions/qgspointcloudrenderer.py b/python/core/auto_additions/qgspointcloudrenderer.py deleted file mode 100644 index 9449277ebe0..00000000000 --- a/python/core/auto_additions/qgspointcloudrenderer.py +++ /dev/null @@ -1,7 +0,0 @@ -# The following has been generated automatically from src/core/pointcloud/qgspointcloudrenderer.h -# monkey patching scoped based enum -QgsPointCloudRenderer.DrawOrder.Default.__doc__ = "Draw points in the order they are stored" -QgsPointCloudRenderer.DrawOrder.BottomToTop.__doc__ = "Draw points with larger Z values last" -QgsPointCloudRenderer.DrawOrder.TopToBottom.__doc__ = "Draw points with larger Z values first" -QgsPointCloudRenderer.DrawOrder.__doc__ = 'Pointcloud rendering order for 2d views\n/since QGIS 3.24\n\n' + '* ``Default``: ' + QgsPointCloudRenderer.DrawOrder.Default.__doc__ + '\n' + '* ``BottomToTop``: ' + QgsPointCloudRenderer.DrawOrder.BottomToTop.__doc__ + '\n' + '* ``TopToBottom``: ' + QgsPointCloudRenderer.DrawOrder.TopToBottom.__doc__ -# -- diff --git a/python/core/auto_generated/pointcloud/qgspointcloudrenderer.sip.in b/python/core/auto_generated/pointcloud/qgspointcloudrenderer.sip.in index ed1bc316da1..7f5836f04d0 100644 --- a/python/core/auto_generated/pointcloud/qgspointcloudrenderer.sip.in +++ b/python/core/auto_generated/pointcloud/qgspointcloudrenderer.sip.in @@ -191,19 +191,6 @@ Abstract base class for 2d point cloud renderers. %End public: - enum PointSymbol - { - Square, - Circle, - }; - - enum class DrawOrder - { - Default, - BottomToTop, - TopToBottom, - }; - QgsPointCloudRenderer(); %Docstring Constructor for QgsPointCloudRenderer. @@ -373,7 +360,7 @@ Returns the map unit scale used for the point size. .. seealso:: :py:func:`pointSize` %End - DrawOrder drawOrder2d() const; + Qgis::PointCloudDrawOrder drawOrder2d() const; %Docstring Returns the drawing order used by the renderer for drawing points. @@ -382,7 +369,7 @@ Returns the drawing order used by the renderer for drawing points. .. versionadded:: 3.24 %End - void setDrawOrder2d( DrawOrder order ); + void setDrawOrder2d( Qgis::PointCloudDrawOrder order ); %Docstring Sets the drawing ``order`` used by the renderer for drawing points. @@ -391,14 +378,14 @@ Sets the drawing ``order`` used by the renderer for drawing points. .. versionadded:: 3.24 %End - PointSymbol pointSymbol() const; + Qgis::PointCloudSymbol pointSymbol() const; %Docstring Returns the symbol used by the renderer for drawing points. .. seealso:: :py:func:`setPointSymbol` %End - void setPointSymbol( PointSymbol symbol ); + void setPointSymbol( Qgis::PointCloudSymbol symbol ); %Docstring Sets the ``symbol`` used by the renderer for drawing points. diff --git a/python/core/auto_generated/qgis.sip.in b/python/core/auto_generated/qgis.sip.in index 1a5c43e09c4..fb5c6e20bfa 100644 --- a/python/core/auto_generated/qgis.sip.in +++ b/python/core/auto_generated/qgis.sip.in @@ -1025,6 +1025,19 @@ The development version typedef QFlags ProfileGeneratorFlags; + enum PointCloudSymbol + { + Square, + Circle, + }; + + enum class PointCloudDrawOrder + { + Default, + BottomToTop, + TopToBottom, + }; + static const double DEFAULT_SEARCH_RADIUS_MM; static const float DEFAULT_MAPTOPIXEL_THRESHOLD; diff --git a/src/core/pointcloud/qgspointcloudlayerrenderer.cpp b/src/core/pointcloud/qgspointcloudlayerrenderer.cpp index 01ecabe517c..f793fa6cd7a 100644 --- a/src/core/pointcloud/qgspointcloudlayerrenderer.cpp +++ b/src/core/pointcloud/qgspointcloudlayerrenderer.cpp @@ -117,8 +117,8 @@ bool QgsPointCloudLayerRenderer::render() mAttributes.push_back( QgsPointCloudAttribute( QStringLiteral( "Y" ), QgsPointCloudAttribute::Int32 ) ); if ( !context.renderContext().zRange().isInfinite() || - mRenderer->drawOrder2d() == QgsPointCloudRenderer::DrawOrder::BottomToTop || - mRenderer->drawOrder2d() == QgsPointCloudRenderer::DrawOrder::TopToBottom ) + mRenderer->drawOrder2d() == Qgis::PointCloudDrawOrder::BottomToTop || + mRenderer->drawOrder2d() == Qgis::PointCloudDrawOrder::TopToBottom ) mAttributes.push_back( QgsPointCloudAttribute( QStringLiteral( "Z" ), QgsPointCloudAttribute::Int32 ) ); // collect attributes required by renderer @@ -193,13 +193,13 @@ bool QgsPointCloudLayerRenderer::render() switch ( mRenderer->drawOrder2d() ) { - case QgsPointCloudRenderer::DrawOrder::BottomToTop: - case QgsPointCloudRenderer::DrawOrder::TopToBottom: + case Qgis::PointCloudDrawOrder::BottomToTop: + case Qgis::PointCloudDrawOrder::TopToBottom: { nodesDrawn += renderNodesSorted( nodes, pc, context, request, canceled, mRenderer->drawOrder2d() ); break; } - case QgsPointCloudRenderer::DrawOrder::Default: + case Qgis::PointCloudDrawOrder::Default: { switch ( pc->accessType() ) { @@ -359,7 +359,7 @@ int QgsPointCloudLayerRenderer::renderNodesAsync( const QVector &nodes, QgsPointCloudIndex *pc, QgsPointCloudRenderContext &context, QgsPointCloudRequest &request, bool &canceled, QgsPointCloudRenderer::DrawOrder order ) +int QgsPointCloudLayerRenderer::renderNodesSorted( const QVector &nodes, QgsPointCloudIndex *pc, QgsPointCloudRenderContext &context, QgsPointCloudRequest &request, bool &canceled, Qgis::PointCloudDrawOrder order ) { int blockCount = 0; int pointCount = 0; @@ -448,13 +448,13 @@ int QgsPointCloudLayerRenderer::renderNodesSorted( const QVector a, QPair b ) { return a.second < b.second; } ); break; - case QgsPointCloudRenderer::DrawOrder::TopToBottom: + case Qgis::PointCloudDrawOrder::TopToBottom: std::sort( allPairs.begin(), allPairs.end(), []( QPair a, QPair b ) { return a.second > b.second; } ); break; - case QgsPointCloudRenderer::DrawOrder::Default: + case Qgis::PointCloudDrawOrder::Default: break; } diff --git a/src/core/pointcloud/qgspointcloudlayerrenderer.h b/src/core/pointcloud/qgspointcloudlayerrenderer.h index 5c8d9ffad62..a2b051a8ef8 100644 --- a/src/core/pointcloud/qgspointcloudlayerrenderer.h +++ b/src/core/pointcloud/qgspointcloudlayerrenderer.h @@ -74,7 +74,7 @@ class CORE_EXPORT QgsPointCloudLayerRenderer: public QgsMapLayerRenderer QVector traverseTree( const QgsPointCloudIndex *pc, const QgsRenderContext &context, IndexedPointCloudNode n, double maxErrorPixels, double nodeErrorPixels ); int renderNodesSync( const QVector &nodes, QgsPointCloudIndex *pc, QgsPointCloudRenderContext &context, QgsPointCloudRequest &request, bool &canceled ); int renderNodesAsync( const QVector &nodes, QgsPointCloudIndex *pc, QgsPointCloudRenderContext &context, QgsPointCloudRequest &request, bool &canceled ); - int renderNodesSorted( const QVector &nodes, QgsPointCloudIndex *pc, QgsPointCloudRenderContext &context, QgsPointCloudRequest &request, bool &canceled, QgsPointCloudRenderer::DrawOrder order ); + int renderNodesSorted( const QVector &nodes, QgsPointCloudIndex *pc, QgsPointCloudRenderContext &context, QgsPointCloudRequest &request, bool &canceled, Qgis::PointCloudDrawOrder order ); QgsPointCloudLayer *mLayer = nullptr; diff --git a/src/core/pointcloud/qgspointcloudrenderer.cpp b/src/core/pointcloud/qgspointcloudrenderer.cpp index f13a68f366e..85bf27bba4b 100644 --- a/src/core/pointcloud/qgspointcloudrenderer.cpp +++ b/src/core/pointcloud/qgspointcloudrenderer.cpp @@ -97,12 +97,12 @@ void QgsPointCloudRenderer::startRender( QgsPointCloudRenderContext &context ) switch ( mPointSymbol ) { - case Square: + case Qgis::PointCloudSymbol::Square: // for square point we always disable antialiasing -- it's not critical here and we benefit from the performance boost disabling it gives context.renderContext().painter()->setRenderHint( QPainter::Antialiasing, false ); break; - case Circle: + case Qgis::PointCloudSymbol::Circle: break; } } @@ -173,8 +173,8 @@ void QgsPointCloudRenderer::restoreCommonProperties( const QDomElement &element, mMaximumScreenError = element.attribute( QStringLiteral( "maximumScreenError" ), QStringLiteral( "0.3" ) ).toDouble(); mMaximumScreenErrorUnit = QgsUnitTypes::decodeRenderUnit( element.attribute( QStringLiteral( "maximumScreenErrorUnit" ), QStringLiteral( "MM" ) ) ); - mPointSymbol = static_cast< PointSymbol >( element.attribute( QStringLiteral( "pointSymbol" ), QStringLiteral( "0" ) ).toInt() ); - mDrawOrder2d = static_cast< DrawOrder >( element.attribute( QStringLiteral( "drawOrder2d" ), QStringLiteral( "0" ) ).toInt() ); + mPointSymbol = static_cast< Qgis::PointCloudSymbol >( element.attribute( QStringLiteral( "pointSymbol" ), QStringLiteral( "0" ) ).toInt() ); + mDrawOrder2d = static_cast< Qgis::PointCloudDrawOrder >( element.attribute( QStringLiteral( "drawOrder2d" ), QStringLiteral( "0" ) ).toInt() ); } void QgsPointCloudRenderer::saveCommonProperties( QDomElement &element, const QgsReadWriteContext & ) const @@ -189,22 +189,22 @@ void QgsPointCloudRenderer::saveCommonProperties( QDomElement &element, const Qg element.setAttribute( QStringLiteral( "drawOrder2d" ), QString::number( static_cast< int >( mDrawOrder2d ) ) ); } -QgsPointCloudRenderer::PointSymbol QgsPointCloudRenderer::pointSymbol() const +Qgis::PointCloudSymbol QgsPointCloudRenderer::pointSymbol() const { return mPointSymbol; } -void QgsPointCloudRenderer::setPointSymbol( PointSymbol symbol ) +void QgsPointCloudRenderer::setPointSymbol( Qgis::PointCloudSymbol symbol ) { mPointSymbol = symbol; } -QgsPointCloudRenderer::DrawOrder QgsPointCloudRenderer::drawOrder2d() const +Qgis::PointCloudDrawOrder QgsPointCloudRenderer::drawOrder2d() const { return mDrawOrder2d; } -void QgsPointCloudRenderer::setDrawOrder2d( DrawOrder order ) +void QgsPointCloudRenderer::setDrawOrder2d( Qgis::PointCloudDrawOrder order ) { mDrawOrder2d = order; } @@ -261,7 +261,7 @@ QVector QgsPointCloudRenderer::identify( QgsPointCloudLayer *layer, const double pointSizePixels = renderContext.convertToPainterUnits( mPointSize, mPointSizeUnit, mPointSizeMapUnitScale ); switch ( pointSymbol() ) { - case QgsPointCloudRenderer::PointSymbol::Square: + case Qgis::PointCloudSymbol::Square: { const QgsPointXY deviceCoords = renderContext.mapToPixel().transform( QgsPointXY( x, y ) ); const QgsPointXY point1( deviceCoords.x() - std::max( toleranceInPixels, pointSizePixels / 2.0 ), deviceCoords.y() - std::max( toleranceInPixels, pointSizePixels / 2.0 ) ); @@ -272,7 +272,7 @@ QVector QgsPointCloudRenderer::identify( QgsPointCloudLayer *layer, selectionGeometry = QgsGeometry::fromRect( pointRect ); break; } - case QgsPointCloudRenderer::PointSymbol::Circle: + case Qgis::PointCloudSymbol::Circle: { const QgsPoint centerMapCoords( x, y ); const QgsPointXY deviceCoords = renderContext.mapToPixel().transform( centerMapCoords ); diff --git a/src/core/pointcloud/qgspointcloudrenderer.h b/src/core/pointcloud/qgspointcloudrenderer.h index f22f585fc0f..b7b119adf21 100644 --- a/src/core/pointcloud/qgspointcloudrenderer.h +++ b/src/core/pointcloud/qgspointcloudrenderer.h @@ -274,26 +274,6 @@ class CORE_EXPORT QgsPointCloudRenderer public: - /** - * Rendering symbols for points. - */ - enum PointSymbol - { - Square, //!< Renders points as squares - Circle, //!< Renders points as circles - }; - - /** - * Pointcloud rendering order for 2d views - * /since QGIS 3.24 - */ - enum class DrawOrder : int - { - Default, //!< Draw points in the order they are stored - BottomToTop, //!< Draw points with larger Z values last - TopToBottom, //!< Draw points with larger Z values first - }; - /** * Constructor for QgsPointCloudRenderer. */ @@ -464,7 +444,7 @@ class CORE_EXPORT QgsPointCloudRenderer * \see setDrawOrder2d() * \since QGIS 3.24 */ - DrawOrder drawOrder2d() const; + Qgis::PointCloudDrawOrder drawOrder2d() const; /** * Sets the drawing \a order used by the renderer for drawing points. @@ -472,21 +452,21 @@ class CORE_EXPORT QgsPointCloudRenderer * \see drawOrder2d() * \since QGIS 3.24 */ - void setDrawOrder2d( DrawOrder order ); + void setDrawOrder2d( Qgis::PointCloudDrawOrder order ); /** * Returns the symbol used by the renderer for drawing points. * * \see setPointSymbol() */ - PointSymbol pointSymbol() const; + Qgis::PointCloudSymbol pointSymbol() const; /** * Sets the \a symbol used by the renderer for drawing points. * * \see pointSymbol() */ - void setPointSymbol( PointSymbol symbol ); + void setPointSymbol( Qgis::PointCloudSymbol symbol ); /** * Returns the maximum screen error allowed when rendering the point cloud. @@ -574,13 +554,13 @@ class CORE_EXPORT QgsPointCloudRenderer QPainter *painter = context.renderContext().painter(); switch ( mPointSymbol ) { - case Square: + case Qgis::PointCloudSymbol::Square: painter->fillRect( QRectF( x - mPainterPenWidth * 0.5, y - mPainterPenWidth * 0.5, mPainterPenWidth, mPainterPenWidth ), color ); break; - case Circle: + case Qgis::PointCloudSymbol::Circle: painter->setBrush( QBrush( color ) ); painter->setPen( Qt::NoPen ); painter->drawEllipse( QRectF( x - mPainterPenWidth * 0.5, @@ -628,9 +608,9 @@ class CORE_EXPORT QgsPointCloudRenderer QgsUnitTypes::RenderUnit mPointSizeUnit = QgsUnitTypes::RenderMillimeters; QgsMapUnitScale mPointSizeMapUnitScale; - PointSymbol mPointSymbol = Square; + Qgis::PointCloudSymbol mPointSymbol = Qgis::PointCloudSymbol::Square; int mPainterPenWidth = 1; - DrawOrder mDrawOrder2d = DrawOrder::Default; + Qgis::PointCloudDrawOrder mDrawOrder2d = Qgis::PointCloudDrawOrder::Default; }; #endif // QGSPOINTCLOUDRENDERER_H diff --git a/src/core/qgis.h b/src/core/qgis.h index efc62f539c7..bfddf8506f6 100644 --- a/src/core/qgis.h +++ b/src/core/qgis.h @@ -1689,6 +1689,31 @@ class CORE_EXPORT Qgis Q_DECLARE_FLAGS( ProfileGeneratorFlags, ProfileGeneratorFlag ) Q_FLAG( ProfileGeneratorFlags ) + /** + * Rendering symbols for point cloud points. + * + * \since QGIS 3.26 + */ + enum PointCloudSymbol SIP_MONKEYPATCH_SCOPEENUM_UNNEST( QgsPointCloudRenderer, PointSymbol ) : int + { + Square, //!< Renders points as squares + Circle, //!< Renders points as circles + }; + Q_ENUM( PointCloudSymbol ) + + /** + * Pointcloud rendering order for 2d views + * + * /since QGIS 3.26 + */ + enum class PointCloudDrawOrder SIP_MONKEYPATCH_SCOPEENUM_UNNEST( QgsPointCloudRenderer, DrawOrder ) : int + { + Default, //!< Draw points in the order they are stored + BottomToTop, //!< Draw points with larger Z values last + TopToBottom, //!< Draw points with larger Z values first + }; + Q_ENUM( PointCloudDrawOrder ) + /** * Identify search radius in mm * \since QGIS 2.3 diff --git a/src/gui/pointcloud/qgspointcloudrendererpropertieswidget.cpp b/src/gui/pointcloud/qgspointcloudrendererpropertieswidget.cpp index d474ff07ae5..0875f0ecef3 100644 --- a/src/gui/pointcloud/qgspointcloudrendererpropertieswidget.cpp +++ b/src/gui/pointcloud/qgspointcloudrendererpropertieswidget.cpp @@ -87,8 +87,8 @@ QgsPointCloudRendererPropertiesWidget::QgsPointCloudRendererPropertiesWidget( Qg cboRenderers->setCurrentIndex( -1 ); // set no current renderer - mPointStyleComboBox->addItem( tr( "Square" ), QgsPointCloudRenderer::Square ); - mPointStyleComboBox->addItem( tr( "Circle" ), QgsPointCloudRenderer::Circle ); + mPointStyleComboBox->addItem( tr( "Square" ), Qgis::PointCloudSymbol::Square ); + mPointStyleComboBox->addItem( tr( "Circle" ), Qgis::PointCloudSymbol::Circle ); connect( cboRenderers, static_cast( &QComboBox::currentIndexChanged ), this, &QgsPointCloudRendererPropertiesWidget::rendererChanged ); @@ -101,9 +101,9 @@ QgsPointCloudRendererPropertiesWidget::QgsPointCloudRendererPropertiesWidget( Qg connect( mPointSizeSpinBox, qOverload( &QgsDoubleSpinBox::valueChanged ), this, &QgsPointCloudRendererPropertiesWidget::emitWidgetChanged ); connect( mPointSizeUnitWidget, &QgsUnitSelectionWidget::changed, this, &QgsPointCloudRendererPropertiesWidget::emitWidgetChanged ); - mDrawOrderComboBox->addItem( tr( "Default" ), static_cast< int >( QgsPointCloudRenderer::DrawOrder::Default ) ); - mDrawOrderComboBox->addItem( tr( "Bottom to Top" ), static_cast< int >( QgsPointCloudRenderer::DrawOrder::BottomToTop ) ); - mDrawOrderComboBox->addItem( tr( "Top to Bottom" ), static_cast< int >( QgsPointCloudRenderer::DrawOrder::TopToBottom ) ); + mDrawOrderComboBox->addItem( tr( "Default" ), static_cast< int >( Qgis::PointCloudDrawOrder::Default ) ); + mDrawOrderComboBox->addItem( tr( "Bottom to Top" ), static_cast< int >( Qgis::PointCloudDrawOrder::BottomToTop ) ); + mDrawOrderComboBox->addItem( tr( "Top to Bottom" ), static_cast< int >( Qgis::PointCloudDrawOrder::TopToBottom ) ); mMaxErrorUnitWidget->setUnits( QgsUnitTypes::RenderUnitList() << QgsUnitTypes::RenderMillimeters << QgsUnitTypes::RenderMetersInMapUnits << QgsUnitTypes::RenderMapUnits << QgsUnitTypes::RenderPixels << QgsUnitTypes::RenderPoints << QgsUnitTypes::RenderInches ); @@ -185,11 +185,11 @@ void QgsPointCloudRendererPropertiesWidget::apply() mLayer->renderer()->setPointSizeUnit( mPointSizeUnitWidget->unit() ); mLayer->renderer()->setPointSizeMapUnitScale( mPointSizeUnitWidget->getMapUnitScale() ); - mLayer->renderer()->setPointSymbol( static_cast< QgsPointCloudRenderer::PointSymbol >( mPointStyleComboBox->currentData().toInt() ) ); + mLayer->renderer()->setPointSymbol( static_cast< Qgis::PointCloudSymbol >( mPointStyleComboBox->currentData().toInt() ) ); mLayer->renderer()->setMaximumScreenError( mMaxErrorSpinBox->value() ); mLayer->renderer()->setMaximumScreenErrorUnit( mMaxErrorUnitWidget->unit() ); - mLayer->renderer()->setDrawOrder2d( static_cast< QgsPointCloudRenderer::DrawOrder >( mDrawOrderComboBox->currentData().toInt() ) ); + mLayer->renderer()->setDrawOrder2d( static_cast< Qgis::PointCloudDrawOrder >( mDrawOrderComboBox->currentData().toInt() ) ); } void QgsPointCloudRendererPropertiesWidget::rendererChanged() diff --git a/src/gui/qgshighlight.cpp b/src/gui/qgshighlight.cpp index 1cbf98a545a..edfab451ad5 100644 --- a/src/gui/qgshighlight.cpp +++ b/src/gui/qgshighlight.cpp @@ -405,10 +405,10 @@ void QgsHighlight::paint( QPainter *p ) sizeUnit = QgsUnitTypes::RenderPixels; switch ( pcRenderer->pointSymbol() ) { - case QgsPointCloudRenderer::PointSymbol::Circle: + case Qgis::PointCloudSymbol::Circle: symbol = Circle; break; - case QgsPointCloudRenderer::PointSymbol::Square: + case Qgis::PointCloudSymbol::Square: symbol = Square; break; }