From: ouv Date: Fri, 25 Nov 2005 09:11:15 +0000 (+0000) Subject: Wait cursor was set for "Build at once" mode. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f68ae283e6285a85a15edbd150ea8bdb116a56a6;p=modules%2Fvisu.git Wait cursor was set for "Build at once" mode. --- diff --git a/src/VISUGUI/VISUM_msg_en.po b/src/VISUGUI/VISUM_msg_en.po index 1868fa51..0d307685 100644 --- a/src/VISUGUI/VISUM_msg_en.po +++ b/src/VISUGUI/VISUM_msg_en.po @@ -6,6 +6,12 @@ msgstr "" "Last-Translator: FULLNAME \n" "Content-Type: text/plain; charset=iso-8859-1\n" +msgid "INF_VISU" +msgstr "Post-Pro Info" + +msgid "IMPORT_DONE" +msgstr "Importing is done" + msgid "VisuGUI_Module::MEN_VISUALISATION" msgstr "Visualization" diff --git a/src/VISUGUI/VisuGUI_BuildProgressDlg.cxx b/src/VISUGUI/VisuGUI_BuildProgressDlg.cxx index ed042378..fa55ba80 100644 --- a/src/VISUGUI/VisuGUI_BuildProgressDlg.cxx +++ b/src/VISUGUI/VisuGUI_BuildProgressDlg.cxx @@ -29,8 +29,9 @@ #include "VisuGUI_Tools.h" -#include "SUIT_ResourceMgr.h" #include "SUIT_FileDlg.h" +#include "SUIT_MessageBox.h" +#include "SUIT_ResourceMgr.h" #include @@ -216,11 +217,6 @@ void VisuGUI_BuildProgressDlg::onStart() myResult->SetBuildFields( myBuildFieldsCheckBox->isChecked(), myBuildMinMaxCheckBox->isChecked() ); myResult->SetBuildGroups( myBuildGroupsCheckBox->isChecked() ); - myResult->Build( aBuildAll, aBuildAtOnce ); - - //if( aBuildAtOnce ) - // onClose(); - //setModal( false ); myFileNameLineEdit->setReadOnly( true ); /* @@ -234,10 +230,16 @@ void VisuGUI_BuildProgressDlg::onStart() myStartButton->setEnabled( false ); - myCurrentTime = vtkTimerLog::GetCurrentTime(); + if( aBuildAtOnce ) + { + QApplication::setOverrideCursor( Qt::waitCursor ); + myCurrentTime = vtkTimerLog::GetCurrentTime(); + } myTime.setHMS( 0, 0, 0 ); myTimer->start( 100 ); + + myResult->Build( aBuildAll, aBuildAtOnce ); } void VisuGUI_BuildProgressDlg::onClose() @@ -276,17 +278,17 @@ void VisuGUI_BuildProgressDlg::onTimer() if( myTime.minute() > 9 && myTimeLCDNumber->numDigits() < 9 ) myTimeLCDNumber->setNumDigits( 9 ); myTimeLCDNumber->display( myTime.toString( "m:ss.zzz" ) ); - } - bool isEntitiesDone = myResult->IsEntitiesDone(); - bool isFieldsDone = myResult->IsFieldsDone(); - bool isMinMaxDone = myResult->IsMinMaxDone(); - bool isGroupsDone = myResult->IsGroupsDone(); + bool isEntitiesDone = myResult->IsEntitiesDone(); + bool isFieldsDone = myResult->IsFieldsDone(); + bool isMinMaxDone = myResult->IsMinMaxDone(); + bool isGroupsDone = myResult->IsGroupsDone(); - updateButton( myBuildEntitiesButton, isEntitiesDone ); - updateButton( myBuildFieldsButton, isFieldsDone ); - updateButton( myBuildMinMaxButton, isMinMaxDone ); - updateButton( myBuildGroupsButton, isGroupsDone ); + updateButton( myBuildEntitiesButton, isEntitiesDone ); + updateButton( myBuildFieldsButton, isFieldsDone ); + updateButton( myBuildMinMaxButton, isMinMaxDone ); + updateButton( myBuildGroupsButton, isGroupsDone ); + } if( myResult->IsDone() ) { @@ -294,6 +296,8 @@ void VisuGUI_BuildProgressDlg::onTimer() if( aBuildAtOnce ) { + QApplication::restoreOverrideCursor(); + QTime aTime; int mSecs = ( int )( 1000 * ( vtkTimerLog::GetCurrentTime() - myCurrentTime ) ); aTime = aTime.addMSecs( mSecs ); @@ -301,6 +305,8 @@ void VisuGUI_BuildProgressDlg::onTimer() myTimeLCDNumber->setNumDigits( 9 ); myTimeLCDNumber->display( aTime.toString( "m:ss.zzz" ) ); } + + SUIT_MessageBox::warn1( this, tr( "INF_VISU" ), tr( "IMPORT_DONE" ), tr( "BUT_OK" ) ); } } catch( ... ) {