SUIT_MessageBox::StandardButton SUIT_MessageBox::critical( QWidget* parent, const QString& title, const QString& text,
StandardButtons buttons, StandardButton defaultButton )
{
+ if ( getenv( "SALOME_BATCH_MODE" ) )
+ return defaultButton;
SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::ArrowCursor );
return QMessageBox::critical( parent, title, text, buttons, defaultButton );
}
SUIT_MessageBox::StandardButton SUIT_MessageBox::warning( QWidget* parent, const QString& title, const QString& text,
SUIT_MessageBox::StandardButtons buttons, StandardButton defaultButton )
{
+ if ( getenv( "SALOME_BATCH_MODE" ) )
+ return defaultButton;
SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::ArrowCursor );
return QMessageBox::warning( parent, title, text, buttons, defaultButton );
}
SUIT_MessageBox::StandardButton SUIT_MessageBox::information( QWidget* parent, const QString& title, const QString& text,
StandardButtons buttons, StandardButton defaultButton )
{
+ if ( getenv( "SALOME_BATCH_MODE" ) )
+ return defaultButton;
SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::ArrowCursor );
return QMessageBox::information( parent, title, text, buttons, defaultButton );
}
SUIT_MessageBox::StandardButton SUIT_MessageBox::question( QWidget* parent, const QString& title, const QString& text,
StandardButtons buttons, StandardButton defaultButton )
{
+ if ( getenv( "SALOME_BATCH_MODE" ) )
+ return defaultButton;
SUIT_OverrideCursor cw( parent ? parent->cursor() : Qt::ArrowCursor );
return QMessageBox::question( parent, title, text, buttons, defaultButton );
}
const int defaultButton,
const int escapeButton )
{
+ if ( getenv( "SALOME_BATCH_MODE" ) )
+ return defaultButton;
+
SUIT_MessageBox msgBox( icon, title, text, NoButton, parent );
QMap<QAbstractButton*, int> bm;