From: prascle Date: Mon, 7 Nov 2011 10:27:01 +0000 (+0000) Subject: PR: merge from PatchGN_20111102 X-Git-Tag: RELIQUAT_6x_15112011 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FV6_4_0_BR;p=modules%2Fhomard.git PR: merge from PatchGN_20111102 --- diff --git a/clean_configure b/clean_configure index 9d129daf..7c49c98e 100755 --- a/clean_configure +++ b/clean_configure @@ -25,11 +25,5 @@ find . -name "*.pyc" -print -exec rm {} \; # Files created by libtoolize and automake ( cd adm_local/unix/config_files && rm -f config.* depcomp install-sh l*.m4 ltmain.sh missing py-compile install-sh missing depcomp py-compile ) -find bin -name Makefile.in | xargs rm -f -find doc -name Makefile.in | xargs rm -f -find idl -name Makefile.in | xargs rm -f -find resources -name Makefile.in | xargs rm -f -find tests -name Makefile.in | xargs rm -f -find src -name Makefile.in | xargs rm -f -rm -f Makefile.in +find . -name Makefile.in | xargs rm -f rm -f COPYING INSTALL diff --git a/doc/gui_create_case.rst b/doc/gui_create_case.rst index 5e0f0195..0e5fe972 100644 --- a/doc/gui_create_case.rst +++ b/doc/gui_create_case.rst @@ -79,26 +79,11 @@ On cochera le ou les boutons voulus : La définition des frontières est décrite dans :ref:`gui_create_boundary`. -Les options avancées -"""""""""""""""""""" -Si la case "Options avancées" n'est pas cochée, aucune contrainte supplémentaire n'est définie. - -Si la case est cochée, on définira les options avancées qui portent sur la finesse maximale de maillage que l'on ne veut pas dépasser. Deux directives sont possibles, séparément ou ensemble. - -On peut imposer une taille de maille minimale : une maille dont le diamètre est inférieur à cette limite ne sera plus découpée. Par défaut, on propose un diamètre minimal nul, ce qui revient à ne rien imposer. - -On peut imposer un niveau de raffinement maximal. Par défaut, le maximum est à 99, ce qui équivaut en général à ne rien imposer. - -.. image:: images/create_case_6.png - :align: center - -.. index:: single: arbre d'étude - L'arbre d'étude """"""""""""""" A l'issue de cette création de cas, l'arbre d'études a été enrichi de ce nouveau cas. On y trouve l'itération initiale, identifiée par le nom du maillage qui a été lu dans le fichier fourni. -.. image:: images/create_case_7.png +.. image:: images/create_case_6.png :align: center diff --git a/doc/gui_create_hypothese.rst b/doc/gui_create_hypothese.rst index b4d2eeca..5b4dd604 100644 --- a/doc/gui_create_hypothese.rst +++ b/doc/gui_create_hypothese.rst @@ -106,6 +106,21 @@ Si on veut choisir les champs :align: center +Les options avancées +"""""""""""""""""""" +Si la case "Options avancées" n'est pas cochée, aucune contrainte supplémentaire n'est définie. + +Si la case est cochée, on définira les options avancées qui portent sur la finesse maximale de maillage que l'on ne veut pas dépasser. Deux directives sont possibles, séparément ou ensemble. + +On peut imposer une taille de maille minimale : une maille dont le diamètre est inférieur à cette limite ne sera plus découpée. Par défaut, on propose un diamètre minimal nul, ce qui revient à ne rien imposer. + +On peut imposer un niveau de raffinement maximal. Par défaut, le maximum est à 99, ce qui équivaut en général à ne rien imposer. + +.. image:: images/create_hypothese_av_1.png + :align: center + +.. index:: single: arbre d'étude + L'arbre d'étude """"""""""""""" .. index:: single: arbre d'étude diff --git a/doc/images/create_case_1.png b/doc/images/create_case_1.png index e326f1fc..34796a77 100644 Binary files a/doc/images/create_case_1.png and b/doc/images/create_case_1.png differ diff --git a/doc/images/create_case_6.png b/doc/images/create_case_6.png index 1c48bd45..c5987297 100644 Binary files a/doc/images/create_case_6.png and b/doc/images/create_case_6.png differ diff --git a/doc/images/create_case_7.png b/doc/images/create_case_7.png deleted file mode 100644 index c5987297..00000000 Binary files a/doc/images/create_case_7.png and /dev/null differ diff --git a/doc/images/create_hypothese_1.png b/doc/images/create_hypothese_1.png index eb040157..7c6eb197 100644 Binary files a/doc/images/create_hypothese_1.png and b/doc/images/create_hypothese_1.png differ diff --git a/doc/images/create_hypothese_av_1.png b/doc/images/create_hypothese_av_1.png new file mode 100644 index 00000000..1c48bd45 Binary files /dev/null and b/doc/images/create_hypothese_av_1.png differ diff --git a/doc/tui_create_case.rst b/doc/tui_create_case.rst index 393fcd9a..77e58b40 100644 --- a/doc/tui_create_case.rst +++ b/doc/tui_create_case.rst @@ -91,28 +91,6 @@ M | - ``group`` : nom d'un groupe de faces placées sur la | | frontière | +---------------------------------------------------------------+ -| .. module:: SetNivMax | -| | -| **SetNivMax(nivmax)** | -| | -| - ``nivmax`` : niveau de raffinement à ne pas dépasser | -+---------------------------------------------------------------+ -| .. module:: GetNivMax | -| | -| **GetNivMax()** | -| Retourne le niveau maximal de raffinement | -+---------------------------------------------------------------+ -| .. module:: SetDiamMin | -| | -| **SetDiamMin(diammin)** | -| | -| - ``diammin`` : diamètre minimal voulu pour une maille | -+---------------------------------------------------------------+ -| .. module:: GetDiamMin | -| | -| **GetDiamMin()** | -| Retourne le diamètre minimal voulu | -+---------------------------------------------------------------+ Exemple diff --git a/doc/tui_create_hypothese.rst b/doc/tui_create_hypothese.rst index bbcb981f..3ffeb89c 100644 --- a/doc/tui_create_hypothese.rst +++ b/doc/tui_create_hypothese.rst @@ -187,6 +187,34 @@ Le filtrage par les groupes | Retourne la liste des groupes utilisés pour le filtrage | +---------------------------------------------------------------+ +Les options avancéess +^^^^^^^^^^^^^^^^^^^^^ + ++---------------------------------------------------------------+ ++---------------------------------------------------------------+ +| .. module:: SetNivMax | +| | +| **SetNivMax(nivmax)** | +| | +| - ``nivmax`` : niveau de raffinement à ne pas dépasser | ++---------------------------------------------------------------+ +| .. module:: GetNivMax | +| | +| **GetNivMax()** | +| Retourne le niveau maximal de raffinement | ++---------------------------------------------------------------+ +| .. module:: SetDiamMin | +| | +| **SetDiamMin(diammin)** | +| | +| - ``diammin`` : diamètre minimal voulu pour une maille | ++---------------------------------------------------------------+ +| .. module:: GetDiamMin | +| | +| **GetDiamMin()** | +| Retourne le diamètre minimal voulu | ++---------------------------------------------------------------+ + Exemple """"""" diff --git a/idl/HOMARD_Cas.idl b/idl/HOMARD_Cas.idl index e5099976..e1ce5a96 100644 --- a/idl/HOMARD_Cas.idl +++ b/idl/HOMARD_Cas.idl @@ -43,12 +43,6 @@ module HOMARD void SetConfType(in long ConfType) raises (SALOME::SALOME_Exception); long GetConfType() raises (SALOME::SALOME_Exception); - void SetNivMax(in long NivMax) raises (SALOME::SALOME_Exception); - long GetNivMax() raises (SALOME::SALOME_Exception); - - void SetDiamMin(in double DiamMin) raises (SALOME::SALOME_Exception); - double GetDiamMin() raises (SALOME::SALOME_Exception); - void AddIteration (in string NomIteration) raises (SALOME::SALOME_Exception); string GetIter0Name () raises (SALOME::SALOME_Exception); diff --git a/idl/HOMARD_Hypothesis.idl b/idl/HOMARD_Hypothesis.idl index 0d1b697f..5679beb8 100644 --- a/idl/HOMARD_Hypothesis.idl +++ b/idl/HOMARD_Hypothesis.idl @@ -94,6 +94,12 @@ module HOMARD void SupprFieldInterp() raises (SALOME::SALOME_Exception); listFieldInterpHypo GetListFieldInterp() raises (SALOME::SALOME_Exception); + void SetNivMax(in long NivMax) raises (SALOME::SALOME_Exception); + long GetNivMax() raises (SALOME::SALOME_Exception); + + void SetDiamMin(in double DiamMin) raises (SALOME::SALOME_Exception); + double GetDiamMin() raises (SALOME::SALOME_Exception); + string GetDumpPython() raises (SALOME::SALOME_Exception); }; diff --git a/src/HOMARD/HOMARD_Cas.cxx b/src/HOMARD/HOMARD_Cas.cxx index 83403f6f..d002e71e 100644 --- a/src/HOMARD/HOMARD_Cas.cxx +++ b/src/HOMARD/HOMARD_Cas.cxx @@ -53,7 +53,7 @@ void HOMARD_Cas::SetDirName( const char* NomDir ) { _NomDir = std::string( NomDir ); } - else + else { // GERALD -- QMESSAGE BOX // std::cerr << "Pb pour entrer dans le repertoire : "< 0 ) - { - aScript << "\t" <<_NomCas << ".SetNivMax("; - aScript << _NivMax << ")\n"; - aScript << "\t" <<_NomCas << ".SetDiamMin("; - aScript << _DiamMin << ")\n"; - } + return aScript.str(); } //============================================================================= @@ -153,7 +147,7 @@ const int HOMARD_Cas::GetConfType() const return _ConfType; } //============================================================================= -int HOMARD_Cas::GetNumber() +int HOMARD_Cas::GetNumber() //============================================================================= { @@ -230,28 +224,3 @@ void HOMARD_Cas::SupprBoundaryGroup() { _ListBoundaryGroup.clear(); } -//============================================================================= -void HOMARD_Cas::SetNivMax( int NivMax ) -//============================================================================= -{ - _NivMax = NivMax; -} -//============================================================================= -const int HOMARD_Cas::GetNivMax() const -//============================================================================= -{ - return _NivMax; -} -//============================================================================= -void HOMARD_Cas::SetDiamMin( double DiamMin ) -//============================================================================= -{ - _DiamMin = DiamMin; -} -//============================================================================= -const double HOMARD_Cas::GetDiamMin() const -//============================================================================= -{ - return _DiamMin; -} - diff --git a/src/HOMARD/HOMARD_Cas.hxx b/src/HOMARD/HOMARD_Cas.hxx index b9f580ea..0c393040 100644 --- a/src/HOMARD/HOMARD_Cas.hxx +++ b/src/HOMARD/HOMARD_Cas.hxx @@ -45,12 +45,6 @@ public: const int GetConfType() const; int GetNumber(); - void SetNivMax( int NivMax ); - const int GetNivMax() const; - - void SetDiamMin( double DiamMin ); - const double GetDiamMin() const; - void AddIteration( const char* NomIteration ); const std::list& GetIterations() const; void SupprIterations(); @@ -77,8 +71,6 @@ private: std::string _NomCas; std::string _NomDir; int _ConfType; - int _NivMax; - double _DiamMin; std::vector _Boite; // cf HomardQTCommun pour structure du vecteur std::list _ListGroup; diff --git a/src/HOMARD/HOMARD_DriverTools.cxx b/src/HOMARD/HOMARD_DriverTools.cxx index 897069ae..6f7e8bf3 100644 --- a/src/HOMARD/HOMARD_DriverTools.cxx +++ b/src/HOMARD/HOMARD_DriverTools.cxx @@ -130,9 +130,6 @@ namespace HOMARD for ( it = ListString.begin(); it != ListString.end(); ++it ) os << separator() << *it; - os << separator() << cas.GetNivMax(); - os << separator() << cas.GetDiamMin(); - // MESSAGE( ". Fin avec "< 0 ) + { + aScript << "\t" <<_NomHypo << ".SetNivMax("; + aScript << _NivMax << ")\n"; + aScript << "\t" <<_NomHypo << ".SetDiamMin("; + aScript << _DiamMin << ")\n"; + } return aScript.str(); } @@ -390,4 +397,31 @@ const std::list& HOMARD_Hypothesis::GetListFieldInterp() const { return _ListFieldInterp; } - +//============================================================================= +void HOMARD_Hypothesis::SetNivMax( int NivMax ) +//============================================================================= +{ + _NivMax = NivMax; +} +//============================================================================= +const int HOMARD_Hypothesis::GetNivMax() const +//============================================================================= +{ + return _NivMax; +} +//============================================================================= +void HOMARD_Hypothesis::SetDiamMin( double DiamMin ) +//============================================================================= +{ + _DiamMin = DiamMin; + if ( _NivMax < 0 ) + { + _NivMax = 99 ; + } +} +//============================================================================= +const double HOMARD_Hypothesis::GetDiamMin() const +//============================================================================= +{ + return _DiamMin; +} diff --git a/src/HOMARD/HOMARD_Hypothesis.hxx b/src/HOMARD/HOMARD_Hypothesis.hxx index 6b6faebb..ca3d785d 100644 --- a/src/HOMARD/HOMARD_Hypothesis.hxx +++ b/src/HOMARD/HOMARD_Hypothesis.hxx @@ -83,7 +83,11 @@ public: void SupprFieldInterp(); const std::list& GetListFieldInterp() const; + void SetNivMax( int NivMax ); + const int GetNivMax() const; + void SetDiamMin( double DiamMin ); + const double GetDiamMin() const; private: @@ -107,6 +111,8 @@ private: int _TypeFieldInterp; // 0 pour aucune interpolation, // 1 pour interpolation de tous les champs, // 2 pour une liste + int _NivMax; + double _DiamMin; std::list _ListIter; std::list _ListZone; diff --git a/src/HOMARDGUI/CreateCase.h b/src/HOMARDGUI/CreateCase.h index e976bca2..37603d39 100644 --- a/src/HOMARDGUI/CreateCase.h +++ b/src/HOMARDGUI/CreateCase.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading ui file 'CreateCase.ui' ** -** Created: Mon Sep 12 15:31:56 2011 +** Created: Fri Oct 28 11:27:32 2011 ** by: Qt User Interface Compiler version 4.2.1 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -26,7 +25,6 @@ #include #include #include -#include #include #include @@ -34,30 +32,22 @@ class Ui_CreateCase { public: QGridLayout *gridLayout; - QGroupBox *GBAdvancedOptions; - QGridLayout *gridLayout1; - QSpacerItem *spacerItem; - QLabel *TLMinimalDiameter; - QSpinBox *spinBoxNivMax; - QDoubleSpinBox *doubleSpinBoxDiamMin; - QLabel *TLMaximalLevel; QGroupBox *GBBoundaryA; QTableWidget *TWBoundary; QWidget *layoutWidget; - QGridLayout *gridLayout2; + QGridLayout *gridLayout1; QPushButton *PBBoundaryAnEdit; QPushButton *PBBoundaryAnNew; QPushButton *PBBoundaryAnHelp; - QCheckBox *CBAdvanced; QGroupBox *GBBoundaryD; - QGridLayout *gridLayout3; + QGridLayout *gridLayout2; QPushButton *PBBoundaryDiEdit; QPushButton *PBBoundaryDiNew; QComboBox *CBBoundaryDi; - QSpacerItem *spacerItem1; + QSpacerItem *spacerItem; QPushButton *PBBoundaryDiHelp; QGroupBox *GroupButtons; - QGridLayout *gridLayout4; + QGridLayout *gridLayout3; QPushButton *buttonHelp; QPushButton *buttonCancel; QPushButton *buttonApply; @@ -76,20 +66,20 @@ public: QLabel *Mesh_2; QPushButton *PushFichier; QLineEdit *LEFileName; - QSpacerItem *spacerItem2; + QSpacerItem *spacerItem1; QGroupBox *GBTypeConf; QHBoxLayout *hboxLayout4; QRadioButton *RBConforme; QRadioButton *RBNonConforme; - QSpacerItem *spacerItem3; + QSpacerItem *spacerItem2; QGroupBox *GBTypeNoConf; QHBoxLayout *hboxLayout5; QRadioButton *RB1NpM; QRadioButton *RB1NpA; QRadioButton *RBQuelconque; + QSpacerItem *spacerItem3; QSpacerItem *spacerItem4; QSpacerItem *spacerItem5; - QSpacerItem *spacerItem6; void setupUi(QDialog *CreateCase) { @@ -104,53 +94,6 @@ public: gridLayout->setSpacing(6); gridLayout->setMargin(9); gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - GBAdvancedOptions = new QGroupBox(CreateCase); - GBAdvancedOptions->setObjectName(QString::fromUtf8("GBAdvancedOptions")); - gridLayout1 = new QGridLayout(GBAdvancedOptions); - gridLayout1->setSpacing(6); - gridLayout1->setMargin(9); - gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); - spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - gridLayout1->addItem(spacerItem, 0, 2, 1, 1); - - TLMinimalDiameter = new QLabel(GBAdvancedOptions); - TLMinimalDiameter->setObjectName(QString::fromUtf8("TLMinimalDiameter")); - QSizePolicy sizePolicy1(static_cast(0), static_cast(0)); - sizePolicy1.setHorizontalStretch(0); - sizePolicy1.setVerticalStretch(0); - sizePolicy1.setHeightForWidth(TLMinimalDiameter->sizePolicy().hasHeightForWidth()); - TLMinimalDiameter->setSizePolicy(sizePolicy1); - TLMinimalDiameter->setWordWrap(false); - - gridLayout1->addWidget(TLMinimalDiameter, 0, 0, 1, 1); - - spinBoxNivMax = new QSpinBox(GBAdvancedOptions); - spinBoxNivMax->setObjectName(QString::fromUtf8("spinBoxNivMax")); - spinBoxNivMax->setValue(99); - - gridLayout1->addWidget(spinBoxNivMax, 0, 4, 1, 1); - - doubleSpinBoxDiamMin = new QDoubleSpinBox(GBAdvancedOptions); - doubleSpinBoxDiamMin->setObjectName(QString::fromUtf8("doubleSpinBoxDiamMin")); - doubleSpinBoxDiamMin->setDecimals(5); - - gridLayout1->addWidget(doubleSpinBoxDiamMin, 0, 1, 1, 1); - - TLMaximalLevel = new QLabel(GBAdvancedOptions); - TLMaximalLevel->setObjectName(QString::fromUtf8("TLMaximalLevel")); - QSizePolicy sizePolicy2(static_cast(0), static_cast(0)); - sizePolicy2.setHorizontalStretch(0); - sizePolicy2.setVerticalStretch(0); - sizePolicy2.setHeightForWidth(TLMaximalLevel->sizePolicy().hasHeightForWidth()); - TLMaximalLevel->setSizePolicy(sizePolicy2); - TLMaximalLevel->setWordWrap(false); - - gridLayout1->addWidget(TLMaximalLevel, 0, 3, 1, 1); - - - gridLayout->addWidget(GBAdvancedOptions, 14, 0, 1, 1); - GBBoundaryA = new QGroupBox(CreateCase); GBBoundaryA->setObjectName(QString::fromUtf8("GBBoundaryA")); GBBoundaryA->setMinimumSize(QSize(548, 200)); @@ -164,110 +107,105 @@ public: layoutWidget = new QWidget(GBBoundaryA); layoutWidget->setObjectName(QString::fromUtf8("layoutWidget")); layoutWidget->setGeometry(QRect(430, 40, 77, 95)); - gridLayout2 = new QGridLayout(layoutWidget); - gridLayout2->setSpacing(6); - gridLayout2->setMargin(0); - gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); + gridLayout1 = new QGridLayout(layoutWidget); + gridLayout1->setSpacing(6); + gridLayout1->setMargin(0); + gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); PBBoundaryAnEdit = new QPushButton(layoutWidget); PBBoundaryAnEdit->setObjectName(QString::fromUtf8("PBBoundaryAnEdit")); PBBoundaryAnEdit->setAutoDefault(false); - gridLayout2->addWidget(PBBoundaryAnEdit, 1, 0, 1, 1); + gridLayout1->addWidget(PBBoundaryAnEdit, 1, 0, 1, 1); PBBoundaryAnNew = new QPushButton(layoutWidget); PBBoundaryAnNew->setObjectName(QString::fromUtf8("PBBoundaryAnNew")); PBBoundaryAnNew->setAutoDefault(false); - gridLayout2->addWidget(PBBoundaryAnNew, 0, 0, 1, 1); + gridLayout1->addWidget(PBBoundaryAnNew, 0, 0, 1, 1); PBBoundaryAnHelp = new QPushButton(layoutWidget); PBBoundaryAnHelp->setObjectName(QString::fromUtf8("PBBoundaryAnHelp")); PBBoundaryAnHelp->setAutoDefault(false); - gridLayout2->addWidget(PBBoundaryAnHelp, 2, 0, 1, 1); + gridLayout1->addWidget(PBBoundaryAnHelp, 2, 0, 1, 1); gridLayout->addWidget(GBBoundaryA, 12, 0, 1, 2); - CBAdvanced = new QCheckBox(CreateCase); - CBAdvanced->setObjectName(QString::fromUtf8("CBAdvanced")); - - gridLayout->addWidget(CBAdvanced, 13, 0, 1, 1); - GBBoundaryD = new QGroupBox(CreateCase); GBBoundaryD->setObjectName(QString::fromUtf8("GBBoundaryD")); - QSizePolicy sizePolicy3(static_cast(0), static_cast(0)); - sizePolicy3.setHorizontalStretch(0); - sizePolicy3.setVerticalStretch(0); - sizePolicy3.setHeightForWidth(GBBoundaryD->sizePolicy().hasHeightForWidth()); - GBBoundaryD->setSizePolicy(sizePolicy3); - gridLayout3 = new QGridLayout(GBBoundaryD); - gridLayout3->setSpacing(6); - gridLayout3->setMargin(9); - gridLayout3->setObjectName(QString::fromUtf8("gridLayout3")); + QSizePolicy sizePolicy1(static_cast(0), static_cast(0)); + sizePolicy1.setHorizontalStretch(0); + sizePolicy1.setVerticalStretch(0); + sizePolicy1.setHeightForWidth(GBBoundaryD->sizePolicy().hasHeightForWidth()); + GBBoundaryD->setSizePolicy(sizePolicy1); + gridLayout2 = new QGridLayout(GBBoundaryD); + gridLayout2->setSpacing(6); + gridLayout2->setMargin(9); + gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); PBBoundaryDiEdit = new QPushButton(GBBoundaryD); PBBoundaryDiEdit->setObjectName(QString::fromUtf8("PBBoundaryDiEdit")); PBBoundaryDiEdit->setAutoDefault(false); - gridLayout3->addWidget(PBBoundaryDiEdit, 0, 3, 1, 1); + gridLayout2->addWidget(PBBoundaryDiEdit, 0, 3, 1, 1); PBBoundaryDiNew = new QPushButton(GBBoundaryD); PBBoundaryDiNew->setObjectName(QString::fromUtf8("PBBoundaryDiNew")); PBBoundaryDiNew->setAutoDefault(false); - gridLayout3->addWidget(PBBoundaryDiNew, 0, 2, 1, 1); + gridLayout2->addWidget(PBBoundaryDiNew, 0, 2, 1, 1); CBBoundaryDi = new QComboBox(GBBoundaryD); CBBoundaryDi->setObjectName(QString::fromUtf8("CBBoundaryDi")); CBBoundaryDi->setSizeAdjustPolicy(QComboBox::AdjustToContents); - gridLayout3->addWidget(CBBoundaryDi, 0, 0, 1, 1); + gridLayout2->addWidget(CBBoundaryDi, 0, 0, 1, 1); - spacerItem1 = new QSpacerItem(40, 13, QSizePolicy::Fixed, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(40, 13, QSizePolicy::Fixed, QSizePolicy::Minimum); - gridLayout3->addItem(spacerItem1, 0, 1, 1, 1); + gridLayout2->addItem(spacerItem, 0, 1, 1, 1); PBBoundaryDiHelp = new QPushButton(GBBoundaryD); PBBoundaryDiHelp->setObjectName(QString::fromUtf8("PBBoundaryDiHelp")); PBBoundaryDiHelp->setAutoDefault(false); - gridLayout3->addWidget(PBBoundaryDiHelp, 0, 4, 1, 1); + gridLayout2->addWidget(PBBoundaryDiHelp, 0, 4, 1, 1); gridLayout->addWidget(GBBoundaryD, 11, 0, 1, 1); GroupButtons = new QGroupBox(CreateCase); GroupButtons->setObjectName(QString::fromUtf8("GroupButtons")); - gridLayout4 = new QGridLayout(GroupButtons); - gridLayout4->setSpacing(6); - gridLayout4->setMargin(9); - gridLayout4->setObjectName(QString::fromUtf8("gridLayout4")); + gridLayout3 = new QGridLayout(GroupButtons); + gridLayout3->setSpacing(6); + gridLayout3->setMargin(9); + gridLayout3->setObjectName(QString::fromUtf8("gridLayout3")); buttonHelp = new QPushButton(GroupButtons); buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); buttonHelp->setAutoDefault(false); - gridLayout4->addWidget(buttonHelp, 0, 3, 1, 1); + gridLayout3->addWidget(buttonHelp, 0, 3, 1, 1); buttonCancel = new QPushButton(GroupButtons); buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); buttonCancel->setAutoDefault(false); - gridLayout4->addWidget(buttonCancel, 0, 2, 1, 1); + gridLayout3->addWidget(buttonCancel, 0, 2, 1, 1); buttonApply = new QPushButton(GroupButtons); buttonApply->setObjectName(QString::fromUtf8("buttonApply")); buttonApply->setAutoDefault(false); - gridLayout4->addWidget(buttonApply, 0, 1, 1, 1); + gridLayout3->addWidget(buttonApply, 0, 1, 1, 1); buttonOk = new QPushButton(GroupButtons); buttonOk->setObjectName(QString::fromUtf8("buttonOk")); buttonOk->setAutoDefault(false); - gridLayout4->addWidget(buttonOk, 0, 0, 1, 1); + gridLayout3->addWidget(buttonOk, 0, 0, 1, 1); - gridLayout->addWidget(GroupButtons, 15, 0, 1, 1); + gridLayout->addWidget(GroupButtons, 13, 0, 1, 1); hboxLayout = new QHBoxLayout(); hboxLayout->setSpacing(6); @@ -352,9 +290,9 @@ public: gridLayout->addLayout(hboxLayout3, 3, 0, 1, 2); - spacerItem2 = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem1 = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout->addItem(spacerItem2, 4, 0, 1, 1); + gridLayout->addItem(spacerItem1, 4, 0, 1, 1); GBTypeConf = new QGroupBox(CreateCase); GBTypeConf->setObjectName(QString::fromUtf8("GBTypeConf")); @@ -376,9 +314,9 @@ public: gridLayout->addWidget(GBTypeConf, 5, 0, 1, 2); - spacerItem3 = new QSpacerItem(20, 1, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem2 = new QSpacerItem(20, 1, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout->addItem(spacerItem3, 6, 0, 1, 1); + gridLayout->addItem(spacerItem2, 6, 0, 1, 1); GBTypeNoConf = new QGroupBox(CreateCase); GBTypeNoConf->setObjectName(QString::fromUtf8("GBTypeNoConf")); @@ -404,22 +342,22 @@ public: gridLayout->addWidget(GBTypeNoConf, 7, 0, 1, 2); - spacerItem4 = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem3 = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout->addItem(spacerItem4, 8, 0, 1, 1); + gridLayout->addItem(spacerItem3, 8, 0, 1, 1); - spacerItem5 = new QSpacerItem(20, 2, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem4 = new QSpacerItem(20, 2, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout->addItem(spacerItem5, 10, 0, 1, 1); + gridLayout->addItem(spacerItem4, 10, 0, 1, 1); - spacerItem6 = new QSpacerItem(20, 18, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem5 = new QSpacerItem(20, 18, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout->addItem(spacerItem6, 2, 1, 1, 1); + gridLayout->addItem(spacerItem5, 2, 1, 1, 1); retranslateUi(CreateCase); - QSize size(599, 925); + QSize size(601, 843); size = size.expandedTo(CreateCase->minimumSizeHint()); CreateCase->resize(size); @@ -433,9 +371,6 @@ public: void retranslateUi(QDialog *CreateCase) { CreateCase->setWindowTitle(QApplication::translate("CreateCase", "Create a case", 0, QApplication::UnicodeUTF8)); - GBAdvancedOptions->setTitle(QApplication::translate("CreateCase", "Advanced options", 0, QApplication::UnicodeUTF8)); - TLMinimalDiameter->setText(QApplication::translate("CreateCase", "Minimal diameter", 0, QApplication::UnicodeUTF8)); - TLMaximalLevel->setText(QApplication::translate("CreateCase", "Maximal level", 0, QApplication::UnicodeUTF8)); GBBoundaryA->setTitle(QApplication::translate("CreateCase", "Analytical boundary", 0, QApplication::UnicodeUTF8)); if (TWBoundary->columnCount() < 1) TWBoundary->setColumnCount(1); @@ -446,7 +381,6 @@ public: PBBoundaryAnEdit->setText(QApplication::translate("CreateCase", "Edit", 0, QApplication::UnicodeUTF8)); PBBoundaryAnNew->setText(QApplication::translate("CreateCase", "New", 0, QApplication::UnicodeUTF8)); PBBoundaryAnHelp->setText(QApplication::translate("CreateCase", "Help", 0, QApplication::UnicodeUTF8)); - CBAdvanced->setText(QApplication::translate("CreateCase", "Advanced options", 0, QApplication::UnicodeUTF8)); GBBoundaryD->setTitle(QApplication::translate("CreateCase", "Discrete boundary", 0, QApplication::UnicodeUTF8)); PBBoundaryDiEdit->setText(QApplication::translate("CreateCase", "Edit", 0, QApplication::UnicodeUTF8)); PBBoundaryDiNew->setText(QApplication::translate("CreateCase", "New", 0, QApplication::UnicodeUTF8)); diff --git a/src/HOMARDGUI/CreateCase.ui b/src/HOMARDGUI/CreateCase.ui index 9deb2cde..3bdc0ef5 100644 --- a/src/HOMARDGUI/CreateCase.ui +++ b/src/HOMARDGUI/CreateCase.ui @@ -5,8 +5,8 @@ 0 0 - 599 - 925 + 601 + 843 @@ -30,84 +30,6 @@ 6 - - - - Advanced options - - - - 9 - - - 6 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - 0 - 0 - - - - Minimal diameter - - - false - - - - - - - 99 - - - - - - - 5 - - - - - - - - 0 - 0 - 0 - 0 - - - - Maximal level - - - false - - - - - - @@ -196,13 +118,6 @@ - - - - Advanced options - - - @@ -282,7 +197,7 @@ - + diff --git a/src/HOMARDGUI/CreateHypothesis.h b/src/HOMARDGUI/CreateHypothesis.h index ba882100..1496518a 100644 --- a/src/HOMARDGUI/CreateHypothesis.h +++ b/src/HOMARDGUI/CreateHypothesis.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading ui file 'CreateHypothesis.ui' ** -** Created: Thu Sep 15 09:15:39 2011 +** Created: Fri Oct 28 11:27:29 2011 ** by: Qt User Interface Compiler version 4.2.1 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -98,8 +99,16 @@ public: QRadioButton *RBFieldChosen; QTableWidget *TWField; QCheckBox *CBGroupe; - QGroupBox *GBButtons; + QCheckBox *CBAdvanced; + QGroupBox *GBAdvancedOptions; QGridLayout *gridLayout9; + QSpacerItem *spacerItem3; + QLabel *TLMinimalDiameter; + QSpinBox *spinBoxNivMax; + QDoubleSpinBox *doubleSpinBoxDiamMin; + QLabel *TLMaximalLevel; + QGroupBox *GBButtons; + QGridLayout *gridLayout10; QPushButton *buttonOk; QPushButton *buttonApply; QPushButton *buttonCancel; @@ -520,34 +529,86 @@ public: gridLayout->addWidget(CBGroupe, 7, 0, 1, 2); - GBButtons = new QGroupBox(CreateHypothesis); - GBButtons->setObjectName(QString::fromUtf8("GBButtons")); - gridLayout9 = new QGridLayout(GBButtons); + CBAdvanced = new QCheckBox(CreateHypothesis); + CBAdvanced->setObjectName(QString::fromUtf8("CBAdvanced")); + + gridLayout->addWidget(CBAdvanced, 8, 0, 1, 1); + + GBAdvancedOptions = new QGroupBox(CreateHypothesis); + GBAdvancedOptions->setObjectName(QString::fromUtf8("GBAdvancedOptions")); + gridLayout9 = new QGridLayout(GBAdvancedOptions); gridLayout9->setSpacing(6); gridLayout9->setMargin(9); gridLayout9->setObjectName(QString::fromUtf8("gridLayout9")); + spacerItem3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + gridLayout9->addItem(spacerItem3, 0, 2, 1, 1); + + TLMinimalDiameter = new QLabel(GBAdvancedOptions); + TLMinimalDiameter->setObjectName(QString::fromUtf8("TLMinimalDiameter")); + QSizePolicy sizePolicy5(static_cast(0), static_cast(0)); + sizePolicy5.setHorizontalStretch(0); + sizePolicy5.setVerticalStretch(0); + sizePolicy5.setHeightForWidth(TLMinimalDiameter->sizePolicy().hasHeightForWidth()); + TLMinimalDiameter->setSizePolicy(sizePolicy5); + TLMinimalDiameter->setWordWrap(false); + + gridLayout9->addWidget(TLMinimalDiameter, 0, 0, 1, 1); + + spinBoxNivMax = new QSpinBox(GBAdvancedOptions); + spinBoxNivMax->setObjectName(QString::fromUtf8("spinBoxNivMax")); + spinBoxNivMax->setValue(99); + + gridLayout9->addWidget(spinBoxNivMax, 0, 4, 1, 1); + + doubleSpinBoxDiamMin = new QDoubleSpinBox(GBAdvancedOptions); + doubleSpinBoxDiamMin->setObjectName(QString::fromUtf8("doubleSpinBoxDiamMin")); + doubleSpinBoxDiamMin->setDecimals(5); + + gridLayout9->addWidget(doubleSpinBoxDiamMin, 0, 1, 1, 1); + + TLMaximalLevel = new QLabel(GBAdvancedOptions); + TLMaximalLevel->setObjectName(QString::fromUtf8("TLMaximalLevel")); + QSizePolicy sizePolicy6(static_cast(0), static_cast(0)); + sizePolicy6.setHorizontalStretch(0); + sizePolicy6.setVerticalStretch(0); + sizePolicy6.setHeightForWidth(TLMaximalLevel->sizePolicy().hasHeightForWidth()); + TLMaximalLevel->setSizePolicy(sizePolicy6); + TLMaximalLevel->setWordWrap(false); + + gridLayout9->addWidget(TLMaximalLevel, 0, 3, 1, 1); + + + gridLayout->addWidget(GBAdvancedOptions, 9, 0, 1, 1); + + GBButtons = new QGroupBox(CreateHypothesis); + GBButtons->setObjectName(QString::fromUtf8("GBButtons")); + gridLayout10 = new QGridLayout(GBButtons); + gridLayout10->setSpacing(6); + gridLayout10->setMargin(9); + gridLayout10->setObjectName(QString::fromUtf8("gridLayout10")); buttonOk = new QPushButton(GBButtons); buttonOk->setObjectName(QString::fromUtf8("buttonOk")); - gridLayout9->addWidget(buttonOk, 0, 0, 1, 1); + gridLayout10->addWidget(buttonOk, 0, 0, 1, 1); buttonApply = new QPushButton(GBButtons); buttonApply->setObjectName(QString::fromUtf8("buttonApply")); - gridLayout9->addWidget(buttonApply, 0, 1, 1, 1); + gridLayout10->addWidget(buttonApply, 0, 1, 1, 1); buttonCancel = new QPushButton(GBButtons); buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); - gridLayout9->addWidget(buttonCancel, 0, 2, 1, 1); + gridLayout10->addWidget(buttonCancel, 0, 2, 1, 1); buttonHelp = new QPushButton(GBButtons); buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); - gridLayout9->addWidget(buttonHelp, 0, 3, 1, 1); + gridLayout10->addWidget(buttonHelp, 0, 3, 1, 1); - gridLayout->addWidget(GBButtons, 8, 0, 1, 2); + gridLayout->addWidget(GBButtons, 10, 0, 1, 2); retranslateUi(CreateHypothesis); @@ -631,6 +692,10 @@ public: __colItem5->setText(QApplication::translate("CreateHypothesis", "Field Name", 0, QApplication::UnicodeUTF8)); TWField->setHorizontalHeaderItem(1, __colItem5); CBGroupe->setText(QApplication::translate("CreateHypothesis", "Filtering with groups", 0, QApplication::UnicodeUTF8)); + CBAdvanced->setText(QApplication::translate("CreateHypothesis", "Advanced options", 0, QApplication::UnicodeUTF8)); + GBAdvancedOptions->setTitle(QApplication::translate("CreateHypothesis", "Advanced options", 0, QApplication::UnicodeUTF8)); + TLMinimalDiameter->setText(QApplication::translate("CreateHypothesis", "Minimal diameter", 0, QApplication::UnicodeUTF8)); + TLMaximalLevel->setText(QApplication::translate("CreateHypothesis", "Maximal level", 0, QApplication::UnicodeUTF8)); GBButtons->setTitle(QString()); buttonOk->setText(QApplication::translate("CreateHypothesis", "OK", 0, QApplication::UnicodeUTF8)); buttonApply->setText(QApplication::translate("CreateHypothesis", "Apply", 0, QApplication::UnicodeUTF8)); diff --git a/src/HOMARDGUI/CreateHypothesis.ui b/src/HOMARDGUI/CreateHypothesis.ui index 5d130fdc..a3937ca4 100644 --- a/src/HOMARDGUI/CreateHypothesis.ui +++ b/src/HOMARDGUI/CreateHypothesis.ui @@ -735,48 +735,133 @@ - - - - - - - - 9 - - - 6 - - - - - OK - - - - - - - Apply - - - - - - - Cancel - - - - - - - Help - - - - - + + + + Advanced options + + + + + + + Advanced options + + + + 9 + + + 6 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + 0 + 0 + + + + Minimal diameter + + + false + + + + + + + 99 + + + + + + + 5 + + + + + + + + 0 + 0 + 0 + 0 + + + + Maximal level + + + false + + + + + + + + + + + + + + 9 + + + 6 + + + + + OK + + + + + + + Apply + + + + + + + Cancel + + + + + + + Help + + + + + diff --git a/src/HOMARDGUI/MonCreateCase.cxx b/src/HOMARDGUI/MonCreateCase.cxx index 714ef467..477525d1 100644 --- a/src/HOMARDGUI/MonCreateCase.cxx +++ b/src/HOMARDGUI/MonCreateCase.cxx @@ -43,9 +43,7 @@ MonCreateCase::MonCreateCase(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var */ : Ui_CreateCase(), - _aCaseName(""),_aDirName(""), _ConfType(1), - _NivMax(-1), - _DiamMin(-1.) + _aCaseName(""),_aDirName(""), _ConfType(1) { _myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen); setupUi(this); @@ -56,7 +54,6 @@ MonCreateCase::MonCreateCase(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var GBBoundaryA->setVisible(0); GBBoundaryD->setVisible(0); GBTypeNoConf->setVisible(0); - GBAdvancedOptions->setVisible(0); adjustSize(); } @@ -88,8 +85,6 @@ void MonCreateCase::InitConnect() connect( PBBoundaryAnEdit, SIGNAL(pressed()), this, SLOT(PushBoundaryAnEdit()) ); connect( PBBoundaryAnHelp, SIGNAL(pressed()), this, SLOT(PushBoundaryAnHelp()) ); - connect( CBAdvanced, SIGNAL(stateChanged(int)), this, SLOT(SetAdvanced())); - connect( buttonOk, SIGNAL(pressed()), this, SLOT(PushOnOK())); connect( buttonApply, SIGNAL(pressed()), this, SLOT(PushOnApply())); connect( buttonCancel, SIGNAL(pressed()), this, SLOT(close())); @@ -278,16 +273,6 @@ bool MonCreateCase::PushOnApply() } } } -// Options avancees - if (CBAdvanced->isChecked()) - { -// Enregistrement du niveau maximal - _NivMax = spinBoxNivMax->value() ; - aCase->SetNivMax(_NivMax); -// Enregistrement du diametre minimal - _DiamMin = doubleSpinBoxDiamMin->value() ; - aCase->SetDiamMin(_DiamMin); - } HOMARD_UTILS::updateObjBrowser(); return true; @@ -514,15 +499,3 @@ void MonCreateCase::CaseNameChanged() PushFichier->show(); } } -// ------------------------------------------------------------------------ -void MonCreateCase::SetAdvanced() -// ------------------------------------------------------------------------ -{ - MESSAGE("Debut de SetAdvanced "); - if (CBAdvanced->isChecked()) { GBAdvancedOptions->setVisible(1); } - else - { GBAdvancedOptions->setVisible(0); - _NivMax = -1 ; - _DiamMin = -1. ; } - adjustSize(); -} diff --git a/src/HOMARDGUI/MonCreateCase.h b/src/HOMARDGUI/MonCreateCase.h index b1459141..cb4c62d4 100644 --- a/src/HOMARDGUI/MonCreateCase.h +++ b/src/HOMARDGUI/MonCreateCase.h @@ -46,9 +46,6 @@ protected : QString _aDirName; int _ConfType; - int _NivMax; - double _DiamMin; - HOMARD::HOMARD_Cas_var aCase ; HOMARD::HOMARD_Gen_var _myHomardGen; @@ -76,8 +73,6 @@ public slots: virtual void PushBoundaryAnEdit(); virtual void PushBoundaryAnHelp(); - virtual void SetAdvanced(); - virtual void PushOnOK(); virtual bool PushOnApply(); virtual void PushOnHelp(); diff --git a/src/HOMARDGUI/MonCreateHypothesis.cxx b/src/HOMARDGUI/MonCreateHypothesis.cxx index bf5e275b..e425e4a6 100644 --- a/src/HOMARDGUI/MonCreateHypothesis.cxx +++ b/src/HOMARDGUI/MonCreateHypothesis.cxx @@ -48,7 +48,9 @@ MonCreateHypothesis::MonCreateHypothesis(MonCreateIteration* parent, bool modal, _aTypeAdap(-2), _aTypeRaff(1), _aTypeDera(0), _TypeThR(3), _ThreshR(0), _TypeThC(0), _ThreshC(0), - _UsField(0), _UsCmpI(0), _TypeFieldInterp(0) + _UsField(0), _UsCmpI(0), _TypeFieldInterp(0), + _NivMax(-1), + _DiamMin(-1.) { MESSAGE("Constructeur") ; _myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen); @@ -66,6 +68,7 @@ MonCreateHypothesis::MonCreateHypothesis(MonCreateIteration* parent, bool modal, SetUniforme(); } SetFieldNo(); + GBAdvancedOptions->setVisible(0); } // ------------------------------------------------------------------------ @@ -83,6 +86,7 @@ void MonCreateHypothesis::InitConnect() connect( RBZone, SIGNAL(clicked()), this, SLOT(SetZone())); connect( RBUniRaff, SIGNAL(clicked()), this, SLOT(SetUniRaff())); connect( RBUniDera, SIGNAL(clicked()), this, SLOT(SetUniDera())); + connect( CBFieldName, SIGNAL(activated(int)), this, SLOT( SetFieldName())); connect( RBRPE, SIGNAL(clicked()), this, SLOT(SetRPE())); connect( RBRRel, SIGNAL(clicked()), this, SLOT(SetRRel())); @@ -99,9 +103,13 @@ void MonCreateHypothesis::InitConnect() connect( PBZoneEdit, SIGNAL(pressed()), this, SLOT(PushZoneEdit()) ); connect( PBZoneDelete, SIGNAL(pressed()), this, SLOT(PushZoneDelete()) ); connect( CBGroupe, SIGNAL(stateChanged(int)), this, SLOT(SetFiltrage())); + connect( RBFieldNo, SIGNAL(clicked()), this, SLOT(SetFieldNo())); connect( RBFieldAll, SIGNAL(clicked()), this, SLOT(SetFieldAll())); connect( RBFieldChosen,SIGNAL(clicked()), this, SLOT(SetFieldChosen())); + + connect( CBAdvanced, SIGNAL(stateChanged(int)), this, SLOT(SetAdvanced())); + connect( buttonOk, SIGNAL(pressed()), this, SLOT( PushOnOK())); connect( buttonApply, SIGNAL(pressed()), this, SLOT( PushOnApply())); connect( buttonCancel, SIGNAL(pressed()), this, SLOT(close())); @@ -153,6 +161,17 @@ bool MonCreateHypothesis::PushOnApply() AssocieLesGroupes(); AssocieFieldInterp(); +// Options avancees + if (CBAdvanced->isChecked()) + { +// Enregistrement du niveau maximal + _NivMax = spinBoxNivMax->value() ; + _aHypothesis->SetNivMax(_NivMax); +// Enregistrement du diametre minimal + _DiamMin = doubleSpinBoxDiamMin->value() ; + _aHypothesis->SetDiamMin(_DiamMin); + } + HOMARD_UTILS::updateObjBrowser(); return true; } @@ -739,3 +758,15 @@ void MonCreateHypothesis::SetFieldChosen() _TypeFieldInterp = 2 ; adjustSize(); } +// ------------------------------------------------------------------------ +void MonCreateHypothesis::SetAdvanced() +// ------------------------------------------------------------------------ +{ + MESSAGE("Debut de SetAdvanced "); + if (CBAdvanced->isChecked()) { GBAdvancedOptions->setVisible(1); } + else + { GBAdvancedOptions->setVisible(0); + _NivMax = -1 ; + _DiamMin = -1. ; } + adjustSize(); +} diff --git a/src/HOMARDGUI/MonCreateHypothesis.h b/src/HOMARDGUI/MonCreateHypothesis.h index d554f427..a0599265 100644 --- a/src/HOMARDGUI/MonCreateHypothesis.h +++ b/src/HOMARDGUI/MonCreateHypothesis.h @@ -68,6 +68,9 @@ protected : int _UsCmpI; int _TypeFieldInterp; + int _NivMax; + double _DiamMin; + HOMARD::HOMARD_Gen_var _myHomardGen; HOMARD::HOMARD_Hypothesis_var _aHypothesis; @@ -116,6 +119,9 @@ public slots: virtual void SetFieldNo(); virtual void SetFieldAll(); virtual void SetFieldChosen(); + + virtual void SetAdvanced(); + virtual void PushOnOK(); virtual bool PushOnApply(); virtual void PushOnHelp(); diff --git a/src/HOMARDGUI/MonEditCase.cxx b/src/HOMARDGUI/MonEditCase.cxx index 5f1ecaff..7a1b3963 100644 --- a/src/HOMARDGUI/MonEditCase.cxx +++ b/src/HOMARDGUI/MonEditCase.cxx @@ -179,19 +179,6 @@ void MonEditCase::InitValEdit() PBBoundaryDiNew->setVisible(0); PBBoundaryDiHelp->setVisible(0); } } -// Les options avancees (non modifiables) - CBAdvanced->setVisible(0) ; - int NivMax = aCase->GetNivMax(); - double DiamMin = aCase->GetDiamMin(); - if ( NivMax > 0 ) - { GBAdvancedOptions->setVisible(1); - spinBoxNivMax->setValue(NivMax); - spinBoxNivMax->setDisabled(true); - doubleSpinBoxDiamMin->setValue(DiamMin); - doubleSpinBoxDiamMin->setDisabled(true); - } - else - { GBAdvancedOptions->setVisible(0); } // adjustSize(); } diff --git a/src/HOMARDGUI/MonEditHypothesis.cxx b/src/HOMARDGUI/MonEditHypothesis.cxx index bc2f9651..b01ddbe1 100644 --- a/src/HOMARDGUI/MonEditHypothesis.cxx +++ b/src/HOMARDGUI/MonEditHypothesis.cxx @@ -66,39 +66,53 @@ void MonEditHypothesis::InitGroupes() void MonEditHypothesis::InitValEdit() // ------------------------------ { - MESSAGE("Debut de InitValEdit"); - LEHypothesisName->setText(_aHypothesisName); - LEHypothesisName->setReadOnly(true); - HOMARD::listeTypes_var ListTypes (_aHypothesis->GetAdapRefinUnRef()); - ASSERT( ListTypes->length()==3) ; - _aTypeAdap = ListTypes[0]; - _aTypeRaff = ListTypes[1]; - _aTypeDera = ListTypes[2]; + MESSAGE("Debut de InitValEdit"); + LEHypothesisName->setText(_aHypothesisName); + LEHypothesisName->setReadOnly(true); + HOMARD::listeTypes_var ListTypes (_aHypothesis->GetAdapRefinUnRef()); + ASSERT( ListTypes->length()==3) ; + _aTypeAdap = ListTypes[0]; + _aTypeRaff = ListTypes[1]; + _aTypeDera = ListTypes[2]; - if (_aTypeAdap == -1) InitAdaptUniforme(); - if (_aTypeAdap == 0) InitAdaptZone(); - if (_aTypeAdap == 1) InitAdaptChamps(); + if (_aTypeAdap == -1) InitAdaptUniforme(); + if (_aTypeAdap == 0) InitAdaptZone(); + if (_aTypeAdap == 1) InitAdaptChamps(); - RBUniDera->setDisabled(true); - RBUniRaff->setDisabled(true); + RBUniDera->setDisabled(true); + RBUniRaff->setDisabled(true); - InitFieldInterp(); + InitFieldInterp(); - if (_aTypeAdap == 1 or _TypeFieldInterp >= 1 ) - { - if (_aFieldFile == QString("")) { GBFieldFile->setVisible(0); } - else - { - GBFieldFile->setVisible(1); - LEFieldFile->setText(_aFieldFile); - LEFieldFile->setReadOnly(1); - } - } - else - { - GBFieldFile->setVisible(0); - } - adjustSize(); + if (_aTypeAdap == 1 or _TypeFieldInterp >= 1 ) + { + if (_aFieldFile == QString("")) { GBFieldFile->setVisible(0); } + else + { + GBFieldFile->setVisible(1); + LEFieldFile->setText(_aFieldFile); + LEFieldFile->setReadOnly(1); + } + } + else + { + GBFieldFile->setVisible(0); + } +// Les options avancees (non modifiables) + CBAdvanced->setVisible(0) ; + int NivMax = _aHypothesis->GetNivMax(); + double DiamMin = _aHypothesis->GetDiamMin(); + if ( NivMax > 0 ) + { GBAdvancedOptions->setVisible(1); + spinBoxNivMax->setValue(NivMax); + spinBoxNivMax->setDisabled(true); + doubleSpinBoxDiamMin->setValue(DiamMin); + doubleSpinBoxDiamMin->setDisabled(true); + } + else + { GBAdvancedOptions->setVisible(0); } +// + adjustSize(); } // ---------------------------------------- void MonEditHypothesis::InitAdaptUniforme() diff --git a/src/HOMARD_I/HOMARD_Cas_i.cxx b/src/HOMARD_I/HOMARD_Cas_i.cxx index 281318e9..a5077680 100755 --- a/src/HOMARD_I/HOMARD_Cas_i.cxx +++ b/src/HOMARD_I/HOMARD_Cas_i.cxx @@ -165,7 +165,7 @@ void HOMARD_Cas_i::SetBoundingBox( const HOMARD::extrema& LesExtrema ) { VExtrema[i] = LesExtrema[i]; } - + myHomardCas->SetBoundingBox( VExtrema ); } //============================================================================= @@ -225,30 +225,6 @@ HOMARD::ListBoundaryGroupType* HOMARD_Cas_i::GetBoundaryGroup() } return aResult._retn(); } -//============================================================================= -void HOMARD_Cas_i::SetNivMax( CORBA::Long NivMax ) -{ - ASSERT( myHomardCas ); - myHomardCas->SetNivMax( NivMax ); -} -//============================================================================= -CORBA::Long HOMARD_Cas_i::GetNivMax() -{ - ASSERT( myHomardCas ); - return myHomardCas->GetNivMax(); -} -//============================================================================= -void HOMARD_Cas_i::SetDiamMin( CORBA::Double DiamMin ) -{ - ASSERT( myHomardCas ); - myHomardCas->SetDiamMin( DiamMin ); -} -//============================================================================= -CORBA::Double HOMARD_Cas_i::GetDiamMin() -{ - ASSERT( myHomardCas ); - return myHomardCas->GetDiamMin(); -} //============================================================================= std::string HOMARD_Cas_i::Dump() const diff --git a/src/HOMARD_I/HOMARD_Cas_i.hxx b/src/HOMARD_I/HOMARD_Cas_i.hxx index 93a59b2f..cf63e55d 100644 --- a/src/HOMARD_I/HOMARD_Cas_i.hxx +++ b/src/HOMARD_I/HOMARD_Cas_i.hxx @@ -52,12 +52,6 @@ public: void SetConfType( CORBA::Long ConfType ); CORBA::Long GetConfType(); - void SetNivMax( CORBA::Long NivMax ); - CORBA::Long GetNivMax(); - - void SetDiamMin( CORBA::Double DiamMin ); - CORBA::Double GetDiamMin(); - void AddIteration( const char* NomIteration ); char* GetIter0Name(); diff --git a/src/HOMARD_I/HOMARD_Gen_i.cxx b/src/HOMARD_I/HOMARD_Gen_i.cxx index 7fc1bff9..bf9fb00f 100755 --- a/src/HOMARD_I/HOMARD_Gen_i.cxx +++ b/src/HOMARD_I/HOMARD_Gen_i.cxx @@ -557,10 +557,6 @@ HOMARD::HOMARD_Cas_ptr HOMARD_Gen_i::CreateCase(const char* nomCas, const char* aSeqGroupe[i++]=(*it).c_str(); myCase->SetGroups(aSeqGroupe); -// Valeurs par defaut des filtrages - myCase->SetNivMax(-1); - myCase->SetDiamMin(-1.0); - // Recherche d'un nom pour l'iteration 0. Par defaut, on prend le nom // du maillage du cas. Si ce nom existe deja, on incremente avec 0, 1, 2, etc. int monNum=0; @@ -667,6 +663,10 @@ HOMARD::HOMARD_Hypothesis_ptr HOMARD_Gen_i::CreateHypothesis(const char* nomHypo SALOMEDS::SObject_var aSO; PublishInStudy(myCurrentStudy, aSO, myHypothesis, nomHypothesis); +// Valeurs par defaut des filtrages + myHypothesis->SetNivMax(-1); + myHypothesis->SetDiamMin(-1.0); + return HOMARD::HOMARD_Hypothesis::_duplicate(myHypothesis); } @@ -1056,7 +1056,6 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM std::string siterp1 = saux1.str() ; if (NumeIter < 10) { siterp1 = "0" + siterp1 ; } - // A.3. Hypothese associee // B. Les repertoires // B.1. Le repertoire du cas const char* nomDir = myCase->GetDirName(); @@ -1428,11 +1427,11 @@ CORBA::Boolean HOMARD_Gen_i::Compute(const char* nomIteration, CORBA::Long etatM } } // E.7. Ajout des options avancees - int NivMax = myCase->GetNivMax(); + int NivMax = myHypo->GetNivMax(); MESSAGE ( ". NivMax = " << NivMax ); if ( NivMax > 0 ) { - double DiamMin = myCase->GetDiamMin(); + double DiamMin = myHypo->GetDiamMin(); MESSAGE ( ". DiamMin = " << DiamMin ); myDriver->TexteAdvanced(NivMax, DiamMin); } diff --git a/src/HOMARD_I/HOMARD_Hypothesis_i.cxx b/src/HOMARD_I/HOMARD_Hypothesis_i.cxx index 0b743de6..ca3dc2c2 100644 --- a/src/HOMARD_I/HOMARD_Hypothesis_i.cxx +++ b/src/HOMARD_I/HOMARD_Hypothesis_i.cxx @@ -359,6 +359,30 @@ HOMARD::listFieldInterpHypo* HOMARD_Hypothesis_i::GetListFieldInterp() } return aResult._retn(); } +//============================================================================= +void HOMARD_Hypothesis_i::SetNivMax( CORBA::Long NivMax ) +{ + ASSERT( myHomardHypothesis ); + myHomardHypothesis->SetNivMax( NivMax ); +} +//============================================================================= +CORBA::Long HOMARD_Hypothesis_i::GetNivMax() +{ + ASSERT( myHomardHypothesis ); + return myHomardHypothesis->GetNivMax(); +} +//============================================================================= +void HOMARD_Hypothesis_i::SetDiamMin( CORBA::Double DiamMin ) +{ + ASSERT( myHomardHypothesis ); + myHomardHypothesis->SetDiamMin( DiamMin ); +} +//============================================================================= +CORBA::Double HOMARD_Hypothesis_i::GetDiamMin() +{ + ASSERT( myHomardHypothesis ); + return myHomardHypothesis->GetDiamMin(); +} //============================================================================= std::string HOMARD_Hypothesis_i::Dump() const diff --git a/src/HOMARD_I/HOMARD_Hypothesis_i.hxx b/src/HOMARD_I/HOMARD_Hypothesis_i.hxx index 57a6ecac..69d45844 100644 --- a/src/HOMARD_I/HOMARD_Hypothesis_i.hxx +++ b/src/HOMARD_I/HOMARD_Hypothesis_i.hxx @@ -85,6 +85,11 @@ public: void SupprFieldInterp(); HOMARD::listFieldInterpHypo* GetListFieldInterp(); + void SetNivMax( CORBA::Long NivMax ); + CORBA::Long GetNivMax(); + + void SetDiamMin( CORBA::Double DiamMin ); + CORBA::Double GetDiamMin(); std::string Dump() const; bool Restore( const std::string& stream );