{
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;
}
}
bool DeviceConfigurator::toggleScreenSwitchOff( bool aEnable )
-{
+{
qDebug() << "DeviceConfigurator::toggleScreenSwitchOff( bool )";
QString command = "gconftool-2";
QStringList args;
void DeviceManager::modeChanged()
{
if( iModeToggler != 0 ) {
- if ( iModeToggler->success() ) { //mode changing went well
- delete iModeToggler;
- iModeToggler = 0;
+ if ( iModeToggler->success() ) //mode changing went well
iConfigurator->restartDevice();
- }
+ else
+ emit changingModeFailed();
+ delete iModeToggler;
+ iModeToggler = 0;
}
//in case device restarting fails we just continue
* \param aMessage Explains the sub-change
*/
void changingMode( const QString &aMessage );
+ //! Signal. Emitted if the operation mode change fails.
+ /*!
+ * Signal. Emitted if the operation mode change fails.
+ */
+ void changingModeFailed();
private slots:
//! Slot. Handles "full screen"-hardware key presses.
connect( buttonCancel, SIGNAL( pressed() ), this, SIGNAL( cancel() ) );
}
mainLayout->addLayout( subLayout );
+ mainLayout->setAlignment( Qt::AlignCenter );
setLayout( mainLayout );
}
qDebug() << "WindowManager::showProgressBar( const QString & )";
if( iProgressBar == 0 ) {
iProgressBar = new ProgressBar( aText, aCancellable );
+ iProgressBar->setFixedSize( 600, 125 );
iProgressBar->show();
connect( iProgressBar, SIGNAL( cancel() ), this, SIGNAL( progressBarCancelled() ) );
}