connect( iWindowManager, SIGNAL( meetingActivated( Meeting * ) ), this, SLOT( fetchMeetingDetails( Meeting * ) ) );
connect( iWindowManager, SIGNAL( currentRoomChanged( Room * ) ), this, SLOT( currentRoomChanged( Room * ) ) );
connect( iWindowManager, SIGNAL( shownWeekChanged( QDate ) ), this, SLOT( shownWeekChanged( QDate ) ) );
+ connect( iWindowManager, SIGNAL( passwordEntered( PasswordDialog::PasswordStatus ) ),
+ this, SLOT( passwordEntered( PasswordDialog::PasswordStatus ) ) );
+ connect( iWindowManager, SIGNAL( progressBarCancelled() ), this, SLOT( progressBarCancelled() ) );
// initialize communication
iCommunication = new CommunicationManager( *(iConfiguration->connectionSettings()) );
iWindowManager->showPasswordDialog( iConfiguration->adminPassword(), message );
}
+
+void Engine::passwordEntered( PasswordDialog::PasswordStatus aPasswordStatus )
+{
+ qDebug() << "Engine::passwordEntered( PasswordDialog::PasswordStatus )";
+ iWindowManager->closePasswordDialog();
+
+ switch ( aPasswordStatus )
+ {
+ case PasswordDialog::Correct :
+ {
+ iWindowManager->showProgressBar( "Changing current operation mode." );
+ break;
+ }
+ case PasswordDialog::Incorrect :
+ {
+ iWindowManager->error( tr( "Incorrect password." ) );
+ iDevice->handleKeyPresses( true );
+ break;
+ }
+ default : //case PasswordDialog::Canceled
+ {
+ iDevice->handleKeyPresses( true );
+ }
+ }
+}
+
+void Engine::progressBarCancelled()
+{
+ //TODO: cancel the on-going event
+ iWindowManager->closeProgressBar();
+ iDevice->handleKeyPresses( true );
+}