PopUpMessageBox::error( 0, aErrorMessage );
}
-void WindowManager::passwordEntered( PasswordDialog::PasswordStatus aPasswordStatus )
-{
- delete iPasswordDialog;
- iPasswordDialog = 0;
-
- switch ( aPasswordStatus )
- {
- case PasswordDialog::Correct :
- {
- progressBar( tr( "Changing operation mode" ), true );
- iProgressBar->show();
- while(1);
- break;
- }
- case PasswordDialog::Incorrect :
- {
- error( tr( "Incorrect password." ) );
- break;
- }
- default : //case PasswordDialog::Canceled
- {
- }
- }
-}
-
void WindowManager::showPasswordDialog( QByteArray aAdminPassword, const QString &aMessage )
{
iPasswordDialog = new PasswordDialog( aAdminPassword, aMessage );
+ connect( iPasswordDialog, SIGNAL( passwordEntered( PasswordDialog::PasswordStatus ) ),
+ this, SIGNAL( passwordEntered( PasswordDialog::PasswordStatus ) ) );
iPasswordDialog->show();
}
+void WindowManager::closePasswordDialog()
+{
+ iPasswordDialog->close();
+ delete iPasswordDialog;
+ iPasswordDialog = 0;
+}
-void WindowManager::progressBar( const QString &aText, bool aStart )
+void WindowManager::showProgressBar( const QString &aText )
{
- qDebug() << "WindowManager::progressBar( const QString &, bool)";
- if( aStart ) {
- if( iProgressBar == 0 ) {
- iProgressBar = new ProgressBar( aText );
- connect( iProgressBar, SIGNAL( cancel() ), this, SLOT( progressBar() ) );
- connect( iProgressBar, SIGNAL( started() ), this, SLOT( changeMode() ) );
- }
- }
- else {
- if( iProgressBar != 0 ) {
- delete iProgressBar;
- iProgressBar = 0;
- }
+ qDebug() << "WindowManager::showProgressBar( const QString & )";
+ if( iProgressBar == 0 ) {
+ iProgressBar = new ProgressBar( aText );
+ iProgressBar->show();
+ connect( iProgressBar, SIGNAL( cancel() ), this, SIGNAL( progressBarCancelled() ) );
}
}
+void WindowManager::closeProgressBar()
+{
+ iProgressBar->close();
+ delete iProgressBar;
+ iProgressBar = 0;
+}