X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_TransparencyDlg.cxx;h=9c74121db115aadb1de1336c6812a56fb1559cad;hb=2633709b2815696000c9d457a914680e1f8840d2;hp=28f5af456485effd84a86eaf81867d4c335e72b4;hpb=7af78cc3d0b95ec53ab6ec83a92b1df4a9fb6b2a;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_TransparencyDlg.cxx b/src/SMESHGUI/SMESHGUI_TransparencyDlg.cxx index 28f5af456..9c74121db 100644 --- a/src/SMESHGUI/SMESHGUI_TransparencyDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_TransparencyDlg.cxx @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. // -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SMESH SMESHGUI : GUI for SMESH component // File : SMESHGUI_TransparencyDlg.cxx // Author : Nicolas REJNERI, Open CASCADE S.A.S. @@ -86,7 +87,7 @@ SMESHGUI_TransparencyDlg::SMESHGUI_TransparencyDlg( SMESHGUI* theModule ) GroupC1Layout->setMargin( MARGIN ); TextLabelTransparent = new QLabel( tr( "SMESH_TRANSPARENCY_TRANSPARENT" ), GroupC1 ); - TextLabelTransparent->setAlignment( Qt::AlignLeft ); + TextLabelTransparent->setAlignment( Qt::AlignRight ); ValueLab = new QLabel( GroupC1 ); ValueLab->setAlignment( Qt::AlignCenter ); @@ -94,7 +95,7 @@ SMESHGUI_TransparencyDlg::SMESHGUI_TransparencyDlg( SMESHGUI* theModule ) QFont fnt = ValueLab->font(); fnt.setBold( true ); ValueLab->setFont( fnt ); TextLabelOpaque = new QLabel( tr( "SMESH_TRANSPARENCY_OPAQUE" ), GroupC1 ); - TextLabelOpaque->setAlignment( Qt::AlignRight ); + TextLabelOpaque->setAlignment( Qt::AlignLeft ); Slider1 = new QSlider( Qt::Horizontal, GroupC1 ); Slider1->setRange( 0, 100 ); @@ -106,9 +107,9 @@ SMESHGUI_TransparencyDlg::SMESHGUI_TransparencyDlg( SMESHGUI* theModule ) Slider1->setFocusPolicy( Qt::NoFocus ); Slider1->setMinimumWidth( 300 ); - GroupC1Layout->addWidget( TextLabelTransparent, 0, 0 ); + GroupC1Layout->addWidget( TextLabelOpaque, 0, 0 ); GroupC1Layout->addWidget( ValueLab, 0, 1 ); - GroupC1Layout->addWidget( TextLabelOpaque, 0, 2 ); + GroupC1Layout->addWidget( TextLabelTransparent, 0, 2 ); GroupC1Layout->addWidget( Slider1, 1, 0, 1, 3 ); /*************************************************************************/ @@ -197,7 +198,7 @@ void SMESHGUI_TransparencyDlg::SetTransparency() { if ( myViewWindow ) { SUIT_OverrideCursor wc; - float opacity = Slider1->value() / 100.; + float opacity = ( 100 - Slider1->value() ) / 100.; SALOME_ListIO aList; mySelectionMgr->selectedObjects( aList ); @@ -266,7 +267,7 @@ void SMESHGUI_TransparencyDlg::onSelectionChanged() } else { } - Slider1->setValue( opacity ); + Slider1->setValue( 100 - opacity ); } ValueHasChanged(); }