Skip to content

Commit

Permalink
Use QgsDoubleSpinBox for 3d texture widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 10, 2020
1 parent 087cee5 commit 98327ef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/app/3d/qgsphongmaterialwidget.cpp
Expand Up @@ -26,7 +26,9 @@ QgsPhongMaterialWidget::QgsPhongMaterialWidget( QWidget *parent )
setMaterial( QgsPhongMaterialSettings() );

textureFile->setFilter( "Images (*.png *.xpm *.jpg *.jpeg *.bmp)" );
// btnDiffuse->setV

textureScaleSpinBox->setClearValue( 0 );
textureRotationSpinBox->setClearValue( 0 );

connect( btnDiffuse, &QgsColorButton::colorChanged, this, &QgsPhongMaterialWidget::changed );
connect( btnAmbient, &QgsColorButton::colorChanged, this, &QgsPhongMaterialWidget::changed );
Expand Down
12 changes: 9 additions & 3 deletions src/ui/3d/phongmaterialwidget.ui
Expand Up @@ -118,7 +118,7 @@
</widget>
</item>
<item row="5" column="1">
<widget class="QDoubleSpinBox" name="textureScaleSpinBox">
<widget class="QgsDoubleSpinBox" name="textureScaleSpinBox">
<property name="minimum">
<double>0.010000000000000</double>
</property>
Expand All @@ -141,12 +141,18 @@
</widget>
</item>
<item row="6" column="1">
<widget class="QDoubleSpinBox" name="textureRotationSpinBox">
<widget class="QgsDoubleSpinBox" name="textureRotationSpinBox">
<property name="suffix">
<string> °</string>
</property>
<property name="minimum">
<double>-360.000000000000000</double>
</property>
<property name="maximum">
<double>360.000000000000000</double>
</property>
<property name="singleStep">
<double>5.000000000000000</double>
<double>0.500000000000000</double>
</property>
</widget>
</item>
Expand Down

0 comments on commit 98327ef

Please sign in to comment.