progressView = new ProgressView( widget );
progressView->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding ) );
progressView->setMinimumSize( 100, 10 );
+ // possibility to ignore all errors
+ ignoreErrCBox = new QCheckBox( tr( "Ignore errors" ), widget );
+ setAboutInfo( ignoreErrCBox, tr( "Check this option if you want to proceed installation \nprocess even there will be some errors" ) );
+ ignoreErrCBox->setChecked( false );
+ // product installation status bar
statusLab = new QLabel( widget );
statusLab->setFrameShape( QButtonGroup::LineEditPanel );
setAboutInfo( progressView, tr( "Installation status on the selected products" ) );
// layouting
layout->addRowSpacing( 0, 6 );
- layout->addWidget( resultLab, 1, 0 );
- layout->addWidget( progressView, 2, 0 );
- layout->addWidget( statusLab, 3, 0 );
+ layout->addWidget( resultLab, 1, 0 );
+ layout->addWidget( progressView, 2, 0 );
+ layout->addWidget( ignoreErrCBox, 3, 0 );
+ layout->addWidget( statusLab, 4, 0 );
// layouting
pageLayout->addWidget( splitter, 0, 0 );
// adding page
QMessageBox::NoButton );
// enable <Next> button
setNextEnabled( true );
- nextButton()->setText( tr( "&Start" ) );
- setAboutInfo( nextButton(), tr( "Start installation process" ) );
- // reconnect Next button - to use it as Start button
- disconnect( this, SIGNAL( nextClicked() ), this, SLOT( next() ) );
- disconnect( this, SIGNAL( nextClicked() ), this, SLOT( onStart() ) );
+ doPostActions( tr( "&Start" ), tr( "Start installation process" ) );
connect( this, SIGNAL( nextClicked() ), this, SLOT( onStart() ) );
// enable <Back> button
setBackEnabled( true );
}
return;
}
+
+ // else try to find aborted product
+ prodProc = progressView->findStatus( Aborted );
+ if ( !prodProc.isNull() )
+ return; // installation has been aborted
+
___MESSAGE___( "All products have been installed successfully" );
// all products are installed successfully
MapProducts::Iterator mapIter;
statusLab->setText( tr( "Installation completed" ) );
// <Next> button
setNextEnabled( true );
- nextButton()->setText( tr( "&Next >" ) );
- setAboutInfo( nextButton(), tr( "Move to the next step of the installation procedure" ) );
- disconnect( this, SIGNAL( nextClicked() ), this, SLOT( next() ) );
- disconnect( this, SIGNAL( nextClicked() ), this, SLOT( onStart() ) );
+ doPostActions( tr( "&Next >" ), tr( "Move to the next step of the installation procedure" ) );
connect( this, SIGNAL( nextClicked() ), this, SLOT( next() ) );
// <Back> button
setBackEnabled( true );
if ( hasErrors ) {
if ( QMessageBox::warning( this,
tr( "Warning" ),
- tr( "There were some errors and/or warnings during the installation.\n"
+ tr( "There were some errors during the installation.\n"
"Do you want to save the installation log?" ),
tr( "&Save" ),
tr( "&Cancel" ),
// ================================================================
void SALOME_InstallWizard::pageChanged( const QString & mytitle)
{
- nextButton()->setText( tr( "&Next >" ) );
- setAboutInfo( nextButton(), tr( "Move to the next step of the installation procedure" ) );
- disconnect( this, SIGNAL( nextClicked() ), this, SLOT( next() ) );
- disconnect( this, SIGNAL( nextClicked() ), this, SLOT( onStart() ) );
+ doPostActions( tr( "&Next >" ), tr( "Move to the next step of the installation procedure" ) );
connect( this, SIGNAL( nextClicked() ), this, SLOT( next() ) );
cancelButton()->disconnect();
connect( cancelButton(), SIGNAL( clicked()), this, SLOT( reject() ) );
passedParams->clear();
passedParams->setEnabled( false );
QFont f = parametersLab->font(); f.setBold( false ); parametersLab->setFont( f );
- nextButton()->setText( tr( "&Start" ) );
- setAboutInfo( nextButton(), tr( "Start installation process" ) );
- // reconnect Next button - to use it as Start button
- disconnect( this, SIGNAL( nextClicked() ), this, SLOT( next() ) );
- disconnect( this, SIGNAL( nextClicked() ), this, SLOT( onStart() ) );
+ doPostActions( tr( "&Start" ), tr( "Start installation process" ) );
connect( this, SIGNAL( nextClicked() ), this, SLOT( onStart() ) );
setNextEnabled( true );
// reconnect Cancel button to terminate process
installInfo->setFinished( false );
passedParams->clear();
passedParams->setEnabled( false );
+ // disable 'Ignore errors' checkbox during installation process
+ ignoreErrCBox->setEnabled( false );
QFont f = parametersLab->font(); f.setBold( false ); parametersLab->setFont( f );
// update status label
statusLab->setText( tr( "Installation has been aborted" ) );
// enable <Next> button
setNextEnabled( true );
- nextButton()->setText( tr( "&Start" ) );
- setAboutInfo( nextButton(), tr( "Start installation process" ) );
- // reconnect Next button - to use it as Start button
- disconnect( this, SIGNAL( nextClicked() ), this, SLOT( next() ) );
- disconnect( this, SIGNAL( nextClicked() ), this, SLOT( onStart() ) );
+ doPostActions( tr( "&Start" ), tr( "Start installation process" ) );
connect( this, SIGNAL( nextClicked() ), this, SLOT( onStart() ) );
// enable <Back> button
setBackEnabled( true );
// installation aborted
abort();
statusLab->setText( tr( "Installation has been aborted by user" ) );
- // enable <Next> button
+ // update <Next> button
setNextEnabled( true );
- nextButton()->setText( tr( "&Start" ) );
- setAboutInfo( nextButton(), tr( "Start installation process" ) );
- // reconnect Next button - to use it as Start button
- disconnect( this, SIGNAL( nextClicked() ), this, SLOT( next() ) );
- disconnect( this, SIGNAL( nextClicked() ), this, SLOT( onStart() ) );
+ doPostActions( tr( "&Start" ), tr( "Start installation process" ) );
connect( this, SIGNAL( nextClicked() ), this, SLOT( onStart() ) );
// enable <Back> button
setBackEnabled( true );
installInfo->setFinished( true );
// enable <Next> button
setNextEnabled( true );
- nextButton()->setText( tr( "&Start" ) );
- setAboutInfo( nextButton(), tr( "Start installation process" ) );
- // reconnect Next button - to use it as Start button
- disconnect( this, SIGNAL( nextClicked() ), this, SLOT( next() ) );
- disconnect( this, SIGNAL( nextClicked() ), this, SLOT( onStart() ) );
+ doPostActions( tr( "&Start" ), tr( "Start installation process" ) );
connect( this, SIGNAL( nextClicked() ), this, SLOT( onStart() ) );
- //nextButton()->setText( tr( "&Next >" ) );
- //setAboutInfo( nextButton(), tr( "Move to the next step of the installation procedure" ) );
- //disconnect( this, SIGNAL( nextClicked() ), this, SLOT( next() ) );
- //disconnect( this, SIGNAL( nextClicked() ), this, SLOT( onStart() ) );
+ //doPostActions( tr( "&Next >" ), tr( "Move to the next step of the installation procedure" ) );
//connect( this, SIGNAL( nextClicked() ), this, SLOT( next() ) );
// enable <Back> button
setBackEnabled( true );
installInfo->scrollToBottom();
hasErrors = true;
}
+
+ // stop or proceed installation process
+ manageInstProc();
+
// VSR: 10/11/05 - disable answer mode ==>
// passedParams->setEnabled( true );
// passedParams->setFocus();
// VSR: 10/11/05 - disable answer mode <==
}
// ================================================================
+/*!
+ * SALOME_InstallWizard::manageInstProc
+ * QProcess slot: -->stop installation if there is an error in stderr
+ */
+// ================================================================
+void SALOME_InstallWizard::manageInstProc()
+{
+ if ( !hasErrors || ignoreErrCBox->isChecked() )
+ return; //proceed installation process
+
+ // abort the current installation
+ statusLab->setText( tr( "Aborting installation..." ) );
+ abort();
+ statusLab->setText( tr( "Installation has been aborted because some errors" ) );
+ if ( QMessageBox::critical( this,
+ tr( "Error" ),
+ tr( "Installation process has been stopped, because an error occured \n"
+ "during an installation of the current product!\n"
+ "Please see the installation progress view for more details about the error.\n\n"
+ "Do you want to save the installation log?" ),
+ tr( "&Save" ),
+ tr( "&Cancel" ),
+ QString::null,
+ 0,
+ 1 ) == 0 )
+ saveLog();
+ // enable <Next> button
+ setNextEnabled( true );
+ doPostActions( tr( "&Start" ), tr( "Start installation process" ) );
+ connect( this, SIGNAL( nextClicked() ), this, SLOT( onStart() ) );
+ // enable <Back> button
+ setBackEnabled( true );
+ installInfo->setFinished( true );
+}
+// ================================================================
/*!
* SALOME_InstallWizard::setDependancies
* Sets dependancies for the product item
productsMap[item] = dep;
}
// ================================================================
+/*!
+ * SALOME_InstallWizard::doPostActions
+ * Executes some actions after finish of installation process (successful or not)
+ */
+// ================================================================
+void SALOME_InstallWizard::doPostActions( const QString& btnText,
+ const QString& btnAboutInfo )
+{
+ // update <Next> button
+ nextButton()->setText( btnText );
+ setAboutInfo( nextButton(), btnAboutInfo );
+ // reconnect Next button - to use it as Start button
+ disconnect( this, SIGNAL( nextClicked() ), this, SLOT( next() ) );
+ disconnect( this, SIGNAL( nextClicked() ), this, SLOT( onStart() ) );
+ // enable 'Ignore errors' checkbox
+ ignoreErrCBox->setEnabled( true );
+}
+// ================================================================
/*!
* SALOME_InstallWizard::addFinishButton
* Add button for the <Finish> page.