Salome HOME
Merge branch 'V7_dev'
[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( RBSaturne2D,    SIGNAL(clicked()), this, SLOT(SetSaturne2D()));
106
107     connect( buttonOk,       SIGNAL(pressed()), this, SLOT(PushOnOK()));
108     connect( buttonApply,    SIGNAL(pressed()), this, SLOT(PushOnApply(0)));
109     connect( buttonCancel,   SIGNAL(pressed()), this, SLOT(close()));
110     connect( buttonHelp,     SIGNAL(pressed()), this, SLOT(PushOnHelp()));
111 }
112 // ------------------------------------------------------------------------
113 void MonCreateCase::InitBoundarys()
114 // ------------------------------------------------------------------------
115 // Initialisation des menus avec les frontieres deja enregistrees
116 {
117   MESSAGE("InitBoundarys");
118 // Pour les frontieres analytiques : la colonne des groupes
119   HOMARD::ListGroupType_var _listeGroupesCas = aCase->GetGroups();
120   QTableWidgetItem *__colItem = new QTableWidgetItem();
121   __colItem->setText(QApplication::translate("CreateCase", "", 0));
122   TWBoundary->setHorizontalHeaderItem(0, __colItem);
123   for ( int i = 0; i < _listeGroupesCas->length(); i++ )
124   {
125     TWBoundary->insertRow(i);
126     TWBoundary->setItem( i, 0, new QTableWidgetItem(QString((_listeGroupesCas)[i]).trimmed()));
127     TWBoundary->item( i, 0 )->setFlags(Qt::ItemIsEnabled |Qt::ItemIsSelectable );
128   }
129 // Pour les frontieres discretes : la liste a saisir
130 // Pour les frontieres analytiques : les colonnes de chaque frontiere
131   HOMARD::HOMARD_Boundary_var myBoundary ;
132   HOMARD::listeBoundarys_var  mesBoundarys = myHomardGen->GetAllBoundarysName();
133 //   MESSAGE("Nombre de frontieres enregistrees : "<<mesBoundarys->length());
134   for (int i=0; i<mesBoundarys->length(); i++)
135   {
136     myBoundary = myHomardGen->GetBoundary(mesBoundarys[i]);
137     int type_obj = myBoundary->GetType() ;
138     if ( type_obj==0 ) { CBBoundaryDi->addItem(QString(mesBoundarys[i])); }
139     else               { AddBoundaryAn(QString(mesBoundarys[i])); }
140   }
141 // Ajustement
142   TWBoundary->resizeColumnsToContents();
143   TWBoundary->resizeRowsToContents();
144   TWBoundary->clearSelection();
145 }
146 // -------------------------------
147 bool MonCreateCase::PushOnApply(int option)
148 // --------------------------------
149 {
150   MESSAGE("PushOnApply");
151   QString aCaseName=LEName->text().trimmed();
152   if ( aCaseName == "" )
153   {
154     QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
155                               QObject::tr("HOM_CASE_NAME") );
156     return false;
157   }
158
159   QString aDirName=LEDirName->text().trimmed();
160   if (aDirName == QString(""))
161   {
162     QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
163                               QObject::tr("HOM_CASE_DIRECTORY_1") );
164     return false;
165   }
166
167   if ( aDirName != _aDirName)
168   { QString CaseNameDir = myHomardGen->VerifieDir( aDirName.toStdString().c_str()) ;
169     if ( ( CaseNameDir != "" ) & ( CaseNameDir != aCaseName ) )
170     {
171       QString texte ;
172       texte = QObject::tr("HOM_CASE_DIRECTORY_2") + CaseNameDir ;
173       QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
174                                 texte );
175       return false;
176     }
177   }
178   if (CHDIR(aDirName.toStdString().c_str()) != 0)
179   {
180     QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
181                               QObject::tr("HOM_CASE_DIRECTORY_3") );
182     return false;
183   }
184
185   QString aFileName=LEFileName->text().trimmed();
186   if (aFileName ==QString(""))
187   {
188     QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
189                               QObject::tr("HOM_CASE_MESH") );
190     return false;
191   }
192
193   QString aMeshName = HOMARD_QT_COMMUN::LireNomMaillage(aFileName);
194   if (aMeshName == "" )
195   {
196     QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
197                               QObject::tr("HOM_MED_FILE_2") );
198     return false;
199   }
200
201 // On verifie qu'un groupe n'est pas associe a deux frontieres differentes
202   if (CBBoundaryA->isChecked())
203   {
204     QStringList ListeGroup ;
205     QString NomGroup ;
206     int nbcol = TWBoundary->columnCount();
207     int nbrow = TWBoundary->rowCount();
208     for ( int col=1; col< nbcol; col++)
209     {
210       for ( int row=0; row< nbrow; row++)
211       {
212         if ( TWBoundary->item( row, col )->checkState() ==  Qt::Checked )
213         {
214 //        Nom du groupe
215           NomGroup = QString(TWBoundary->item(row, 0)->text()) ;
216 //           MESSAGE("NomGroup "<<NomGroup.toStdString().c_str());
217           for ( int nugr = 0 ; nugr<ListeGroup.size(); nugr++)
218           {
219 //             MESSAGE("....... "<<ListeGroup[nugr].toStdString().c_str());
220             if ( NomGroup == ListeGroup[nugr] )
221             {
222               QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
223                                         QObject::tr("HOM_CASE_GROUP").arg(NomGroup) );
224               return false;
225             }
226           }
227           ListeGroup.insert(0, NomGroup );
228         }
229       }
230     }
231   }
232
233 // Creation du cas
234   if (aCaseName != _aCaseName )
235   {
236     _aCaseName = aCaseName;
237     try
238     {
239     aCase = myHomardGen->CreateCase( \
240             CORBA::string_dup(_aCaseName.toStdString().c_str()),  \
241             CORBA::string_dup(aMeshName.toStdString().c_str()),  \
242             CORBA::string_dup(aFileName.toStdString().c_str()) );
243     }
244     catch( SALOME::SALOME_Exception& S_ex )
245     {
246       QMessageBox::critical( 0, QObject::tr("HOM_ERROR"),
247                                 QObject::tr(CORBA::string_dup(S_ex.details.text)) );
248       return false;
249     }
250     LEFileName->setReadOnly(true);
251     PushFichier->hide();
252     InitBoundarys();
253   }
254
255 // Repertoire et type
256   aCase->SetDirName(aDirName.toStdString().c_str());
257   _aDirName=aDirName;
258   aCase->SetConfType(_ConfType);
259   aCase->SetExtType(_ExtType);
260
261 //   Menage des eventuelles frontieres deja enregistrees
262   aCase->SupprBoundaryGroup() ;
263
264   // Enregistrement et publication dans l'arbre d'etudes a la sortie definitive
265   if ( option > 0 )
266   {
267     if (CBBoundaryD->isChecked())
268     {
269       QString monBoundaryDiName=CBBoundaryDi->currentText();
270       if (monBoundaryDiName != "" )
271       {
272         aCase->AddBoundaryGroup(monBoundaryDiName.toStdString().c_str(), "");
273       }
274     }
275     if (CBBoundaryA->isChecked())
276     {
277       QString NomGroup ;
278       int nbcol = TWBoundary->columnCount();
279       int nbrow = TWBoundary->rowCount();
280       for ( int col=1; col< nbcol; col++)
281       {
282         for ( int row=0; row< nbrow; row++)
283         {
284           if ( TWBoundary->item( row, col )->checkState() ==  Qt::Checked )
285           {
286   //        Nom du groupe
287             NomGroup = QString(TWBoundary->item(row, 0)->text()) ;
288   //        Nom de la frontiere
289             QTableWidgetItem *__colItem = new QTableWidgetItem();
290             __colItem = TWBoundary->horizontalHeaderItem(col);
291             aCase->AddBoundaryGroup(QString(__colItem->text()).toStdString().c_str(), NomGroup.toStdString().c_str());
292           }
293         }
294       }
295     }
296   }
297
298
299 // Options avancees
300   if (CBAdvanced->isChecked())
301   {
302 // Autorisation des pyramides
303     if (CBPyramid->isChecked()) { _Pyram = 1 ; }
304   }
305   aCase->SetPyram(_Pyram);
306
307   HOMARD_UTILS::updateObjBrowser();
308
309   return true;
310 }
311 // ---------------------------
312 void MonCreateCase::PushOnOK()
313 // ---------------------------
314 {
315   bool bOK = PushOnApply(1);
316   if ( bOK ) this->close();
317 }
318 //------------------------------
319 void MonCreateCase::PushOnHelp()
320 //-------------------------------
321 {
322   std::string LanguageShort = myHomardGen->GetLanguageShort();
323   HOMARD_UTILS::PushOnHelp(QString("gui_create_case.html"), QString(""), QString(LanguageShort.c_str()));
324 }
325 // ---------------------------------
326 void MonCreateCase::SetNewName()
327 // ------------------------------
328 {
329   HOMARD::listeCases_var  MyCases = myHomardGen->GetAllCasesName();
330   int num = 0; QString aCaseName="";
331   while (aCaseName=="" )
332   {
333     aCaseName.setNum(num+1) ;
334     aCaseName.insert(0, QString("Case_")) ;
335     for ( int i=0; i<MyCases->length(); i++)
336     {
337       if ( aCaseName ==  QString((MyCases)[i]))
338       {
339         num ++ ;
340         aCaseName = "" ;
341         break ;
342       }
343    }
344   }
345   LEName->clear() ;
346   LEName->insert(aCaseName);
347 }
348
349 // ------------------------------------------------------------------------
350 void MonCreateCase::SetDirName()
351 // ------------------------------------------------------------------------
352 {
353   QString aDirName=QFileDialog::getExistingDirectory ();
354   if (!(aDirName.isEmpty()))LEDirName->setText(aDirName);
355 }
356 // ------------------------------------------------------------------------
357 void MonCreateCase::SetFileName()
358 // ------------------------------------------------------------------------
359 {
360   QString fileName0 = LEFileName->text().trimmed();
361   QString fileName = HOMARD_QT_COMMUN::PushNomFichier( false, QString("med") ) ;
362   if (fileName.isEmpty()) fileName = fileName0 ;
363   LEFileName->setText(fileName);
364 }
365 // ------------------------------------------------------------------------
366 void MonCreateCase::SetConforme()
367 // ------------------------------------------------------------------------
368 {
369 //
370   _ConfType=0;
371   RBNC1NpA->setVisible(0);
372   RBNCQuelconque->setVisible(0);
373 //
374   adjustSize();
375 }
376 // ------------------------------------------------------------------------
377 void MonCreateCase::SetNonConforme()
378 // ------------------------------------------------------------------------
379 {
380 //
381   _ConfType=1;
382   RBNC1NpA->setVisible(1);
383   RBNCQuelconque->setVisible(1);
384 //
385   adjustSize();
386 }
387 // ------------------------------------------------------------------------
388 void MonCreateCase::SetStandard()
389 // ------------------------------------------------------------------------
390 {
391   if ( ( _ConfType == 0 ) || ( _ConfType == -1 ) ) { _ConfType = 0 ; }
392   else { _ConfType = 1 ; }
393   RBStandard->setChecked(true);
394 }
395 // ------------------------------------------------------------------------
396 void MonCreateCase::SetBox()
397 // ------------------------------------------------------------------------
398 {
399   if ( ( _ConfType == 0 ) || ( _ConfType == -1 ) ) { _ConfType = -1 ; }
400   else { _ConfType = -2 ; }
401 }
402 // ------------------------------------------------------------------------
403 void MonCreateCase::SetNC1NpA()
404 // ------------------------------------------------------------------------
405 {
406   _ConfType = 2;
407 }
408 // ------------------------------------------------------------------------
409 void MonCreateCase::SetNCQuelconque()
410 // ------------------------------------------------------------------------
411 {
412   _ConfType = 3;
413 }
414 // ------------------------------------------------------------------------
415 void MonCreateCase::SetMED()
416 // ------------------------------------------------------------------------
417 {
418   _ExtType = 0 ;
419   RBMED->setChecked(true);
420 }
421 // ------------------------------------------------------------------------
422 void MonCreateCase::SetSaturne2D()
423 // ------------------------------------------------------------------------
424 {
425   _ExtType = 1 ;
426   RBSaturne2D->setChecked(true);
427 }
428 // ------------------------------------------------------------------------
429 void MonCreateCase::SetBoundaryD()
430 // ------------------------------------------------------------------------
431 {
432   MESSAGE("Debut de SetBoundaryD ");
433   if (CBBoundaryD->isChecked())
434   {
435     bool bOK = PushOnApply(0);
436     if (bOK) { GBBoundaryD->setVisible(1); }
437     else     { GBBoundaryD->setVisible(0);
438                CBBoundaryD->setChecked(0);
439                CBBoundaryD->setCheckState(Qt::Unchecked); }
440   }
441   else { GBBoundaryD->setVisible(0); }
442 //
443   adjustSize();
444 }
445 // ------------------------------------------------------------------------
446 void MonCreateCase::AddBoundaryDi(QString newBoundary)
447 // ------------------------------------------------------------------------
448 {
449   CBBoundaryDi->insertItem(0,newBoundary);
450   CBBoundaryDi->setCurrentIndex(0);
451 }
452 // ------------------------------------------------------------------------
453 void MonCreateCase::PushBoundaryDiNew()
454 // ------------------------------------------------------------------------
455 {
456    MonCreateBoundaryDi *BoundaryDlg = new MonCreateBoundaryDi(this, true,
457                 HOMARD::HOMARD_Gen::_duplicate(myHomardGen), _aCaseName, "") ;
458    BoundaryDlg->show();
459 }
460 // ------------------------------------------------------------------------
461 void MonCreateCase::PushBoundaryDiEdit()
462 // ------------------------------------------------------------------------
463 {
464   if (CBBoundaryDi->currentText() == QString(""))  return;
465   MonEditBoundaryDi *BoundaryDlg = new MonEditBoundaryDi(this, true,
466        HOMARD::HOMARD_Gen::_duplicate(myHomardGen), _aCaseName, CBBoundaryDi->currentText() ) ;
467   BoundaryDlg->show();
468 }
469 // ------------------------------------------------------------------------
470 void MonCreateCase::PushBoundaryDiHelp()
471 // ------------------------------------------------------------------------
472 {
473   std::string LanguageShort = myHomardGen->GetLanguageShort();
474   HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html"), QString("frontiere-discrete"), QString(LanguageShort.c_str()));
475 }
476 // ------------------------------------------------------------------------
477 void MonCreateCase::SetBoundaryA()
478 // ------------------------------------------------------------------------
479 {
480   MESSAGE("Debut de SetBoundaryA ");
481   if (CBBoundaryA->isChecked())
482   {
483     bool bOK = PushOnApply(0);
484     if (bOK) { GBBoundaryA->setVisible(1); }
485     else     { GBBoundaryA->setVisible(0);
486                CBBoundaryA->setChecked(0);
487                CBBoundaryA->setCheckState(Qt::Unchecked); }
488   }
489   else { GBBoundaryA->setVisible(0); }
490 //
491   adjustSize();
492 //
493 //   MESSAGE("Fin de SetBoundaryA ");
494 }
495 // ------------------------------------------------------------------------
496 void MonCreateCase::AddBoundaryAn(QString newBoundary)
497 // ------------------------------------------------------------------------
498 {
499   MESSAGE("Debut de AddBoundaryAn ");
500 // Ajout d'une nouvelle colonne
501   int nbcol = TWBoundary->columnCount();
502 //   MESSAGE("nbcol " <<  nbcol);
503   nbcol += 1 ;
504   TWBoundary->setColumnCount ( nbcol ) ;
505   QTableWidgetItem *__colItem = new QTableWidgetItem();
506   __colItem->setText(QApplication::translate("CreateCase", newBoundary.toStdString().c_str(), 0));
507   TWBoundary->setHorizontalHeaderItem(nbcol-1, __colItem);
508 /*  TWBoundary->horizontalHeaderItem(nbcol-1)->setFlags( Qt::ItemIsSelectable|Qt::ItemIsEnabled );*/
509 // Chaque case est a cocher
510   int nbrow = TWBoundary->rowCount();
511 //   MESSAGE("nbrow " <<  nbrow);
512   for ( int i = 0; i < nbrow; i++ )
513   {
514     TWBoundary->setItem( i, nbcol-1, new QTableWidgetItem( QString ("") ) );
515     TWBoundary->item( i, nbcol-1 )->setFlags( 0 );
516     TWBoundary->item( i, nbcol-1 )->setFlags( Qt::ItemIsUserCheckable|Qt::ItemIsEnabled  );
517     TWBoundary->item( i, nbcol-1 )->setCheckState( Qt::Unchecked );
518   }
519   TWBoundary->resizeColumnToContents(nbcol-1);
520 //   TWBoundary->resizeRowsToContents();
521 //   MESSAGE("Fin de AddBoundaryAn ");
522 }
523 // ------------------------------------------------------------------------
524 void MonCreateCase::PushBoundaryAnNew()
525 // ------------------------------------------------------------------------
526 {
527    MonCreateBoundaryAn *BoundaryDlg = new MonCreateBoundaryAn(this, true,
528                 HOMARD::HOMARD_Gen::_duplicate(myHomardGen), _aCaseName) ;
529    BoundaryDlg->show();
530 }
531 // ------------------------------------------------------------------------
532 void MonCreateCase::PushBoundaryAnEdit()
533 // ------------------------------------------------------------------------
534 {
535   QString nom="";
536   int nbcol = TWBoundary->columnCount();
537   for ( int i = 1; i < nbcol; i++ )
538   {
539     QTableWidgetItem *__colItem = new QTableWidgetItem();
540     __colItem = TWBoundary->horizontalHeaderItem(i);
541     nom = QString(__colItem->text()) ;
542     MESSAGE("nom "<<nom.toStdString().c_str());
543     if (nom != QString(""))
544     { MonEditBoundaryAn *BoundaryDlg = new MonEditBoundaryAn(this, true,
545         HOMARD::HOMARD_Gen::_duplicate(myHomardGen), _aCaseName, nom ) ;
546       BoundaryDlg->show(); }
547   }
548 }
549 // ------------------------------------------------------------------------
550 void MonCreateCase::PushBoundaryAnHelp()
551 // ------------------------------------------------------------------------
552 {
553   std::string LanguageShort = myHomardGen->GetLanguageShort();
554   HOMARD_UTILS::PushOnHelp(QString("gui_create_boundary.html"), QString("frontiere-analytique"), QString(LanguageShort.c_str()));
555 }
556 // ------------------------------------------------------------------------
557 void MonCreateCase::CaseNameChanged()
558 // ------------------------------------------------------------------------
559 {
560     if (_aCaseName != LEName->text().trimmed())
561     {
562        LEFileName->setReadOnly(false);
563        PushFichier->show();
564     }
565 }
566 // ------------------------------------------------------------------------
567 void MonCreateCase::SetAdvanced()
568 // ------------------------------------------------------------------------
569 {
570   MESSAGE("Debut de SetAdvanced ");
571   if (CBAdvanced->isChecked())
572   { GBAdvancedOptions->setVisible(1);
573     GBConforme->setVisible(1);
574     RBStandard->setVisible(1);
575     RBBox->setVisible(1);
576     if ( ( _ConfType == 0 ) || ( _ConfType == -1 ) )
577     { RBNC1NpA->setVisible(0);
578       RBNCQuelconque->setVisible(0);}
579     else
580     { RBNC1NpA->setVisible(1);
581       RBNCQuelconque->setVisible(1);}
582     GBFormat->setVisible(1);
583     RBMED->setVisible(1);
584     RBSaturne2D->setVisible(1);
585   }
586   else
587   { GBAdvancedOptions->setVisible(0);
588     CBPyramid->setChecked(false);
589     _Pyram = 0 ;
590     SetStandard() ;
591     SetMED() ;
592  }
593 //
594   adjustSize();
595 }