From fef60a5784983fc836f6629736013d7fb62e4ba4 Mon Sep 17 00:00:00 2001 From: apo Date: Tue, 20 Nov 2007 15:41:58 +0000 Subject: [PATCH] To call QApplication::setOverrideCursor(Qt::waitCursor) whenever ColoredPrs3d::Apply method is called --- src/VISUGUI/VisuGUI_FieldFilter.cxx | 5 +++++ src/VISUGUI/VisuGUI_InputPane.cxx | 8 ++++++++ src/VISUGUI/VisuGUI_Slider.cxx | 4 ++++ 3 files changed, 17 insertions(+) diff --git a/src/VISUGUI/VisuGUI_FieldFilter.cxx b/src/VISUGUI/VisuGUI_FieldFilter.cxx index c2a0ca79..807d2157 100644 --- a/src/VISUGUI/VisuGUI_FieldFilter.cxx +++ b/src/VISUGUI/VisuGUI_FieldFilter.cxx @@ -96,7 +96,12 @@ bool VisuGUI_FieldFilter::isOk( const SUIT_DataOwner* theDataOwner ) const anInput.myFieldName = CORBA::string_dup( aFieldName.latin1() ); anInput.myTimeStampNumber = 1; + QApplication::setOverrideCursor(Qt::waitCursor); + size_t isOk = VISU::CheckIsPossible( myType, anInput, true ); + + QApplication::restoreOverrideCursor(); + return isOk > 0; } } diff --git a/src/VISUGUI/VisuGUI_InputPane.cxx b/src/VISUGUI/VisuGUI_InputPane.cxx index 90915b17..b468e4fb 100644 --- a/src/VISUGUI/VisuGUI_InputPane.cxx +++ b/src/VISUGUI/VisuGUI_InputPane.cxx @@ -409,6 +409,8 @@ void VisuGUI_InputPane::onSelectionChanged() if( myReInit->isChecked() && myPrs ) { + QApplication::setOverrideCursor(Qt::waitCursor); + myPrs->SetResultObject( myResult ); myPrs->SetMeshName( aMeshName.latin1() ); myPrs->SetEntity( VISU::Entity( myEntity ) ); @@ -417,6 +419,8 @@ void VisuGUI_InputPane::onSelectionChanged() myPrs->Apply( true ); myDialog->initFromPrsObject( myPrs, false ); + + QApplication::restoreOverrideCursor(); } } } @@ -425,9 +429,13 @@ void VisuGUI_InputPane::onSelectionChanged() //--------------------------------------------------------------- void VisuGUI_InputPane::changeTimeStamp( int theTimeStamp ) { + QApplication::setOverrideCursor(Qt::waitCursor); + myPrs->SetTimeStampNumber( myPrs->GetTimeStampNumberByIndex( theTimeStamp ) ); myPrs->Apply( true ); myDialog->initFromPrsObject( myPrs, false ); + + QApplication::restoreOverrideCursor(); } diff --git a/src/VISUGUI/VisuGUI_Slider.cxx b/src/VISUGUI/VisuGUI_Slider.cxx index fe6cf3eb..2e6c8c0e 100644 --- a/src/VISUGUI/VisuGUI_Slider.cxx +++ b/src/VISUGUI/VisuGUI_Slider.cxx @@ -436,7 +436,11 @@ void VisuGUI_Slider::onValueChanged( int value ) VISU::ColoredPrs3dHolder::BasicInput_var anInput = aHolder->GetBasicInput(); anInput->myTimeStampNumber = aNumber; + QApplication::setOverrideCursor(Qt::waitCursor); + aHolder->Apply( aPrs3d, anInput, myView3D ); + + QApplication::restoreOverrideCursor(); } updateMemoryState(); -- 2.39.2