]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Transparency of Gauss Points InfoWindow converted to percents fromat
authorouv <ouv@opencascade.com>
Wed, 12 Oct 2005 12:06:27 +0000 (12:06 +0000)
committerouv <ouv@opencascade.com>
Wed, 12 Oct 2005 12:06:27 +0000 (12:06 +0000)
src/VVTK/VVTK_PickingDlg.cxx
src/VVTK/VVTK_PickingDlg.h

index e8ab5ed83c47ebd55fb655ed9e2195e5dcf2ceb8..5ff46c773a13cacfc04494b55a0da30f4c809ee3 100644 (file)
@@ -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() );
index 67c973aa9b022db0a8a04fd87301625769408d4c..767dc3c7ba3dece32eeaf29531b8e114af6cea35 100644 (file)
@@ -56,7 +56,7 @@ private slots:
 
 private:
   QtxDblSpinBox*   myPyramidHeightSpinBox;
-  QtxDblSpinBox*   myTransparencySpinBox;
+  QtxIntSpinBox*   myTransparencySpinBox;
   QComboBox*       myPositionComboBox;
   QtxDblSpinBox*   myZoomFactorSpinBox;
   QtxIntSpinBox*   myStepNumberSpinBox;