Fix code to best practices

This commit is contained in:
Withalion 2024-11-19 13:23:42 +01:00 committed by Martin Dobias
parent 1551449df3
commit 7d9d87491b
2 changed files with 12 additions and 6 deletions

View File

@ -88,11 +88,11 @@ void Qgs3DDebugWidget::setMapSettings( Qgs3DMapSettings *mapSettings )
{
mMap->setDebugShadowMapSettings( enabled && mMap->shadowSettings().renderShadows(), static_cast<Qt::Corner>( mDebugShadowMapCornerComboBox->currentIndex() ), mDebugShadowMapSizeSpinBox->value() );
} );
connect( mDebugShadowMapCornerComboBox, QOverload<int>::of( &QComboBox::currentIndexChanged ), this, [ = ]( const int index )
connect( mDebugShadowMapCornerComboBox, qOverload<int>( &QComboBox::currentIndexChanged ), this, [ = ]( const int index )
{
mMap->setDebugShadowMapSettings( mDebugShadowMapGroupBox->isChecked() && mMap->shadowSettings().renderShadows(), static_cast<Qt::Corner>( index ), mDebugShadowMapSizeSpinBox->value() );
} );
connect( mDebugShadowMapSizeSpinBox, QOverload<double>::of( &QDoubleSpinBox::valueChanged ), this, [ = ]( const double value )
connect( mDebugShadowMapSizeSpinBox, qOverload<double>( &QDoubleSpinBox::valueChanged ), this, [ = ]( const double value )
{
mMap->setDebugShadowMapSettings( mDebugShadowMapGroupBox->isChecked() && mMap->shadowSettings().renderShadows(), static_cast<Qt::Corner>( mDebugShadowMapCornerComboBox->currentIndex() ), value );
} );
@ -104,11 +104,11 @@ void Qgs3DDebugWidget::setMapSettings( Qgs3DMapSettings *mapSettings )
{
mMap->setDebugDepthMapSettings( enabled, static_cast<Qt::Corner>( mDebugDepthMapCornerComboBox->currentIndex() ), mDebugDepthMapSizeSpinBox->value() );
} );
connect( mDebugDepthMapCornerComboBox, QOverload<int>::of( &QComboBox::currentIndexChanged ), this, [ = ]( const int index )
connect( mDebugDepthMapCornerComboBox, qOverload<int>( &QComboBox::currentIndexChanged ), this, [ = ]( const int index )
{
mMap->setDebugDepthMapSettings( mDebugDepthMapGroupBox->isChecked(), static_cast<Qt::Corner>( index ), mDebugDepthMapSizeSpinBox->value() );
} );
connect( mDebugDepthMapSizeSpinBox, QOverload<double>::of( &QDoubleSpinBox::valueChanged ), this, [ = ]( const double value )
connect( mDebugDepthMapSizeSpinBox, qOverload<double>( &QDoubleSpinBox::valueChanged ), this, [ = ]( const double value )
{
mMap->setDebugDepthMapSettings( mDebugDepthMapGroupBox->isChecked(), static_cast<Qt::Corner>( mDebugDepthMapCornerComboBox->currentIndex() ), value );
} );

View File

@ -24,7 +24,7 @@
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item>
<widget class="QScrollArea" name="scrollArea">
<widget class="QgsScrollArea" name="scrollArea">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
@ -44,7 +44,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-295</y>
<y>0</y>
<width>250</width>
<height>790</height>
</rect>
@ -356,6 +356,12 @@
<extends>QDoubleSpinBox</extends>
<header>qgsdoublespinbox.h</header>
</customwidget>
<customwidget>
<class>QgsScrollArea</class>
<extends>QScrollArea</extends>
<header>qgsscrollarea.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>