X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2FUserInterface%2FWindowManager.cpp;h=3a593a9a450ddf4e993dabd25ec05b6513f6d1db;hb=1148d4487882be86017d0210a61d3d1b60d86676;hp=8107fbbe1b164f0ee3ef2fb46f6271322dd0c589;hpb=a4efac92adf76a72d0bacc30eb99b79d148588d6;p=qtmeetings diff --git a/src/UserInterface/WindowManager.cpp b/src/UserInterface/WindowManager.cpp index 8107fbb..3a593a9 100644 --- a/src/UserInterface/WindowManager.cpp +++ b/src/UserInterface/WindowManager.cpp @@ -160,53 +160,34 @@ void WindowManager::error( const QString &aErrorMessage ) 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; +}