-// Copyright (C) 2011-2016 CEA/DEN, EDF R&D
+// Copyright (C) 2011-2023 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
#include "MonCreateCase.h"
+#include "MonCreateBoundaryCAO.h"
+#include "MonEditBoundaryCAO.h"
#include "MonCreateBoundaryAn.h"
#include "MonEditBoundaryAn.h"
#include "MonCreateBoundaryDi.h"
InitConnect();
SetNewName() ;
+
+ GBBoundaryC->setVisible(0);
GBBoundaryA->setVisible(0);
GBBoundaryD->setVisible(0);
+
+ CBBoundaryA->setVisible(0);
+ CBBoundaryD->setVisible(0);
+
GBAdvancedOptions->setVisible(0);
Comment->setVisible(0);
CBPyramid->setChecked(false);
void MonCreateCase::InitConnect()
// ------------------------------------------------------------------------
{
- connect( LEName, SIGNAL(textChanged(QString)), this, SLOT(CaseNameChanged()));
- connect( PushDir, SIGNAL(pressed()), this, SLOT(SetDirName()));
- connect( PushFichier, SIGNAL(pressed()), this, SLOT(SetFileName()));
+ connect( LEName, SIGNAL(textChanged(QString)), this, SLOT(CaseNameChanged()));
+ connect( PushDir, SIGNAL(pressed()), this, SLOT(SetDirName()));
+ connect( PushFichier, SIGNAL(pressed()), this, SLOT(SetFileName()));
connect( RBConforme, SIGNAL(clicked()), this, SLOT(SetConforme()));
connect( RBNonConforme, SIGNAL(clicked()), this, SLOT(SetNonConforme()));
- connect( CBBoundaryD, SIGNAL(stateChanged(int)), this, SLOT(SetBoundaryD()));
- connect( PBBoundaryDiNew, SIGNAL(pressed()), this, SLOT(PushBoundaryDiNew()));
- connect( PBBoundaryDiEdit, SIGNAL(pressed()), this, SLOT(PushBoundaryDiEdit()) );
- connect( PBBoundaryDiHelp, SIGNAL(pressed()), this, SLOT(PushBoundaryDiHelp()) );
- connect( CBBoundaryA, SIGNAL(stateChanged(int)), this, SLOT(SetBoundaryA()));
- connect( PBBoundaryAnNew, SIGNAL(pressed()), this, SLOT(PushBoundaryAnNew()));
- connect( PBBoundaryAnEdit, SIGNAL(pressed()), this, SLOT(PushBoundaryAnEdit()) );
- connect( PBBoundaryAnHelp, SIGNAL(pressed()), this, SLOT(PushBoundaryAnHelp()) );
+ connect( RBBoundaryNo, SIGNAL(clicked()), this, SLOT(SetBoundaryNo()));
+ connect( RBBoundaryCAO, SIGNAL(clicked()), this, SLOT(SetBoundaryCAO()));
+ connect( RBBoundaryNonCAO, SIGNAL(clicked()), this, SLOT(SetBoundaryNonCAO()));
+
+ connect( PBBoundaryCAONew, SIGNAL(pressed()), this, SLOT(PushBoundaryCAONew()));
+ connect( PBBoundaryCAOEdit, SIGNAL(pressed()), this, SLOT(PushBoundaryCAOEdit()) );
+ connect( PBBoundaryCAOHelp, SIGNAL(pressed()), this, SLOT(PushBoundaryCAOHelp()) );
+ connect( CBBoundaryD, SIGNAL(stateChanged(int)), this, SLOT(SetBoundaryD()));
+ connect( PBBoundaryDiNew, SIGNAL(pressed()), this, SLOT(PushBoundaryDiNew()));
+ connect( PBBoundaryDiEdit, SIGNAL(pressed()), this, SLOT(PushBoundaryDiEdit()) );
+ connect( PBBoundaryDiHelp, SIGNAL(pressed()), this, SLOT(PushBoundaryDiHelp()) );
+ connect( CBBoundaryA, SIGNAL(stateChanged(int)), this, SLOT(SetBoundaryA()));
+ connect( PBBoundaryAnNew, SIGNAL(pressed()), this, SLOT(PushBoundaryAnNew()));
+ connect( PBBoundaryAnEdit, SIGNAL(pressed()), this, SLOT(PushBoundaryAnEdit()) );
+ connect( PBBoundaryAnHelp, SIGNAL(pressed()), this, SLOT(PushBoundaryAnHelp()) );
connect( CBAdvanced, SIGNAL(stateChanged(int)), this, SLOT(SetAdvanced()));
connect( RBStandard, SIGNAL(clicked()), this, SLOT(SetStandard()));
TWBoundary->setItem( i, 0, new QTableWidgetItem(QString((_listeGroupesCas)[i]).trimmed()));
TWBoundary->item( i, 0 )->setFlags(Qt::ItemIsEnabled |Qt::ItemIsSelectable );
}
+// Pour les frontieres CAO : la liste a saisir
// Pour les frontieres discretes : la liste a saisir
// Pour les frontieres analytiques : les colonnes de chaque frontiere
HOMARD::HOMARD_Boundary_var myBoundary ;
{
myBoundary = myHomardGen->GetBoundary(mesBoundarys[i]);
int type_obj = myBoundary->GetType() ;
- if ( type_obj==0 ) { CBBoundaryDi->addItem(QString(mesBoundarys[i])); }
- else { AddBoundaryAn(QString(mesBoundarys[i])); }
+ if ( type_obj==-1 ) { CBBoundaryCAO->addItem(QString(mesBoundarys[i])); }
+ else if ( type_obj==0 ) { CBBoundaryDi->addItem(QString(mesBoundarys[i])); }
+ else { AddBoundaryAn(QString(mesBoundarys[i])); }
}
// Ajustement
TWBoundary->resizeColumnsToContents();
// Enregistrement et publication dans l'arbre d'etudes a la sortie definitive
if ( option > 0 )
{
+ if (RBBoundaryCAO->isChecked())
+ {
+ QString monBoundaryCAOName=CBBoundaryCAO->currentText();
+ if (monBoundaryCAOName != "" )
+ {
+ aCase->AddBoundary(monBoundaryCAOName.toStdString().c_str());
+ }
+ }
if (CBBoundaryD->isChecked())
{
QString monBoundaryDiName=CBBoundaryDi->currentText();
if (monBoundaryDiName != "" )
{
- aCase->AddBoundaryGroup(monBoundaryDiName.toStdString().c_str(), "");
+ aCase->AddBoundary(monBoundaryDiName.toStdString().c_str());
}
}
if (CBBoundaryA->isChecked())
RBSaturne2D->setChecked(true);
}
// ------------------------------------------------------------------------
+void MonCreateCase::SetBoundaryNo()
+// ------------------------------------------------------------------------
+{
+//
+ GBBoundaryC->setVisible(0);
+ GBBoundaryA->setVisible(0);
+ GBBoundaryD->setVisible(0);
+ CBBoundaryD->setVisible(0);
+ CBBoundaryA->setVisible(0);
+//
+ adjustSize();
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::SetBoundaryCAO()
+// ------------------------------------------------------------------------
+{
+//
+ GBBoundaryC->setVisible(1);
+ GBBoundaryA->setVisible(0);
+ GBBoundaryD->setVisible(0);
+ CBBoundaryD->setVisible(0);
+ CBBoundaryA->setVisible(0);
+//
+ adjustSize();
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::SetBoundaryNonCAO()
+// ------------------------------------------------------------------------
+{
+//
+ GBBoundaryC->setVisible(0);
+ CBBoundaryD->setVisible(1);
+ CBBoundaryA->setVisible(1);
+//
+ adjustSize();
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::AddBoundaryCAO(QString newBoundary)
+// ------------------------------------------------------------------------
+{
+ CBBoundaryCAO->insertItem(0,newBoundary);
+ CBBoundaryCAO->setCurrentIndex(0);
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::PushBoundaryCAONew()
+// ------------------------------------------------------------------------
+{
+ MonCreateBoundaryCAO *BoundaryDlg = new MonCreateBoundaryCAO(this, true,
+ HOMARD::HOMARD_Gen::_duplicate(myHomardGen), _aCaseName, "") ;
+ BoundaryDlg->show();
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::PushBoundaryCAOEdit()
+// ------------------------------------------------------------------------
+{
+ if (CBBoundaryCAO->currentText() == QString("")) return;
+ MonEditBoundaryCAO *BoundaryDlg = new MonEditBoundaryCAO(this, true,
+ HOMARD::HOMARD_Gen::_duplicate(myHomardGen), _aCaseName, CBBoundaryCAO->currentText() ) ;
+ BoundaryDlg->show();
+}
+// ------------------------------------------------------------------------
+void MonCreateCase::PushBoundaryCAOHelp()
+// ------------------------------------------------------------------------
+{
+ std::string LanguageShort = myHomardGen->GetLanguageShort();
+ HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html"), QString("CAO"), QString(LanguageShort.c_str()));
+}
+// ------------------------------------------------------------------------
void MonCreateCase::SetBoundaryD()
// ------------------------------------------------------------------------
{
else { GBBoundaryA->setVisible(0); }
//
adjustSize();
-//
-// MESSAGE("Fin de SetBoundaryA ");
}
// ------------------------------------------------------------------------
void MonCreateCase::AddBoundaryAn(QString newBoundary)