From: caremoli Date: Mon, 10 Jan 2011 14:48:04 +0000 (+0000) Subject: CCAR: In transparency dialog set tracking to false to avoid setting transparency X-Git-Tag: Start_BR_19998_21191~84 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2afbe2f2dc77da963e6bdd80688452e054ceed51;p=modules%2Fgeom.git CCAR: In transparency dialog set tracking to false to avoid setting transparency for each move of the cursor. The transparency is only set when cursor is up. --- diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx index 33940d0a0..6e39d15d0 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx @@ -120,6 +120,7 @@ GEOMToolsGUI_TransparencyDlg::GEOMToolsGUI_TransparencyDlg( QWidget* parent ) mySlider->setSingleStep( 1 ); mySlider->setPageStep( 10 ); //mySlider->setValue( 5 ); + mySlider->setTracking(false); mySlider->setTickPosition( QSlider::TicksLeft ); GroupC1Layout->addWidget( mySlider, 1, 0, 1, 3 ); @@ -155,7 +156,7 @@ GEOMToolsGUI_TransparencyDlg::GEOMToolsGUI_TransparencyDlg( QWidget* parent ) connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp())); connect(mySlider, SIGNAL(valueChanged(int)), this, SLOT(SetTransparency())); - connect(mySlider, SIGNAL(sliderMoved(int)), this, SLOT(ValueHasChanged())); + connect(mySlider, SIGNAL(sliderMoved(int)), this, SLOT(SliderHasMoved(int))); } @@ -224,6 +225,15 @@ void GEOMToolsGUI_TransparencyDlg::ValueHasChanged() myValueLab->setText( QString("%1%").arg( mySlider->value() ) ); } +//================================================================================= +// function : SliderHasMoved() +// purpose : Called when value of slider change +//================================================================================= +void GEOMToolsGUI_TransparencyDlg::SliderHasMoved(int value) +{ + myValueLab->setText( QString("%1%").arg( value ) ); +} + //================================================================================= // function : SetTransparency() // purpose : Called when value of slider change diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h index 1b05179af..e33303d6c 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h +++ b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h @@ -61,6 +61,7 @@ private slots: void ClickOnClose(); void ClickOnHelp(); void ValueHasChanged(); + void SliderHasMoved(int); void SetTransparency(); };