]> SALOME platform Git repositories - modules/homard.git/blob - src/HOMARDGUI/MonCreateCase.cxx
Salome HOME
Merge remote branch 'origin/master' into gn/evol_01
[modules/homard.git] / src / HOMARDGUI / MonCreateCase.cxx
1 // Copyright (C) 2011-2016  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #include "MonCreateCase.h"
21 #include "MonCreateBoundaryAn.h"
22 #include "MonEditBoundaryAn.h"
23 #include "MonCreateBoundaryDi.h"
24 #include "MonEditBoundaryDi.h"
25 #include "HOMARD.hxx"
26
27 #include <QFileDialog>
28 #include <QMessageBox>
29
30 #include "SalomeApp_Tools.h"
31 #include "HOMARDGUI_Utils.h"
32 #include "HomardQtCommun.h"
33 #include <utilities.h>
34
35 #ifdef WIN32
36 #include <direct.h>
37 #endif
38
39 using namespace std;
40
41 // -----------------------------------------------------------------------------------------
42 /* Constructs a MonCreateCase
43  * Inherits from CasHomard
44  * Sets attributes to default values
45  */
46 // -----------------------------------------------------------------------------------------
47 MonCreateCase::MonCreateCase( bool modal, HOMARD::HOMARD_Gen_var myHomardGen0 )
48     :
49     Ui_CreateCase(),
50     _aCaseName(""),_aDirName(""),
51     _ConfType(0),
52     _ExtType(0),
53     _Pyram(0)
54 {
55   MESSAGE("Debut du constructeur de MonCreateCase");
56   myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen0);
57   setupUi(this);
58   setModal(modal);
59   InitConnect();
60
61   SetNewName() ;
62   GBBoundaryA->setVisible(0);
63   GBBoundaryD->setVisible(0);
64   GBAdvancedOptions->setVisible(0);
65   Comment->setVisible(0);
66   CBPyramid->setChecked(false);
67 //
68   adjustSize();
69
70 //   MESSAGE("Fin du constructeur de MonCreateCase");
71 }
72 // ------------------------------------------------------------------------
73 MonCreateCase::~MonCreateCase()
74 // ------------------------------------------------------------------------
75 {
76     // no need to delete child widgets, Qt does it all for us
77 }
78 // ------------------------------------------------------------------------
79 void MonCreateCase::InitConnect()
80 // ------------------------------------------------------------------------
81 {
82     connect( LEName,     SIGNAL(textChanged(QString)), this, SLOT(CaseNameChanged()));
83     connect( PushDir,        SIGNAL(pressed()), this, SLOT(SetDirName()));
84     connect( PushFichier,    SIGNAL(pressed()), this, SLOT(SetFileName()));
85
86     connect( RBConforme,     SIGNAL(clicked()), this, SLOT(SetConforme()));
87     connect( RBNonConforme,  SIGNAL(clicked()), this, SLOT(SetNonConforme()));
88
89     connect( CBBoundaryD,      SIGNAL(stateChanged(int)), this, SLOT(SetBoundaryD()));
90     connect( PBBoundaryDiNew,  SIGNAL(pressed()), this, SLOT(PushBoundaryDiNew()));
91     connect( PBBoundaryDiEdit, SIGNAL(pressed()), this, SLOT(PushBoundaryDiEdit()) );
92     connect( PBBoundaryDiHelp, SIGNAL(pressed()), this, SLOT(PushBoundaryDiHelp()) );
93     connect( CBBoundaryA,      SIGNAL(stateChanged(int)), this, SLOT(SetBoundaryA()));
94     connect( PBBoundaryAnNew,  SIGNAL(pressed()), this, SLOT(PushBoundaryAnNew()));
95     connect( PBBoundaryAnEdit, SIGNAL(pressed()), this, SLOT(PushBoundaryAnEdit()) );
96     connect( PBBoundaryAnHelp, SIGNAL(pressed()), this, SLOT(PushBoundaryAnHelp()) );
97
98     connect( CBAdvanced,     SIGNAL(stateChanged(int)), this, SLOT(SetAdvanced()));
99     connect( RBStandard,     SIGNAL(clicked()), this, SLOT(SetStandard()));
100     connect( RBBox,          SIGNAL(clicked()), this, SLOT(SetBox()));
101     connect( RBNC1NpA,       SIGNAL(clicked()), this, SLOT(SetNC1NpA()));
102     connect( RBNCQuelconque, SIGNAL(clicked()), this, SLOT(SetNCQuelconque()));
103
104     connect( RBMED,          SIGNAL(clicked()), this, SLOT(SetMED()));
105     connect( RBSaturne,      SIGNAL(clicked()), this, SLOT(SetSaturne()));
106     connect( RBSaturne2D,    SIGNAL(clicked()), this, SLOT(SetSaturne2D()));
107
108     connect( buttonOk,       SIGNAL(pressed()), this, SLOT(PushOnOK()));
109     connect( buttonApply,    SIGNAL(pressed()), this, SLOT(PushOnApply(0)));
110     connect( buttonCancel,   SIGNAL(pressed()), this, SLOT(close()));
111     connect( buttonHelp,     SIGNAL(pressed()), this, SLOT(PushOnHelp()));
112 }
113 // ------------------------------------------------------------------------
114 void MonCreateCase::InitBoundarys()
115 // ------------------------------------------------------------------------
116 // Initialisation des menus avec les frontieres deja enregistrees
117 {
118   MESSAGE("InitBoundarys");
119 // Pour les frontieres analytiques : la colonne des groupes
120   HOMARD::ListGroupType_var _listeGroupesCas = aCase->GetGroups();
121   QTableWidgetItem *__colItem = new QTableWidgetItem();
122   __colItem->setText(QApplication::translate("CreateCase", "", 0));
123   TWBoundary->setHorizontalHeaderItem(0, __colItem);
124   for ( int i = 0; i < _listeGroupesCas->length(); i++ )
125   {
126     TWBoundary->insertRow(i);
127     TWBoundary->setItem( i, 0, new QTableWidgetItem(QString((_listeGroupesCas)[i]).trimmed()));
128     TWBoundary->item( i, 0 )->setFlags(Qt::ItemIsEnabled |Qt::ItemIsSelectable );
129   }
130 // Pour les frontieres discretes : la liste a saisir
131 // Pour les frontieres analytiques : les colonnes de chaque frontiere
132   HOMARD::HOMARD_Boundary_var myBoundary ;
133   HOMARD::listeBoundarys_var  mesBoundarys = myHomardGen->GetAllBoundarysName();
134 //   MESSAGE("Nombre de frontieres enregistrees : "<<mesBoundarys->length());
135   for (int i=0; i<mesBoundarys->length(); i++)
136   {
137     myBoundary = myHomardGen->GetBoundary(mesBoundarys[i]);
138     int type_obj = myBoundary->GetType() ;
139     if ( type_obj==0 ) { CBBoundaryDi->addItem(QString(mesBoundarys[i])); }
140     else               { AddBoundaryAn(QString(mesBoundarys[i])); }
141   }
142 // Ajustement
143   TWBoundary->resizeColumnsToContents();
144   TWBoundary->resizeRowsToContents();
145   TWBoundary->clearSelection();
146 }
147 // -------------------------------
148 bool MonCreateCase::PushOnApply(int option)
149 // --------------------------------
150 {
151   MESSAGE("PushOnApply");
152   QString aCaseName=LEName->text().trimmed();
153   if ( aCaseName == "" )
154   {
155     QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
156                               QObject::tr("HOM_CASE_NAME") );
157     return false;
158   }
159
160   QString aDirName=LEDirName->text().trimmed();
161   if (aDirName == QString(""))
162   {
163     QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
164                               QObject::tr("HOM_CASE_DIRECTORY_1") );
165     return false;
166   }
167
168   if ( aDirName != _aDirName)
169   { QString CaseNameDir = myHomardGen->VerifieDir( aDirName.toStdString().c_str()) ;
170     if ( ( CaseNameDir != "" ) & ( CaseNameDir != aCaseName ) )
171     {
172       QString texte ;
173       texte = QObject::tr("HOM_CASE_DIRECTORY_2") + CaseNameDir ;
174       QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
175                                 texte );
176       return false;
177     }
178   }
179   if (CHDIR(aDirName.toStdString().c_str()) != 0)
180   {
181     QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
182                               QObject::tr("HOM_CASE_DIRECTORY_3") );
183     return false;
184   }
185
186   QString aFileName=LEFileName->text().trimmed();
187   if (aFileName ==QString(""))
188   {
189     QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
190                               QObject::tr("HOM_CASE_MESH") );
191     return false;
192   }
193
194   QString aMeshName = HOMARD_QT_COMMUN::LireNomMaillage(aFileName);
195   if (aMeshName == "" )
196   {
197     QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
198                               QObject::tr("HOM_MED_FILE_2") );
199     return false;
200   }
201
202 // On verifie qu'un groupe n'est pas associe a deux frontieres differentes
203   if (CBBoundaryA->isChecked())
204   {
205     QStringList ListeGroup ;
206     QString NomGroup ;
207     int nbcol = TWBoundary->columnCount();
208     int nbrow = TWBoundary->rowCount();
209     for ( int col=1; col< nbcol; col++)
210     {
211       for ( int row=0; row< nbrow; row++)
212       {
213         if ( TWBoundary->item( row, col )->checkState() ==  Qt::Checked )
214         {
215 //        Nom du groupe
216           NomGroup = QString(TWBoundary->item(row, 0)->text()) ;
217 //           MESSAGE("NomGroup "<<NomGroup.toStdString().c_str());
218           for ( int nugr = 0 ; nugr<ListeGroup.size(); nugr++)
219           {
220 //             MESSAGE("....... "<<ListeGroup[nugr].toStdString().c_str());
221             if ( NomGroup == ListeGroup[nugr] )
222             {
223               QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
224                                         QObject::tr("HOM_CASE_GROUP").arg(NomGroup) );
225               return false;
226             }
227           }
228           ListeGroup.insert(0, NomGroup );
229         }
230       }
231     }
232   }
233
234 // Creation du cas
235   if (aCaseName != _aCaseName )
236   {
237     _aCaseName = aCaseName;
238     try
239     {
240     aCase = myHomardGen->CreateCase( \
241             CORBA::string_dup(_aCaseName.toStdString().c_str()),  \
242             CORBA::string_dup(aMeshName.toStdString().c_str()),  \
243             CORBA::string_dup(aFileName.toStdString().c_str()) );
244     }
245     catch( SALOME::SALOME_Exception& S_ex )
246     {
247       QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
248                                 QObject::tr(CORBA::string_dup(S_ex.details.text)) );
249       return false;
250     }
251     LEFileName->setReadOnly(true);
252     PushFichier->hide();
253     InitBoundarys();
254   }
255
256 // Repertoire et type
257   aCase->SetDirName(aDirName.toStdString().c_str());
258   _aDirName=aDirName;
259   aCase->SetConfType(_ConfType);
260   aCase->SetExtType(_ExtType);
261
262 //   Menage des eventuelles frontieres deja enregistrees
263   aCase->SupprBoundaryGroup() ;
264
265   // Enregistrement et publication dans l'arbre d'etudes a la sortie definitive
266   if ( option > 0 )
267   {
268     if (CBBoundaryD->isChecked())
269     {
270       QString monBoundaryDiName=CBBoundaryDi->currentText();
271       if (monBoundaryDiName != "" )
272       {
273         aCase->AddBoundaryGroup(monBoundaryDiName.toStdString().c_str(), "");
274       }
275     }
276     if (CBBoundaryA->isChecked())
277     {
278       QString NomGroup ;
279       int nbcol = TWBoundary->columnCount();
280       int nbrow = TWBoundary->rowCount();
281       for ( int col=1; col< nbcol; col++)
282       {
283         for ( int row=0; row< nbrow; row++)
284         {
285           if ( TWBoundary->item( row, col )->checkState() ==  Qt::Checked )
286           {
287   //        Nom du groupe
288             NomGroup = QString(TWBoundary->item(row, 0)->text()) ;
289   //        Nom de la frontiere
290             QTableWidgetItem *__colItem = new QTableWidgetItem();
291             __colItem = TWBoundary->horizontalHeaderItem(col);
292             aCase->AddBoundaryGroup(QString(__colItem->text()).toStdString().c_str(), NomGroup.toStdString().c_str());
293           }
294         }
295       }
296     }
297   }
298
299
300 // Options avancees
301   if (CBAdvanced->isChecked())
302   {
303 // Autorisation des pyramides
304     if (CBPyramid->isChecked()) { _Pyram = 1 ; }
305   }
306   aCase->SetPyram(_Pyram);
307
308   HOMARD_UTILS::updateObjBrowser();
309
310   return true;
311 }
312 // ---------------------------
313 void MonCreateCase::PushOnOK()
314 // ---------------------------
315 {
316   bool bOK = PushOnApply(1);
317   if ( bOK ) this->close();
318 }
319 //------------------------------
320 void MonCreateCase::PushOnHelp()
321 //-------------------------------
322 {
323   std::string LanguageShort = myHomardGen->GetLanguageShort();
324   HOMARD_UTILS::PushOnHelp(QString("gui_create_case.html"), QString(""), QString(LanguageShort.c_str()));
325 }
326 // ---------------------------------
327 void MonCreateCase::SetNewName()
328 // ------------------------------
329 {
330   HOMARD::listeCases_var  MyCases = myHomardGen->GetAllCasesName();
331   int num = 0; QString aCaseName="";
332   while (aCaseName=="" )
333   {
334     aCaseName.setNum(num+1) ;
335     aCaseName.insert(0, QString("Case_")) ;
336     for ( int i=0; i<MyCases->length(); i++)
337     {
338       if ( aCaseName ==  QString((MyCases)[i]))
339       {
340         num ++ ;
341         aCaseName = "" ;
342         break ;
343       }
344    }
345   }
346   LEName->clear() ;
347   LEName->insert(aCaseName);
348 }
349
350 // ------------------------------------------------------------------------
351 void MonCreateCase::SetDirName()
352 // ------------------------------------------------------------------------
353 {
354   QString aDirName=QFileDialog::getExistingDirectory ();
355   if (!(aDirName.isEmpty()))LEDirName->setText(aDirName);
356 }
357 // ------------------------------------------------------------------------
358 void MonCreateCase::SetFileName()
359 // ------------------------------------------------------------------------
360 {
361   QString fileName0 = LEFileName->text().trimmed();
362   QString fileName = HOMARD_QT_COMMUN::PushNomFichier( false, QString("med") ) ;
363   if (fileName.isEmpty()) fileName = fileName0 ;
364   LEFileName->setText(fileName);
365 }
366 // ------------------------------------------------------------------------
367 void MonCreateCase::SetConforme()
368 // ------------------------------------------------------------------------
369 {
370 //
371   _ConfType=0;
372   RBNC1NpA->setVisible(0);
373   RBNCQuelconque->setVisible(0);
374 //
375   adjustSize();
376 }
377 // ------------------------------------------------------------------------
378 void MonCreateCase::SetNonConforme()
379 // ------------------------------------------------------------------------
380 {
381 //
382   _ConfType=1;
383   RBNC1NpA->setVisible(1);
384   RBNCQuelconque->setVisible(1);
385 //
386   adjustSize();
387 }
388 // ------------------------------------------------------------------------
389 void MonCreateCase::SetStandard()
390 // ------------------------------------------------------------------------
391 {
392   if ( ( _ConfType == 0 ) || ( _ConfType == -1 ) ) { _ConfType = 0 ; }
393   else { _ConfType = 1 ; }
394   RBStandard->setChecked(true);
395 }
396 // ------------------------------------------------------------------------
397 void MonCreateCase::SetBox()
398 // ------------------------------------------------------------------------
399 {
400   if ( ( _ConfType == 0 ) || ( _ConfType == -1 ) ) { _ConfType = -1 ; }
401   else { _ConfType = -2 ; }
402 }
403 // ------------------------------------------------------------------------
404 void MonCreateCase::SetNC1NpA()
405 // ------------------------------------------------------------------------
406 {
407   _ConfType = 2;
408 }
409 // ------------------------------------------------------------------------
410 void MonCreateCase::SetNCQuelconque()
411 // ------------------------------------------------------------------------
412 {
413   _ConfType = 3;
414 }
415 // ------------------------------------------------------------------------
416 void MonCreateCase::SetMED()
417 // ------------------------------------------------------------------------
418 {
419   _ExtType = 0 ;
420   RBMED->setChecked(true);
421 }
422 // ------------------------------------------------------------------------
423 void MonCreateCase::SetSaturne()
424 // ------------------------------------------------------------------------
425 {
426   _ExtType = 1 ;
427   RBSaturne->setChecked(true);
428 }
429 // ------------------------------------------------------------------------
430 void MonCreateCase::SetSaturne2D()
431 // ------------------------------------------------------------------------
432 {
433   _ExtType = 2 ;
434   RBSaturne2D->setChecked(true);
435 }
436 // ------------------------------------------------------------------------
437 void MonCreateCase::SetBoundaryD()
438 // ------------------------------------------------------------------------
439 {
440   MESSAGE("Debut de SetBoundaryD ");
441   if (CBBoundaryD->isChecked())
442   {
443     bool bOK = PushOnApply(0);
444     if (bOK) { GBBoundaryD->setVisible(1); }
445     else     { GBBoundaryD->setVisible(0);
446                CBBoundaryD->setChecked(0);
447                CBBoundaryD->setCheckState(Qt::Unchecked); }
448   }
449   else { GBBoundaryD->setVisible(0); }
450 //
451   adjustSize();
452 }
453 // ------------------------------------------------------------------------
454 void MonCreateCase::AddBoundaryDi(QString newBoundary)
455 // ------------------------------------------------------------------------
456 {
457   CBBoundaryDi->insertItem(0,newBoundary);
458   CBBoundaryDi->setCurrentIndex(0);
459 }
460 // ------------------------------------------------------------------------
461 void MonCreateCase::PushBoundaryDiNew()
462 // ------------------------------------------------------------------------
463 {
464    MonCreateBoundaryDi *BoundaryDlg = new MonCreateBoundaryDi(this, true,
465                 HOMARD::HOMARD_Gen::_duplicate(myHomardGen), _aCaseName, "") ;
466    BoundaryDlg->show();
467 }
468 // ------------------------------------------------------------------------
469 void MonCreateCase::PushBoundaryDiEdit()
470 // ------------------------------------------------------------------------
471 {
472   if (CBBoundaryDi->currentText() == QString(""))  return;
473   MonEditBoundaryDi *BoundaryDlg = new MonEditBoundaryDi(this, true,
474        HOMARD::HOMARD_Gen::_duplicate(myHomardGen), _aCaseName, CBBoundaryDi->currentText() ) ;
475   BoundaryDlg->show();
476 }
477 // ------------------------------------------------------------------------
478 void MonCreateCase::PushBoundaryDiHelp()
479 // ------------------------------------------------------------------------
480 {
481   std::string LanguageShort = myHomardGen->GetLanguageShort();
482   HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html"), QString("frontiere-discrete"), QString(LanguageShort.c_str()));
483 }
484 // ------------------------------------------------------------------------
485 void MonCreateCase::SetBoundaryA()
486 // ------------------------------------------------------------------------
487 {
488   MESSAGE("Debut de SetBoundaryA ");
489   if (CBBoundaryA->isChecked())
490   {
491     bool bOK = PushOnApply(0);
492     if (bOK) { GBBoundaryA->setVisible(1); }
493     else     { GBBoundaryA->setVisible(0);
494                CBBoundaryA->setChecked(0);
495                CBBoundaryA->setCheckState(Qt::Unchecked); }
496   }
497   else { GBBoundaryA->setVisible(0); }
498 //
499   adjustSize();
500 //
501 //   MESSAGE("Fin de SetBoundaryA ");
502 }
503 // ------------------------------------------------------------------------
504 void MonCreateCase::AddBoundaryAn(QString newBoundary)
505 // ------------------------------------------------------------------------
506 {
507   MESSAGE("Debut de AddBoundaryAn ");
508 // Ajout d'une nouvelle colonne
509   int nbcol = TWBoundary->columnCount();
510 //   MESSAGE("nbcol " <<  nbcol);
511   nbcol += 1 ;
512   TWBoundary->setColumnCount ( nbcol ) ;
513   QTableWidgetItem *__colItem = new QTableWidgetItem();
514   __colItem->setText(QApplication::translate("CreateCase", newBoundary.toStdString().c_str(), 0));
515   TWBoundary->setHorizontalHeaderItem(nbcol-1, __colItem);
516 /*  TWBoundary->horizontalHeaderItem(nbcol-1)->setFlags( Qt::ItemIsSelectable|Qt::ItemIsEnabled );*/
517 // Chaque case est a cocher
518   int nbrow = TWBoundary->rowCount();
519 //   MESSAGE("nbrow " <<  nbrow);
520   for ( int i = 0; i < nbrow; i++ )
521   {
522     TWBoundary->setItem( i, nbcol-1, new QTableWidgetItem( QString ("") ) );
523     TWBoundary->item( i, nbcol-1 )->setFlags( 0 );
524     TWBoundary->item( i, nbcol-1 )->setFlags( Qt::ItemIsUserCheckable|Qt::ItemIsEnabled  );
525     TWBoundary->item( i, nbcol-1 )->setCheckState( Qt::Unchecked );
526   }
527   TWBoundary->resizeColumnToContents(nbcol-1);
528 //   TWBoundary->resizeRowsToContents();
529 //   MESSAGE("Fin de AddBoundaryAn ");
530 }
531 // ------------------------------------------------------------------------
532 void MonCreateCase::PushBoundaryAnNew()
533 // ------------------------------------------------------------------------
534 {
535    MonCreateBoundaryAn *BoundaryDlg = new MonCreateBoundaryAn(this, true,
536                 HOMARD::HOMARD_Gen::_duplicate(myHomardGen), _aCaseName) ;
537    BoundaryDlg->show();
538 }
539 // ------------------------------------------------------------------------
540 void MonCreateCase::PushBoundaryAnEdit()
541 // ------------------------------------------------------------------------
542 {
543   QString nom="";
544   int nbcol = TWBoundary->columnCount();
545   for ( int i = 1; i < nbcol; i++ )
546   {
547     QTableWidgetItem *__colItem = new QTableWidgetItem();
548     __colItem = TWBoundary->horizontalHeaderItem(i);
549     nom = QString(__colItem->text()) ;
550     MESSAGE("nom "<<nom.toStdString().c_str());
551     if (nom != QString(""))
552     { MonEditBoundaryAn *BoundaryDlg = new MonEditBoundaryAn(this, true,
553         HOMARD::HOMARD_Gen::_duplicate(myHomardGen), _aCaseName, nom ) ;
554       BoundaryDlg->show(); }
555   }
556 }
557 // ------------------------------------------------------------------------
558 void MonCreateCase::PushBoundaryAnHelp()
559 // ------------------------------------------------------------------------
560 {
561   std::string LanguageShort = myHomardGen->GetLanguageShort();
562   HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html"), QString("frontiere-analytique"), QString(LanguageShort.c_str()));
563 }
564 // ------------------------------------------------------------------------
565 void MonCreateCase::CaseNameChanged()
566 // ------------------------------------------------------------------------
567 {
568     if (_aCaseName != LEName->text().trimmed())
569     {
570        LEFileName->setReadOnly(false);
571        PushFichier->show();
572     }
573 }
574 // ------------------------------------------------------------------------
575 void MonCreateCase::SetAdvanced()
576 // ------------------------------------------------------------------------
577 {
578   MESSAGE("Debut de SetAdvanced ");
579   if (CBAdvanced->isChecked())
580   { GBAdvancedOptions->setVisible(1);
581     GBConforme->setVisible(1);
582     RBStandard->setVisible(1);
583     RBBox->setVisible(1);
584     if ( ( _ConfType == 0 ) || ( _ConfType == -1 ) )
585     { RBNC1NpA->setVisible(0);
586       RBNCQuelconque->setVisible(0);}
587     else
588     { RBNC1NpA->setVisible(1);
589       RBNCQuelconque->setVisible(1);}
590     GBFormat->setVisible(1);
591     RBMED->setVisible(1);
592     RBSaturne2D->setVisible(1);
593   }
594   else
595   { GBAdvancedOptions->setVisible(0);
596     CBPyramid->setChecked(false);
597     _Pyram = 0 ;
598     SetStandard() ;
599     SetMED() ;
600  }
601 //
602   adjustSize();
603 }