X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2FBusinessLogic%2FEngine.cpp;h=0c7667994e48793776c0fbeafbef7aadcadee1f2;hb=f51d61d96002d4b5ad5d52699c6d52a4dea07159;hp=0b68a03d5527d3fa0990b18cdcd5fcc968b00123;hpb=e6424950847505ac767d517f17df7830ad34b2ea;p=qtmeetings diff --git a/src/BusinessLogic/Engine.cpp b/src/BusinessLogic/Engine.cpp index 0b68a03..0c76679 100644 --- a/src/BusinessLogic/Engine.cpp +++ b/src/BusinessLogic/Engine.cpp @@ -191,6 +191,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 ); } @@ -258,9 +265,10 @@ 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->error( ErrorMapper::codeToString( aCode, aAddInfo ) ); + // iWindowManager->closeProgressBar(); + // iWindowManager->error( ErrorMapper::codeToString( aCode, aAddInfo ) ); } void Engine::currentRoomChanged( Room *aCurrentRoom ) @@ -309,6 +317,10 @@ void Engine::passwordEntered( PasswordDialog::PasswordStatus aPasswordStatus ) // connect( iWindowManager, SIGNAL( progressBarCancelled() ), this, SLOT( progressBarCancelled() ) ); // connect( iDevice, SIGNAL( changingMode( const QString & ) ), // iWindowManager, SLOT( updateProgressBar( const QString & ) ) ); + // TODO : Connect the signal directory to progress bar dialog which should be instance in engine +// connect( iDevice, SIGNAL( changingMode( const QString & ) ), +// iWindowManager, SLOT( updateProgressBar( const QString & ) ) ); + connect( iDevice, SIGNAL( changingModeFailed() ), this, SLOT( progressBarCancelled() ) ); iDevice->changeMode( true ); break; } @@ -467,4 +479,10 @@ void Engine::previousViewRestored() { iIdleTimeCounter->start(); } -} \ No newline at end of file +} + +void Engine::fetchMeetingDetailsCancelled() +{ + iCommunication->cancelFetchMeetingDetails(); + iWindowManager->closeProgressBar(); +}