Address review

This commit is contained in:
uclaros 2022-01-13 22:15:17 +02:00 committed by Nyall Dawson
parent be99a166d9
commit a28cd2ce11
4 changed files with 12 additions and 5 deletions

View File

@ -199,7 +199,7 @@ Abstract base class for 2d point cloud renderers.
enum DrawOrder
{
Unchanged,
Default,
BottomToTop,
TopToBottom,
};
@ -378,6 +378,8 @@ Returns the map unit scale used for the point size.
Returns the drawing order used by the renderer for drawing points.
.. seealso:: :py:func:`setDrawOrder2d`
.. versionadded:: 3.24
%End
void setDrawOrder2d( DrawOrder order );
@ -385,6 +387,8 @@ Returns the drawing order used by the renderer for drawing points.
Sets the drawing ``order`` used by the renderer for drawing points.
.. seealso:: :py:func:`drawOrder2d`
.. versionadded:: 3.24
%End
PointSymbol pointSymbol() const;

View File

@ -190,7 +190,7 @@ bool QgsPointCloudLayerRenderer::render()
nodesDrawn += renderNodesSorted( nodes, pc, context, request, canceled, mRenderer->drawOrder2d() );
break;
}
case QgsPointCloudRenderer::DrawOrder::Unchanged:
case QgsPointCloudRenderer::DrawOrder::Default:
{
if ( pc->accessType() == QgsPointCloudIndex::AccessType::Local )
{

View File

@ -274,10 +274,11 @@ class CORE_EXPORT QgsPointCloudRenderer
/**
* Pointcloud rendering order for 2d views
* /since QGIS 3.24
*/
enum DrawOrder
{
Unchanged, //!< Draw points in the order they are stored
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
};
@ -450,6 +451,7 @@ class CORE_EXPORT QgsPointCloudRenderer
* Returns the drawing order used by the renderer for drawing points.
*
* \see setDrawOrder2d()
* \since QGIS 3.24
*/
DrawOrder drawOrder2d() const;
@ -457,6 +459,7 @@ class CORE_EXPORT QgsPointCloudRenderer
* Sets the drawing \a order used by the renderer for drawing points.
*
* \see drawOrder2d()
* \since QGIS 3.24
*/
void setDrawOrder2d( DrawOrder order );
@ -616,7 +619,7 @@ class CORE_EXPORT QgsPointCloudRenderer
PointSymbol mPointSymbol = Square;
int mPainterPenWidth = 1;
DrawOrder mDrawOrder2d = Unchanged;
DrawOrder mDrawOrder2d = DrawOrder::Default;
};
#endif // QGSPOINTCLOUDRENDERER_H

View File

@ -101,7 +101,7 @@ QgsPointCloudRendererPropertiesWidget::QgsPointCloudRendererPropertiesWidget( Qg
connect( mPointSizeSpinBox, qOverload<double>( &QgsDoubleSpinBox::valueChanged ), this, &QgsPointCloudRendererPropertiesWidget::emitWidgetChanged );
connect( mPointSizeUnitWidget, &QgsUnitSelectionWidget::changed, this, &QgsPointCloudRendererPropertiesWidget::emitWidgetChanged );
mDrawOrderComboBox->addItem( tr( "Default" ), QgsPointCloudRenderer::DrawOrder::Unchanged );
mDrawOrderComboBox->addItem( tr( "Default" ), QgsPointCloudRenderer::DrawOrder::Default );
mDrawOrderComboBox->addItem( tr( "Bottom to top" ), QgsPointCloudRenderer::DrawOrder::BottomToTop );
mDrawOrderComboBox->addItem( tr( "Top to bottom" ), QgsPointCloudRenderer::DrawOrder::TopToBottom );