From 1a729c9bf91d4d399d1e280bbefff641bfdb58db Mon Sep 17 00:00:00 2001 From: ouv Date: Wed, 12 Oct 2005 12:06:27 +0000 Subject: [PATCH] Transparency of Gauss Points InfoWindow converted to percents fromat --- src/VVTK/VVTK_PickingDlg.cxx | 10 +++++----- src/VVTK/VVTK_PickingDlg.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/VVTK/VVTK_PickingDlg.cxx b/src/VVTK/VVTK_PickingDlg.cxx index e8ab5ed8..5ff46c77 100644 --- a/src/VVTK/VVTK_PickingDlg.cxx +++ b/src/VVTK/VVTK_PickingDlg.cxx @@ -85,7 +85,7 @@ VVTK_PickingDlg::VVTK_PickingDlg( QWidget* parent, const char* name ) InfoWindowGroupLayout->setMargin(11); QLabel* TransparencyLabel = new QLabel( tr( "TRANSPARENCY" ), InfoWindowGroup ); - myTransparencySpinBox = new QtxDblSpinBox( 0.0, 1.0, 0.1, InfoWindowGroup ); + myTransparencySpinBox = new QtxIntSpinBox( 0, 100, 10, InfoWindowGroup ); myTransparencySpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); InfoWindowGroupLayout->addWidget( TransparencyLabel, 0, 0 ); @@ -172,7 +172,7 @@ void VVTK_PickingDlg::RemoveActor( VISU_GaussPtsAct* theActor ) void VVTK_PickingDlg::Update() { float aPyramidHeight = 10.0; - float anInfoWindowTransparency = 0.5; + int anInfoWindowTransparency = 50; int anInfoWindowPosition = VISU_PickingSettings::BelowPoint; float aZoomFactor = 1.5; int aStepNumber = 10; @@ -180,7 +180,7 @@ void VVTK_PickingDlg::Update() if( !myPickingSettings->GetInitial() ) { myPyramidHeightSpinBox->setValue( myPickingSettings->GetPyramidHeight() ); - myTransparencySpinBox->setValue( myPickingSettings->GetInfoWindowTransparency() ); + myTransparencySpinBox->setValue( myPickingSettings->GetInfoWindowTransparency() * 100.0 ); myPositionComboBox->setCurrentItem( myPickingSettings->GetInfoWindowPosition() ); myZoomFactorSpinBox->setValue( myPickingSettings->GetZoomFactor() ); myStepNumberSpinBox->setValue( myPickingSettings->GetStepNumber() ); @@ -193,7 +193,7 @@ void VVTK_PickingDlg::Update() aPyramidHeight = aResourceMgr->doubleValue( "VISU", "picking_pyramid_height", aPyramidHeight ); myPyramidHeightSpinBox->setValue( aPyramidHeight ); - anInfoWindowTransparency = aResourceMgr->doubleValue( "VISU", "picking_transparency", anInfoWindowTransparency ); + anInfoWindowTransparency = aResourceMgr->integerValue( "VISU", "picking_transparency", anInfoWindowTransparency ); myTransparencySpinBox->setValue( anInfoWindowTransparency ); anInfoWindowPosition = aResourceMgr->integerValue( "VISU", "picking_position", anInfoWindowPosition ); @@ -221,7 +221,7 @@ void VVTK_PickingDlg::onClickApply() myPickingSettings->SetInitial( false ); myPickingSettings->SetPyramidHeight( myPyramidHeightSpinBox->value() ); - myPickingSettings->SetInfoWindowTransparency( myTransparencySpinBox->value() ); + myPickingSettings->SetInfoWindowTransparency( myTransparencySpinBox->value() / 100.0 ); myPickingSettings->SetInfoWindowPosition( myPositionComboBox->currentItem() ); myPickingSettings->SetZoomFactor( myZoomFactorSpinBox->value() ); myPickingSettings->SetStepNumber( myStepNumberSpinBox->value() ); diff --git a/src/VVTK/VVTK_PickingDlg.h b/src/VVTK/VVTK_PickingDlg.h index 67c973aa..767dc3c7 100644 --- a/src/VVTK/VVTK_PickingDlg.h +++ b/src/VVTK/VVTK_PickingDlg.h @@ -56,7 +56,7 @@ private slots: private: QtxDblSpinBox* myPyramidHeightSpinBox; - QtxDblSpinBox* myTransparencySpinBox; + QtxIntSpinBox* myTransparencySpinBox; QComboBox* myPositionComboBox; QtxDblSpinBox* myZoomFactorSpinBox; QtxIntSpinBox* myStepNumberSpinBox; -- 2.39.2