From: apo Date: Fri, 6 Jun 2008 09:24:38 +0000 (+0000) Subject: To improve dockwidget visibility management X-Git-Tag: TG_VISU_2008_2008-06-26~25 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=06c68d16f31cd87cbab1bf651a32c0408af325ad;p=modules%2Fvisu.git To improve dockwidget visibility management --- diff --git a/src/VISUGUI/VisuGUI_Slider.cxx b/src/VISUGUI/VisuGUI_Slider.cxx index c03e6694..aed93da6 100644 --- a/src/VISUGUI/VisuGUI_Slider.cxx +++ b/src/VISUGUI/VisuGUI_Slider.cxx @@ -83,6 +83,7 @@ VisuGUI_Slider::VisuGUI_Slider( VisuGUI* theModule, , myModule( theModule ) { setWindowTitle( tr("TITLE") ); + setObjectName( tr("TITLE") ); SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr(); @@ -285,6 +286,7 @@ VisuGUI_Slider::VisuGUI_Slider( VisuGUI* theModule, QtxDockWidget* aQtxDockWidget = new QtxDockWidget( true, theParent ); theParent->addDockWidget( Qt::BottomDockWidgetArea , aQtxDockWidget ); + aQtxDockWidget->setObjectName( objectName() ); aQtxDockWidget->setWidget( this ); myToggleViewAction = aQtxDockWidget->toggleViewAction(); @@ -292,9 +294,9 @@ VisuGUI_Slider::VisuGUI_Slider( VisuGUI* theModule, myToggleViewAction->setToolTip( tr( "MEN_SLIDER_PANE" ) ); myToggleViewAction->setText( tr( "MEN_SLIDER_PANE" ) ); myToggleViewAction->setCheckable( true ); + aQtxDockWidget->setVisible( false ); connect( myToggleViewAction, SIGNAL( toggled( bool ) ), this, SLOT( onToggleView( bool ) ) ); - //myToggleViewAction->setChecked( false ); } @@ -556,7 +558,6 @@ void VisuGUI_Slider::onToggleView( bool on ) { if ( !on ) { onPlay( on ); - hide(); } } diff --git a/src/VISUGUI/VisuGUI_Sweep.cxx b/src/VISUGUI/VisuGUI_Sweep.cxx index 520f1796..11c0569b 100644 --- a/src/VISUGUI/VisuGUI_Sweep.cxx +++ b/src/VISUGUI/VisuGUI_Sweep.cxx @@ -72,6 +72,7 @@ VisuGUI_Sweep::VisuGUI_Sweep( VisuGUI* theModule, , myActor( NULL ) { setWindowTitle( tr("TITLE") ); + setObjectName( tr("TITLE") ); SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr(); @@ -222,6 +223,7 @@ VisuGUI_Sweep::VisuGUI_Sweep( VisuGUI* theModule, //---------------------------------------------------------------------------- QtxDockWidget* aQtxDockWidget = new QtxDockWidget( true, theParent ); theParent->addDockWidget( Qt::BottomDockWidgetArea , aQtxDockWidget ); + aQtxDockWidget->setObjectName( objectName() ); aQtxDockWidget->setWidget( this ); myToggleViewAction = aQtxDockWidget->toggleViewAction(); @@ -229,9 +231,9 @@ VisuGUI_Sweep::VisuGUI_Sweep( VisuGUI* theModule, myToggleViewAction->setToolTip( tr( "MEN_SWEEP_PANE" ) ); myToggleViewAction->setText( tr( "MEN_SWEEP_PANE" ) ); myToggleViewAction->setCheckable( true ); + aQtxDockWidget->setVisible( false ); connect( myToggleViewAction, SIGNAL( toggled( bool ) ), this, SLOT( onToggleView( bool ) ) ); - //myToggleViewAction->setChecked( false ); //---------------------------------------------------------------------------- myTimer = new QTimer( this ); @@ -386,11 +388,6 @@ void VisuGUI_Sweep::onValueChanged( int value ) break; } -// cout << "VisuGUI_Sweep::onValueChanged - ( " << value -// << "; " << anArgument -// << "; " << aValue -// << ")" << endl; - try { myScalarMap->SetMapScale( aValue ); myScalarMap->UpdateActor( myActor ); @@ -479,7 +476,6 @@ void VisuGUI_Sweep::onToggleView( bool on ) { if ( !on ) { onPlay( on ); - hide(); } }