connect( CBAdvanced, SIGNAL(stateChanged(int)), this, SLOT(SetAdvanced()));
connect( buttonOk, SIGNAL(pressed()), this, SLOT(PushOnOK()));
- connect( buttonApply, SIGNAL(pressed()), this, SLOT(PushOnApply()));
+ connect( buttonApply, SIGNAL(pressed()), this, SLOT(PushOnApply(0)));
connect( buttonCancel, SIGNAL(pressed()), this, SLOT(close()));
connect( buttonHelp, SIGNAL(pressed()), this, SLOT(PushOnHelp()));
}
TWBoundary->clearSelection();
}
// -------------------------------
-bool MonCreateCase::PushOnApply()
+bool MonCreateCase::PushOnApply(int option)
// --------------------------------
{
MESSAGE("PushOnApply");
{
QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
QObject::tr(CORBA::string_dup(S_ex.details.text)) );
- try
- {
- aCase = myHomardGen->GetCase(_aCaseName.toStdString().c_str());
- string iter0 = aCase->GetIter0Name();
- HOMARD::HOMARD_Iteration_var aIter = myHomardGen->GetIteration(iter0.c_str());
- QString aFileName = aIter->GetMeshFile();
- LEFileName->setText(aFileName);
- LEFileName->setReadOnly(true);
- PushFichier->hide();
- }
- catch( SALOME::SALOME_Exception& S_ex ) {};
return false;
}
LEFileName->setReadOnly(true);
// Menage des eventuelles frontieres deja enregistrees
aCase->SupprBoundaryGroup() ;
-// Enregistrement de la frontiere discrete
- if (CBBoundaryD->isChecked())
+ // Enregistrement et publication dans l'arbre d'etudes a la sortie definitive
+ if ( option > 0 )
{
- QString monBoundaryDiName=CBBoundaryDi->currentText();
- if (monBoundaryDiName != "" )
+ if (CBBoundaryD->isChecked())
{
- aCase->AddBoundaryGroup(monBoundaryDiName.toStdString().c_str(), "");
+ QString monBoundaryDiName=CBBoundaryDi->currentText();
+ if (monBoundaryDiName != "" )
+ {
+ aCase->AddBoundaryGroup(monBoundaryDiName.toStdString().c_str(), "");
+ }
}
- }
-
-// Enregistrement des liens (groupe,frontiere analytique)
- if (CBBoundaryA->isChecked())
- {
- QString NomGroup ;
- int nbcol = TWBoundary->columnCount();
- int nbrow = TWBoundary->rowCount();
- for ( int col=1; col< nbcol; col++)
+ if (CBBoundaryA->isChecked())
{
- for ( int row=0; row< nbrow; row++)
+ QString NomGroup ;
+ int nbcol = TWBoundary->columnCount();
+ int nbrow = TWBoundary->rowCount();
+ for ( int col=1; col< nbcol; col++)
{
- if ( TWBoundary->item( row, col )->checkState() == Qt::Checked )
+ for ( int row=0; row< nbrow; row++)
{
-// Nom du groupe
- NomGroup = QString(TWBoundary->item(row, 0)->text()) ;
-// Nom de la frontiere
- QTableWidgetItem *__colItem = new QTableWidgetItem();
- __colItem = TWBoundary->horizontalHeaderItem(col);
- aCase->AddBoundaryGroup(QString(__colItem->text()).toStdString().c_str(), NomGroup.toStdString().c_str());
+ if ( TWBoundary->item( row, col )->checkState() == Qt::Checked )
+ {
+ // Nom du groupe
+ NomGroup = QString(TWBoundary->item(row, 0)->text()) ;
+ // Nom de la frontiere
+ QTableWidgetItem *__colItem = new QTableWidgetItem();
+ __colItem = TWBoundary->horizontalHeaderItem(col);
+ aCase->AddBoundaryGroup(QString(__colItem->text()).toStdString().c_str(), NomGroup.toStdString().c_str());
+ }
}
}
}
}
+
// Options avancees
if (CBAdvanced->isChecked())
{
void MonCreateCase::PushOnOK()
// ---------------------------
{
- bool bOK = PushOnApply();
+ bool bOK = PushOnApply(1);
if ( bOK ) this->close();
}
//------------------------------
MESSAGE("Debut de SetBoundaryD ");
if (CBBoundaryD->isChecked())
{
- bool bOK = PushOnApply();
+ bool bOK = PushOnApply(0);
if (bOK) { GBBoundaryD->setVisible(1); }
else { GBBoundaryD->setVisible(0);
CBBoundaryD->setChecked(0);
MESSAGE("Debut de SetBoundaryA ");
if (CBBoundaryA->isChecked())
{
- bool bOK = PushOnApply();
+ bool bOK = PushOnApply(0);
if (bOK) { GBBoundaryA->setVisible(1); }
else { GBBoundaryA->setVisible(0);
CBBoundaryA->setChecked(0);