X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2FBusinessLogic%2FEngine.cpp;h=a61006c59250c752772eae107c27d94265b44e16;hb=deb6aee06a80416a24a64c2ac6349a2341acdc39;hp=2f9d3cdb2c140c9d9274686de8d076c1e8678de3;hpb=a58a54b0935c2098c1aadb70f75ac5f420c74769;p=qtmeetings diff --git a/src/BusinessLogic/Engine.cpp b/src/BusinessLogic/Engine.cpp index 2f9d3cd..a61006c 100644 --- a/src/BusinessLogic/Engine.cpp +++ b/src/BusinessLogic/Engine.cpp @@ -207,6 +207,13 @@ void Engine::fetchMeetings() void Engine::fetchMeetingDetails( Meeting *aMeeting ) { qDebug() << "Engine::fetchMeetingDetails( Meeting* )"; + iWindowManager->showProgressBar( tr("Please Wait"), true ); + iWindowManager->updateProgressBar( tr("Fetching Meeting Details...") ); + connect( iWindowManager, + SIGNAL( progressBarCancelled() ), + this, + SLOT( fetchMeetingDetailsCancelled() ) + ); iCommunication->fetchMeetingDetails( *aMeeting ); } @@ -261,6 +268,7 @@ void Engine::meetingsFetched( const QList &aMeetings ) void Engine::meetingDetailsFetched( Meeting &aDetailedMeeting ) { qDebug() << "Engine::meetingDetailsFetched( Meeting & )"; + iWindowManager->closeProgressBar(); iWindowManager->showMeetingInfo( &aDetailedMeeting ); } @@ -268,8 +276,9 @@ void Engine::errorHandler( int aCode, const QString &aAddInfo ) { qDebug() << "Engine::ErrorHandler, aCode: " << aCode; // inform UI about the problem - if( aCode >= 100 && aCode <= 110 ) + if( aCode >= 100 && aCode <= 150 ) qDebug() << "CommunicationManager signaled an error:" << aCode; + iWindowManager->closeProgressBar(); iWindowManager->error( ErrorMapper::codeToString( aCode, aAddInfo ) ); } @@ -314,10 +323,11 @@ void Engine::passwordEntered( PasswordDialog::PasswordStatus aPasswordStatus ) { case PasswordDialog::Correct : { - iWindowManager->showProgressBar( "Changing current operation mode." ); + iWindowManager->showProgressBar( "Changing current operation mode.", true ); connect( iWindowManager, SIGNAL( progressBarCancelled() ), this, SLOT( progressBarCancelled() ) ); connect( iDevice, SIGNAL( changingMode( const QString & ) ), iWindowManager, SLOT( updateProgressBar( const QString & ) ) ); + connect( iDevice, SIGNAL( changingModeFailed() ), this, SLOT( progressBarCancelled() ) ); iDevice->changeMode( true ); break; } @@ -341,3 +351,9 @@ void Engine::progressBarCancelled() iWindowManager->closeProgressBar(); iDevice->changeMode( false ); } + +void Engine::fetchMeetingDetailsCancelled() +{ + iCommunication->cancelFetchMeetingDetails(); + iWindowManager->closeProgressBar(); +}