From: prascle Date: Tue, 22 Mar 2011 16:35:11 +0000 (+0000) Subject: PR: synchro from cvs base EDF tag V6_main_20110322 X-Git-Tag: V6_3_0a1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2e13824c952ed9fccfc420822f983bc88f8a5b2d;p=modules%2Fhomard.git PR: synchro from cvs base EDF tag V6_main_20110322 --- diff --git a/doc/images/create_hypothese_3.png b/doc/images/create_hypothese_3.png deleted file mode 100644 index d8b6ecd6..00000000 Binary files a/doc/images/create_hypothese_3.png and /dev/null differ diff --git a/doc/images/create_hypothese_4.png b/doc/images/create_hypothese_4.png deleted file mode 100644 index 52b0a3c1..00000000 Binary files a/doc/images/create_hypothese_4.png and /dev/null differ diff --git a/doc/images/create_hypothese_5.png b/doc/images/create_hypothese_5.png deleted file mode 100644 index 76879ad9..00000000 Binary files a/doc/images/create_hypothese_5.png and /dev/null differ diff --git a/doc/images/create_hypothese_6.png b/doc/images/create_hypothese_6.png deleted file mode 100644 index bed6fce7..00000000 Binary files a/doc/images/create_hypothese_6.png and /dev/null differ diff --git a/doc/images/create_hypothese_7.png b/doc/images/create_hypothese_7.png deleted file mode 100644 index cdcb199e..00000000 Binary files a/doc/images/create_hypothese_7.png and /dev/null differ diff --git a/doc/images/create_hypothese_8.png b/doc/images/create_hypothese_8.png deleted file mode 100644 index c1ef185e..00000000 Binary files a/doc/images/create_hypothese_8.png and /dev/null differ diff --git a/doc/tutorial_3.py b/doc/tutorial_3.py deleted file mode 100644 index 264d5905..00000000 --- a/doc/tutorial_3.py +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env python -# -*- coding: iso-8859-1 -*- -""" -Exemple de couplage HOMARD-Salome -Copyright EDF-R&D 1996, 2010 -""" -__revision__ = "V1.0" -# -import salome -salome.salome_init() -import HOMARD -# -homard = salome.lcc.FindOrLoadComponent("FactoryServer", "HOMARD") -study_main = salome.myStudyManager.NewStudy("HOMARD") -homard.SetCurrentStudy(salome.myStudy) -# -repcas = "/tmp" -# -# Creation of the zones -# ===================== -# Box "Zone_0" -Zone_0 = homard.CreateZone('Zone_0', 2) -Zone_0.SetBox(-0.1, 1.1, -0.1, 1.1, 0.9, 1.1) - -# Sphere "Zone_1" -Zone_1 = homard.CreateZone('Zone_1', 4) -Zone_1.SetSphere(0., 0., 0., 1.05) -# -# Hypothesis "Hypo_0" -# =================== -Hypo_0 = homard.CreateHypothesis('Hypo_0') -Hypo_0.SetAdapRefinUnRef(0, 1, 0) -homard.AssociateHypoZone('Zone_1', 'Hypo_0') -homard.AssociateHypoZone('Zone_0', 'Hypo_0') -# -# Case "Case_0" -# ============= -Case_0 = homard.CreateCase('Case_0', 'MZERO', repcas+'/tutorial_2.00.med') -Case_0.SetDirName(repcas) -# -# Iteration "Iter_0" -# ================== -Iter_0 = homard.CreateIteration('Iter_0', Case_0.GetIter0Name()) -Iter_0.SetMeshName('MUN') -Iter_0.SetMeshFile(repcas+'/maill.01.med') -homard.AssociateIterHypo('Iter_0', 'Hypo_0') -codret = homard.Compute('Iter_0', 1) - -if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(1) diff --git a/src/HOMARD/HomardDriver.cxx b/src/HOMARD/HomardDriver.cxx index d1e1ed3b..da930133 100644 --- a/src/HOMARD/HomardDriver.cxx +++ b/src/HOMARD/HomardDriver.cxx @@ -26,6 +26,7 @@ HomardDriver::HomardDriver(const std::string siter, const std::string siterp1): else executable = std::string(execchar); _HOMARD_Exec = dir + "/" + executable ; + MESSAGE("Dans HomardDriver::HomardDriver, _HOMARD_Exec ="<<_HOMARD_Exec); // _siter = siter ; _siterp1 = siterp1 ; @@ -40,7 +41,8 @@ HomardDriver::~HomardDriver() ////============================================================================= void HomardDriver::TexteInit( const std::string DirCompute, const std::string DirComputePa, const std::string MessFile ) { - + MESSAGE("Dans HomardDriver::TexteInit, MessFile ="< 0 ) _Texte += "CCGroFro " + GroupName + "\n" ; // -// std::cerr << "A la fin de TexteBoundaryOption _Texte ="<<_Texte << std::endl; } ////============================================================================= void HomardDriver::TexteBoundaryAn( int NumeBoundary, int BoundaryType, const std::string Group, double x0, double x1, double x2, double x3, double x4, double x5, double x6 ) { - MESSAGE("Dans TexteBoundaryAn de HomardDriver NumeBoundary = "<setWindowTitle(QApplication::translate("CreateBoundaryAn", "Create an analytical boundary", 0, QApplication::UnicodeUTF8)); gBCylindre->setTitle(QApplication::translate("CreateBoundaryAn", "Coordinates of the cylindre", 0, QApplication::UnicodeUTF8)); TLXcent->setText(QApplication::translate("CreateBoundaryAn", "X centre", 0, QApplication::UnicodeUTF8)); TLradius->setText(QApplication::translate("CreateBoundaryAn", "Radius", 0, QApplication::UnicodeUTF8)); @@ -419,10 +419,10 @@ public: TLYaxis->setText(QApplication::translate("CreateBoundaryAn", "Y axis", 0, QApplication::UnicodeUTF8)); TLZaxis->setText(QApplication::translate("CreateBoundaryAn", "Z axis", 0, QApplication::UnicodeUTF8)); GBButtons->setTitle(QString()); - buttonOk->setText(QApplication::translate("CreateBoundaryAn", "&Ok", 0, QApplication::UnicodeUTF8)); - buttonApply->setText(QApplication::translate("CreateBoundaryAn", "&Apply", 0, QApplication::UnicodeUTF8)); - buttonCancel->setText(QApplication::translate("CreateBoundaryAn", "&Cancel", 0, QApplication::UnicodeUTF8)); - buttonHelp->setText(QApplication::translate("CreateBoundaryAn", "&Help", 0, QApplication::UnicodeUTF8)); + buttonOk->setText(QApplication::translate("CreateBoundaryAn", "OK", 0, QApplication::UnicodeUTF8)); + buttonApply->setText(QApplication::translate("CreateBoundaryAn", "Apply", 0, QApplication::UnicodeUTF8)); + buttonCancel->setText(QApplication::translate("CreateBoundaryAn", "Cancel", 0, QApplication::UnicodeUTF8)); + buttonHelp->setText(QApplication::translate("CreateBoundaryAn", "Help", 0, QApplication::UnicodeUTF8)); gBSphere->setTitle(QApplication::translate("CreateBoundaryAn", "Coordinates of the sphere", 0, QApplication::UnicodeUTF8)); TLRayon->setText(QApplication::translate("CreateBoundaryAn", "Radius", 0, QApplication::UnicodeUTF8)); TLZcentre->setText(QApplication::translate("CreateBoundaryAn", "Z centre", 0, QApplication::UnicodeUTF8)); diff --git a/src/HOMARDGUI/CreateBoundaryAn.ui b/src/HOMARDGUI/CreateBoundaryAn.ui index e5a1cc80..e7e67a70 100644 --- a/src/HOMARDGUI/CreateBoundaryAn.ui +++ b/src/HOMARDGUI/CreateBoundaryAn.ui @@ -10,7 +10,7 @@ - Create Analytical Boundary + Create an analytical boundary true @@ -303,28 +303,28 @@ - &Ok + OK - &Apply + Apply - &Cancel + Cancel - &Help + Help diff --git a/src/HOMARDGUI/CreateBoundaryDi.h b/src/HOMARDGUI/CreateBoundaryDi.h index 816d59fc..2b99f0f7 100644 --- a/src/HOMARDGUI/CreateBoundaryDi.h +++ b/src/HOMARDGUI/CreateBoundaryDi.h @@ -1,8 +1,8 @@ /******************************************************************************** ** Form generated from reading ui file 'CreateBoundaryDi.ui' ** -** Created: Thu Nov 18 15:18:52 2010 -** by: Qt User Interface Compiler version 4.4.3 +** Created: Thu Feb 24 09:10:36 2011 +** by: Qt User Interface Compiler version 4.2.1 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! ********************************************************************************/ @@ -22,8 +22,6 @@ #include #include -QT_BEGIN_NAMESPACE - class Ui_CreateBoundaryDi { public: @@ -35,7 +33,7 @@ public: QLineEdit *LEFileName; QCheckBox *CBGroupe; QGroupBox *GBButtons; - QGridLayout *gridLayout_5; + QGridLayout *gridLayout1; QPushButton *buttonOk; QPushButton *buttonApply; QPushButton *buttonCancel; @@ -43,17 +41,17 @@ public: void setupUi(QDialog *CreateBoundaryDi) { - if (CreateBoundaryDi->objectName().isEmpty()) - CreateBoundaryDi->setObjectName(QString::fromUtf8("CreateBoundaryDi")); - CreateBoundaryDi->resize(566, 169); - QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + CreateBoundaryDi->setObjectName(QString::fromUtf8("CreateBoundaryDi")); + QSizePolicy sizePolicy(static_cast(0), static_cast(0)); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(CreateBoundaryDi->sizePolicy().hasHeightForWidth()); CreateBoundaryDi->setSizePolicy(sizePolicy); - CreateBoundaryDi->setAutoFillBackground(false); + CreateBoundaryDi->setAutoFillBackground(true); CreateBoundaryDi->setSizeGripEnabled(true); gridLayout = new QGridLayout(CreateBoundaryDi); + gridLayout->setSpacing(6); + gridLayout->setMargin(9); gridLayout->setObjectName(QString::fromUtf8("gridLayout")); Name = new QLabel(CreateBoundaryDi); Name->setObjectName(QString::fromUtf8("Name")); @@ -90,27 +88,29 @@ public: GBButtons = new QGroupBox(CreateBoundaryDi); GBButtons->setObjectName(QString::fromUtf8("GBButtons")); - gridLayout_5 = new QGridLayout(GBButtons); - gridLayout_5->setObjectName(QString::fromUtf8("gridLayout_5")); + gridLayout1 = new QGridLayout(GBButtons); + gridLayout1->setSpacing(6); + gridLayout1->setMargin(9); + gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); buttonOk = new QPushButton(GBButtons); buttonOk->setObjectName(QString::fromUtf8("buttonOk")); - gridLayout_5->addWidget(buttonOk, 0, 0, 1, 1); + gridLayout1->addWidget(buttonOk, 0, 0, 1, 1); buttonApply = new QPushButton(GBButtons); buttonApply->setObjectName(QString::fromUtf8("buttonApply")); - gridLayout_5->addWidget(buttonApply, 0, 1, 1, 1); + gridLayout1->addWidget(buttonApply, 0, 1, 1, 1); buttonCancel = new QPushButton(GBButtons); buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); - gridLayout_5->addWidget(buttonCancel, 0, 2, 1, 1); + gridLayout1->addWidget(buttonCancel, 0, 2, 1, 1); buttonHelp = new QPushButton(GBButtons); buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); - gridLayout_5->addWidget(buttonHelp, 0, 3, 1, 1); + gridLayout1->addWidget(buttonHelp, 0, 3, 1, 1); gridLayout->addWidget(GBButtons, 3, 0, 1, 3); @@ -118,21 +118,26 @@ public: retranslateUi(CreateBoundaryDi); + QSize size(566, 169); + size = size.expandedTo(CreateBoundaryDi->minimumSizeHint()); + CreateBoundaryDi->resize(size); + + QMetaObject::connectSlotsByName(CreateBoundaryDi); } // setupUi void retranslateUi(QDialog *CreateBoundaryDi) { - CreateBoundaryDi->setWindowTitle(QApplication::translate("CreateBoundaryDi", "Create Discrete Boundary", 0, QApplication::UnicodeUTF8)); + CreateBoundaryDi->setWindowTitle(QApplication::translate("CreateBoundaryDi", "Create a discrete boundary", 0, QApplication::UnicodeUTF8)); Name->setText(QApplication::translate("CreateBoundaryDi", "Name", 0, QApplication::UnicodeUTF8)); Mesh->setText(QApplication::translate("CreateBoundaryDi", "Mesh", 0, QApplication::UnicodeUTF8)); PushFichier->setText(QString()); CBGroupe->setText(QApplication::translate("CreateBoundaryDi", "Filtering with groups", 0, QApplication::UnicodeUTF8)); GBButtons->setTitle(QString()); - buttonOk->setText(QApplication::translate("CreateBoundaryDi", "&Ok", 0, QApplication::UnicodeUTF8)); - buttonApply->setText(QApplication::translate("CreateBoundaryDi", "&Apply", 0, QApplication::UnicodeUTF8)); - buttonCancel->setText(QApplication::translate("CreateBoundaryDi", "&Cancel", 0, QApplication::UnicodeUTF8)); - buttonHelp->setText(QApplication::translate("CreateBoundaryDi", "&Help", 0, QApplication::UnicodeUTF8)); + buttonOk->setText(QApplication::translate("CreateBoundaryDi", "OK", 0, QApplication::UnicodeUTF8)); + buttonApply->setText(QApplication::translate("CreateBoundaryDi", "Apply", 0, QApplication::UnicodeUTF8)); + buttonCancel->setText(QApplication::translate("CreateBoundaryDi", "Cancel", 0, QApplication::UnicodeUTF8)); + buttonHelp->setText(QApplication::translate("CreateBoundaryDi", "Help", 0, QApplication::UnicodeUTF8)); Q_UNUSED(CreateBoundaryDi); } // retranslateUi @@ -142,6 +147,4 @@ namespace Ui { class CreateBoundaryDi: public Ui_CreateBoundaryDi {}; } // namespace Ui -QT_END_NAMESPACE - #endif // CREATEBOUNDARYDI_H diff --git a/src/HOMARDGUI/CreateBoundaryDi.ui b/src/HOMARDGUI/CreateBoundaryDi.ui index b97931d9..5df5cb02 100644 --- a/src/HOMARDGUI/CreateBoundaryDi.ui +++ b/src/HOMARDGUI/CreateBoundaryDi.ui @@ -10,21 +10,29 @@ - + + 0 + 0 0 0 - Create Discrete Boundary + Create a discrete boundary - false + true true - + + + 9 + + + 6 + @@ -81,32 +89,38 @@ - + + + 9 + + + 6 + - &Ok + OK - &Apply + Apply - &Cancel + Cancel - &Help + Help diff --git a/src/HOMARDGUI/CreateCase.h b/src/HOMARDGUI/CreateCase.h index 88f472cd..44a27c33 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 Jan 31 13:48:20 2011 +** Created: Tue Mar 15 09:25:40 2011 ** by: Qt User Interface Compiler version 4.2.1 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! @@ -364,13 +364,13 @@ public: void retranslateUi(QDialog *CreateCase) { - CreateCase->setWindowTitle(QApplication::translate("CreateCase", "Create Case", 0, QApplication::UnicodeUTF8)); + CreateCase->setWindowTitle(QApplication::translate("CreateCase", "Create a case", 0, QApplication::UnicodeUTF8)); GroupButtons->setTitle(QString()); - buttonOk->setText(QApplication::translate("CreateCase", "&Ok", 0, QApplication::UnicodeUTF8)); - buttonApply->setText(QApplication::translate("CreateCase", "&Apply", 0, QApplication::UnicodeUTF8)); - buttonCancel->setText(QApplication::translate("CreateCase", "&Cancel", 0, QApplication::UnicodeUTF8)); - buttonHelp->setText(QApplication::translate("CreateCase", "&Help", 0, QApplication::UnicodeUTF8)); - GBBoundaryA->setTitle(QApplication::translate("CreateCase", "Analytic Boundary", 0, QApplication::UnicodeUTF8)); + buttonOk->setText(QApplication::translate("CreateCase", "OK", 0, QApplication::UnicodeUTF8)); + buttonApply->setText(QApplication::translate("CreateCase", "Apply", 0, QApplication::UnicodeUTF8)); + buttonCancel->setText(QApplication::translate("CreateCase", "Cancel", 0, QApplication::UnicodeUTF8)); + buttonHelp->setText(QApplication::translate("CreateCase", "Help", 0, QApplication::UnicodeUTF8)); + GBBoundaryA->setTitle(QApplication::translate("CreateCase", "Analytical boundary", 0, QApplication::UnicodeUTF8)); PBBoundaryAnNew->setText(QApplication::translate("CreateCase", "New", 0, QApplication::UnicodeUTF8)); PBBoundaryAnHelp->setText(QApplication::translate("CreateCase", "Help", 0, QApplication::UnicodeUTF8)); if (TWBoundary->columnCount() < 1) @@ -384,16 +384,16 @@ public: PushDir->setText(QString()); Mesh_2->setText(QApplication::translate("CreateCase", "Mesh", 0, QApplication::UnicodeUTF8)); PushFichier->setText(QString()); - GBTypeConf->setTitle(QApplication::translate("CreateCase", "Conformity Type", 0, QApplication::UnicodeUTF8)); + GBTypeConf->setTitle(QApplication::translate("CreateCase", "Conformity type", 0, QApplication::UnicodeUTF8)); RBConforme->setText(QApplication::translate("CreateCase", "Conformal", 0, QApplication::UnicodeUTF8)); RBNonConforme->setText(QApplication::translate("CreateCase", "Non conformal", 0, QApplication::UnicodeUTF8)); - GBTypeNoConf->setTitle(QApplication::translate("CreateCase", "Non Conformal option", 0, QApplication::UnicodeUTF8)); + GBTypeNoConf->setTitle(QApplication::translate("CreateCase", "Non conformal option", 0, QApplication::UnicodeUTF8)); RB1NpM->setText(QApplication::translate("CreateCase", "1 hanging node per mesh", 0, QApplication::UnicodeUTF8)); RB1NpA->setText(QApplication::translate("CreateCase", "1 node per edge", 0, QApplication::UnicodeUTF8)); - RBQuelconque->setText(QApplication::translate("CreateCase", "free", 0, QApplication::UnicodeUTF8)); - CBBoundaryD->setText(QApplication::translate("CreateCase", "Discrete Boundary ", 0, QApplication::UnicodeUTF8)); - CBBoundaryA->setText(QApplication::translate("CreateCase", "Analytic Boundary ", 0, QApplication::UnicodeUTF8)); - GBBoundaryD->setTitle(QApplication::translate("CreateCase", "Discrete Boundary", 0, QApplication::UnicodeUTF8)); + RBQuelconque->setText(QApplication::translate("CreateCase", "Free", 0, QApplication::UnicodeUTF8)); + CBBoundaryD->setText(QApplication::translate("CreateCase", "Discrete boundary", 0, QApplication::UnicodeUTF8)); + CBBoundaryA->setText(QApplication::translate("CreateCase", "Analytical boundary", 0, QApplication::UnicodeUTF8)); + GBBoundaryD->setTitle(QApplication::translate("CreateCase", "Discrete boundary", 0, QApplication::UnicodeUTF8)); PBBoundaryDiHelp->setText(QApplication::translate("CreateCase", "Help", 0, QApplication::UnicodeUTF8)); PBBoundaryDiNew->setText(QApplication::translate("CreateCase", "New", 0, QApplication::UnicodeUTF8)); PBBoundaryDiEdit->setText(QApplication::translate("CreateCase", "Edit", 0, QApplication::UnicodeUTF8)); diff --git a/src/HOMARDGUI/CreateCase.ui b/src/HOMARDGUI/CreateCase.ui index 4bc2dd16..64884b5c 100644 --- a/src/HOMARDGUI/CreateCase.ui +++ b/src/HOMARDGUI/CreateCase.ui @@ -18,7 +18,7 @@ - Create Case + Create a case true @@ -45,7 +45,7 @@ - &Ok + OK false @@ -55,7 +55,7 @@ - &Apply + Apply false @@ -65,7 +65,7 @@ - &Cancel + Cancel false @@ -75,7 +75,7 @@ - &Help + Help false @@ -94,7 +94,7 @@ - Analytic Boundary + Analytical boundary @@ -280,7 +280,7 @@ - Conformity Type + Conformity type @@ -325,7 +325,7 @@ - Non Conformal option + Non conformal option @@ -351,7 +351,7 @@ - free + Free @@ -382,14 +382,14 @@ - Discrete Boundary + Discrete boundary - Analytic Boundary + Analytical boundary @@ -432,7 +432,7 @@ - Discrete Boundary + Discrete boundary diff --git a/src/HOMARDGUI/CreateHypothesis.h b/src/HOMARDGUI/CreateHypothesis.h index dc3fa573..edac2890 100644 --- a/src/HOMARDGUI/CreateHypothesis.h +++ b/src/HOMARDGUI/CreateHypothesis.h @@ -1,8 +1,8 @@ /******************************************************************************** ** Form generated from reading ui file 'CreateHypothesis.ui' ** -** Created: Thu Nov 18 15:21:42 2010 -** by: Qt User Interface Compiler version 4.4.3 +** Created: Tue Mar 15 11:33:40 2011 +** by: Qt User Interface Compiler version 4.2.1 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! ********************************************************************************/ @@ -29,43 +29,41 @@ #include #include -QT_BEGIN_NAMESPACE - class Ui_CreateHypothesis { public: - QGridLayout *gridLayout_10; + QGridLayout *gridLayout; QLabel *Name; QLineEdit *LEHypothesisName; QGroupBox *GBTypeAdaptation; - QHBoxLayout *horizontalLayout; + QHBoxLayout *hboxLayout; QRadioButton *RBUniforme; QRadioButton *RBChamp; QRadioButton *RBZone; QGroupBox *GBUniform; - QGridLayout *gridLayout_2; + QGridLayout *gridLayout1; QRadioButton *RBUniDera; QRadioButton *RBUniRaff; QGroupBox *GBFieldFile; - QGridLayout *gridLayout_9; + QGridLayout *gridLayout2; QLabel *FieldFile; QLineEdit *LEFieldFile; QGroupBox *GBFieldManagement; - QGridLayout *gridLayout_6; - QHBoxLayout *horizontalLayout_6; + QGridLayout *gridLayout3; + QHBoxLayout *hboxLayout1; QLabel *FieldName; QComboBox *CBFieldName; - QSpacerItem *horizontalSpacer_3; - QHBoxLayout *horizontalLayout_7; + QSpacerItem *spacerItem; + QHBoxLayout *hboxLayout2; QTableWidget *TWCMP; - QSpacerItem *horizontalSpacer_4; - QVBoxLayout *verticalLayout_3; - QHBoxLayout *horizontalLayout_3; + QSpacerItem *spacerItem1; + QVBoxLayout *vboxLayout; + QHBoxLayout *hboxLayout3; QRadioButton *RBL2; QRadioButton *RBInf; - QHBoxLayout *horizontalLayout_2; + QHBoxLayout *hboxLayout4; QGroupBox *GBRefinementThresholds; - QGridLayout *gridLayout; + QGridLayout *gridLayout4; QRadioButton *RBRPE; QDoubleSpinBox *SpinBox_RPE; QRadioButton *RBRRel; @@ -74,7 +72,7 @@ public: QDoubleSpinBox *SpinBox_RAbs; QRadioButton *RBRNo; QGroupBox *GBCoarseningThresholds; - QGridLayout *gridLayout_4; + QGridLayout *gridLayout5; QRadioButton *RBCPE; QDoubleSpinBox *SpinBox_CPE; QRadioButton *RBCRel; @@ -83,24 +81,24 @@ public: QDoubleSpinBox *SpinBox_CAbs; QRadioButton *RBCNo; QGroupBox *GBAreaManagement; - QGridLayout *gridLayout_3; + QGridLayout *gridLayout6; QTableWidget *TWZone; - QVBoxLayout *verticalLayout_2; - QVBoxLayout *verticalLayout; + QVBoxLayout *vboxLayout1; + QVBoxLayout *vboxLayout2; QPushButton *PBZoneNew; QPushButton *PBZoneEdit; QPushButton *PBZoneDelete; - QSpacerItem *verticalSpacer; + QSpacerItem *spacerItem2; QGroupBox *GBField; - QGridLayout *gridLayout_8; - QGridLayout *gridLayout_7; + QGridLayout *gridLayout7; + QGridLayout *gridLayout8; QRadioButton *RBFieldNo; QRadioButton *RBFieldAll; QRadioButton *RBFieldChosen; QTableWidget *TWField; QCheckBox *CBGroupe; QGroupBox *GBButtons; - QGridLayout *gridLayout_5; + QGridLayout *gridLayout9; QPushButton *buttonOk; QPushButton *buttonApply; QPushButton *buttonCancel; @@ -108,181 +106,201 @@ public: void setupUi(QDialog *CreateHypothesis) { - if (CreateHypothesis->objectName().isEmpty()) - CreateHypothesis->setObjectName(QString::fromUtf8("CreateHypothesis")); - CreateHypothesis->resize(717, 1005); - QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + CreateHypothesis->setObjectName(QString::fromUtf8("CreateHypothesis")); + QSizePolicy sizePolicy(static_cast(0), static_cast(0)); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(CreateHypothesis->sizePolicy().hasHeightForWidth()); CreateHypothesis->setSizePolicy(sizePolicy); - CreateHypothesis->setAutoFillBackground(false); + CreateHypothesis->setAutoFillBackground(true); CreateHypothesis->setSizeGripEnabled(true); - gridLayout_10 = new QGridLayout(CreateHypothesis); - gridLayout_10->setObjectName(QString::fromUtf8("gridLayout_10")); + gridLayout = new QGridLayout(CreateHypothesis); + gridLayout->setSpacing(6); + gridLayout->setMargin(9); + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); Name = new QLabel(CreateHypothesis); Name->setObjectName(QString::fromUtf8("Name")); - gridLayout_10->addWidget(Name, 0, 0, 1, 1); + gridLayout->addWidget(Name, 0, 0, 1, 1); LEHypothesisName = new QLineEdit(CreateHypothesis); LEHypothesisName->setObjectName(QString::fromUtf8("LEHypothesisName")); LEHypothesisName->setMinimumSize(QSize(382, 31)); LEHypothesisName->setMaxLength(32); - gridLayout_10->addWidget(LEHypothesisName, 0, 1, 1, 1); + gridLayout->addWidget(LEHypothesisName, 0, 1, 1, 1); GBTypeAdaptation = new QGroupBox(CreateHypothesis); GBTypeAdaptation->setObjectName(QString::fromUtf8("GBTypeAdaptation")); - horizontalLayout = new QHBoxLayout(GBTypeAdaptation); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + hboxLayout = new QHBoxLayout(GBTypeAdaptation); + hboxLayout->setSpacing(6); + hboxLayout->setMargin(9); + hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); RBUniforme = new QRadioButton(GBTypeAdaptation); RBUniforme->setObjectName(QString::fromUtf8("RBUniforme")); RBUniforme->setCheckable(true); - horizontalLayout->addWidget(RBUniforme); + hboxLayout->addWidget(RBUniforme); RBChamp = new QRadioButton(GBTypeAdaptation); RBChamp->setObjectName(QString::fromUtf8("RBChamp")); - horizontalLayout->addWidget(RBChamp); + hboxLayout->addWidget(RBChamp); RBZone = new QRadioButton(GBTypeAdaptation); RBZone->setObjectName(QString::fromUtf8("RBZone")); - horizontalLayout->addWidget(RBZone); + hboxLayout->addWidget(RBZone); - gridLayout_10->addWidget(GBTypeAdaptation, 1, 0, 1, 2); + gridLayout->addWidget(GBTypeAdaptation, 1, 0, 1, 2); GBUniform = new QGroupBox(CreateHypothesis); GBUniform->setObjectName(QString::fromUtf8("GBUniform")); - gridLayout_2 = new QGridLayout(GBUniform); - gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); + gridLayout1 = new QGridLayout(GBUniform); + gridLayout1->setSpacing(6); + gridLayout1->setMargin(9); + gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); RBUniDera = new QRadioButton(GBUniform); RBUniDera->setObjectName(QString::fromUtf8("RBUniDera")); - gridLayout_2->addWidget(RBUniDera, 0, 1, 1, 1); + gridLayout1->addWidget(RBUniDera, 0, 1, 1, 1); RBUniRaff = new QRadioButton(GBUniform); RBUniRaff->setObjectName(QString::fromUtf8("RBUniRaff")); RBUniRaff->setChecked(true); - gridLayout_2->addWidget(RBUniRaff, 0, 0, 1, 1); + gridLayout1->addWidget(RBUniRaff, 0, 0, 1, 1); - gridLayout_10->addWidget(GBUniform, 2, 0, 1, 2); + gridLayout->addWidget(GBUniform, 2, 0, 1, 2); GBFieldFile = new QGroupBox(CreateHypothesis); GBFieldFile->setObjectName(QString::fromUtf8("GBFieldFile")); - gridLayout_9 = new QGridLayout(GBFieldFile); - gridLayout_9->setObjectName(QString::fromUtf8("gridLayout_9")); + gridLayout2 = new QGridLayout(GBFieldFile); + gridLayout2->setSpacing(6); + gridLayout2->setMargin(9); + gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); FieldFile = new QLabel(GBFieldFile); FieldFile->setObjectName(QString::fromUtf8("FieldFile")); - gridLayout_9->addWidget(FieldFile, 0, 0, 1, 1); + gridLayout2->addWidget(FieldFile, 0, 0, 1, 1); LEFieldFile = new QLineEdit(GBFieldFile); LEFieldFile->setObjectName(QString::fromUtf8("LEFieldFile")); LEFieldFile->setMinimumSize(QSize(282, 31)); - gridLayout_9->addWidget(LEFieldFile, 0, 1, 1, 1); + gridLayout2->addWidget(LEFieldFile, 0, 1, 1, 1); - gridLayout_10->addWidget(GBFieldFile, 3, 0, 1, 2); + gridLayout->addWidget(GBFieldFile, 3, 0, 1, 2); GBFieldManagement = new QGroupBox(CreateHypothesis); GBFieldManagement->setObjectName(QString::fromUtf8("GBFieldManagement")); - sizePolicy.setHeightForWidth(GBFieldManagement->sizePolicy().hasHeightForWidth()); - GBFieldManagement->setSizePolicy(sizePolicy); - gridLayout_6 = new QGridLayout(GBFieldManagement); - gridLayout_6->setObjectName(QString::fromUtf8("gridLayout_6")); - horizontalLayout_6 = new QHBoxLayout(); - horizontalLayout_6->setObjectName(QString::fromUtf8("horizontalLayout_6")); + QSizePolicy sizePolicy1(static_cast(0), static_cast(0)); + sizePolicy1.setHorizontalStretch(0); + sizePolicy1.setVerticalStretch(0); + sizePolicy1.setHeightForWidth(GBFieldManagement->sizePolicy().hasHeightForWidth()); + GBFieldManagement->setSizePolicy(sizePolicy1); + gridLayout3 = new QGridLayout(GBFieldManagement); + gridLayout3->setSpacing(6); + gridLayout3->setMargin(9); + gridLayout3->setObjectName(QString::fromUtf8("gridLayout3")); + hboxLayout1 = new QHBoxLayout(); + hboxLayout1->setSpacing(6); + hboxLayout1->setMargin(0); + hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); FieldName = new QLabel(GBFieldManagement); FieldName->setObjectName(QString::fromUtf8("FieldName")); - horizontalLayout_6->addWidget(FieldName); + hboxLayout1->addWidget(FieldName); CBFieldName = new QComboBox(GBFieldManagement); CBFieldName->setObjectName(QString::fromUtf8("CBFieldName")); - QSizePolicy sizePolicy1(QSizePolicy::Expanding, QSizePolicy::Fixed); - sizePolicy1.setHorizontalStretch(0); - sizePolicy1.setVerticalStretch(0); - sizePolicy1.setHeightForWidth(CBFieldName->sizePolicy().hasHeightForWidth()); - CBFieldName->setSizePolicy(sizePolicy1); + QSizePolicy sizePolicy2(static_cast(0), static_cast(0)); + sizePolicy2.setHorizontalStretch(0); + sizePolicy2.setVerticalStretch(0); + sizePolicy2.setHeightForWidth(CBFieldName->sizePolicy().hasHeightForWidth()); + CBFieldName->setSizePolicy(sizePolicy2); CBFieldName->setEditable(false); CBFieldName->setSizeAdjustPolicy(QComboBox::AdjustToContents); - horizontalLayout_6->addWidget(CBFieldName); + hboxLayout1->addWidget(CBFieldName); - horizontalSpacer_3 = new QSpacerItem(48, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem = new QSpacerItem(48, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - horizontalLayout_6->addItem(horizontalSpacer_3); + hboxLayout1->addItem(spacerItem); - gridLayout_6->addLayout(horizontalLayout_6, 0, 0, 1, 1); + gridLayout3->addLayout(hboxLayout1, 0, 0, 1, 1); - horizontalLayout_7 = new QHBoxLayout(); - horizontalLayout_7->setObjectName(QString::fromUtf8("horizontalLayout_7")); + hboxLayout2 = new QHBoxLayout(); + hboxLayout2->setSpacing(6); + hboxLayout2->setMargin(0); + hboxLayout2->setObjectName(QString::fromUtf8("hboxLayout2")); TWCMP = new QTableWidget(GBFieldManagement); - if (TWCMP->columnCount() < 2) - TWCMP->setColumnCount(2); - QTableWidgetItem *__colItem = new QTableWidgetItem(); - TWCMP->setHorizontalHeaderItem(0, __colItem); - QTableWidgetItem *__colItem1 = new QTableWidgetItem(); - TWCMP->setHorizontalHeaderItem(1, __colItem1); TWCMP->setObjectName(QString::fromUtf8("TWCMP")); - TWCMP->setEditTriggers(QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked); + TWCMP->setEditTriggers(QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::NoEditTriggers|QAbstractItemView::SelectedClicked); TWCMP->setShowGrid(true); TWCMP->setRowCount(0); TWCMP->setColumnCount(2); - horizontalLayout_7->addWidget(TWCMP); + hboxLayout2->addWidget(TWCMP); - horizontalSpacer_4 = new QSpacerItem(60, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem1 = new QSpacerItem(60, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - horizontalLayout_7->addItem(horizontalSpacer_4); + hboxLayout2->addItem(spacerItem1); - verticalLayout_3 = new QVBoxLayout(); - verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3")); - horizontalLayout_3 = new QHBoxLayout(); - horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); + vboxLayout = new QVBoxLayout(); + vboxLayout->setSpacing(6); + vboxLayout->setMargin(0); + vboxLayout->setObjectName(QString::fromUtf8("vboxLayout")); + hboxLayout3 = new QHBoxLayout(); + hboxLayout3->setSpacing(6); + hboxLayout3->setMargin(0); + hboxLayout3->setObjectName(QString::fromUtf8("hboxLayout3")); RBL2 = new QRadioButton(GBFieldManagement); RBL2->setObjectName(QString::fromUtf8("RBL2")); RBL2->setChecked(true); - horizontalLayout_3->addWidget(RBL2); + hboxLayout3->addWidget(RBL2); RBInf = new QRadioButton(GBFieldManagement); RBInf->setObjectName(QString::fromUtf8("RBInf")); RBInf->setChecked(false); - horizontalLayout_3->addWidget(RBInf); + hboxLayout3->addWidget(RBInf); - verticalLayout_3->addLayout(horizontalLayout_3); + vboxLayout->addLayout(hboxLayout3); - horizontalLayout_7->addLayout(verticalLayout_3); + hboxLayout2->addLayout(vboxLayout); - gridLayout_6->addLayout(horizontalLayout_7, 1, 0, 1, 1); + gridLayout3->addLayout(hboxLayout2, 1, 0, 1, 1); - horizontalLayout_2 = new QHBoxLayout(); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + hboxLayout4 = new QHBoxLayout(); + hboxLayout4->setSpacing(6); + hboxLayout4->setMargin(0); + hboxLayout4->setObjectName(QString::fromUtf8("hboxLayout4")); GBRefinementThresholds = new QGroupBox(GBFieldManagement); GBRefinementThresholds->setObjectName(QString::fromUtf8("GBRefinementThresholds")); - sizePolicy.setHeightForWidth(GBRefinementThresholds->sizePolicy().hasHeightForWidth()); - GBRefinementThresholds->setSizePolicy(sizePolicy); - gridLayout = new QGridLayout(GBRefinementThresholds); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + QSizePolicy sizePolicy3(static_cast(0), static_cast(0)); + sizePolicy3.setHorizontalStretch(0); + sizePolicy3.setVerticalStretch(0); + sizePolicy3.setHeightForWidth(GBRefinementThresholds->sizePolicy().hasHeightForWidth()); + GBRefinementThresholds->setSizePolicy(sizePolicy3); + gridLayout4 = new QGridLayout(GBRefinementThresholds); + gridLayout4->setSpacing(6); + gridLayout4->setMargin(9); + gridLayout4->setObjectName(QString::fromUtf8("gridLayout4")); RBRPE = new QRadioButton(GBRefinementThresholds); RBRPE->setObjectName(QString::fromUtf8("RBRPE")); RBRPE->setCheckable(true); RBRPE->setChecked(true); - gridLayout->addWidget(RBRPE, 0, 0, 1, 1); + gridLayout4->addWidget(RBRPE, 0, 0, 1, 1); SpinBox_RPE = new QDoubleSpinBox(GBRefinementThresholds); SpinBox_RPE->setObjectName(QString::fromUtf8("SpinBox_RPE")); @@ -291,12 +309,12 @@ public: SpinBox_RPE->setSingleStep(0.1); SpinBox_RPE->setValue(3); - gridLayout->addWidget(SpinBox_RPE, 0, 1, 1, 1); + gridLayout4->addWidget(SpinBox_RPE, 0, 1, 1, 1); RBRRel = new QRadioButton(GBRefinementThresholds); RBRRel->setObjectName(QString::fromUtf8("RBRRel")); - gridLayout->addWidget(RBRRel, 1, 0, 1, 1); + gridLayout4->addWidget(RBRRel, 1, 0, 1, 1); SpinBox_RRel = new QDoubleSpinBox(GBRefinementThresholds); SpinBox_RRel->setObjectName(QString::fromUtf8("SpinBox_RRel")); @@ -305,12 +323,12 @@ public: SpinBox_RRel->setMaximum(100); SpinBox_RRel->setSingleStep(0.1); - gridLayout->addWidget(SpinBox_RRel, 1, 1, 1, 1); + gridLayout4->addWidget(SpinBox_RRel, 1, 1, 1, 1); RBRAbs = new QRadioButton(GBRefinementThresholds); RBRAbs->setObjectName(QString::fromUtf8("RBRAbs")); - gridLayout->addWidget(RBRAbs, 2, 0, 1, 1); + gridLayout4->addWidget(RBRAbs, 2, 0, 1, 1); SpinBox_RAbs = new QDoubleSpinBox(GBRefinementThresholds); SpinBox_RAbs->setObjectName(QString::fromUtf8("SpinBox_RAbs")); @@ -319,26 +337,28 @@ public: SpinBox_RAbs->setMaximum(100); SpinBox_RAbs->setSingleStep(0.1); - gridLayout->addWidget(SpinBox_RAbs, 2, 1, 1, 1); + gridLayout4->addWidget(SpinBox_RAbs, 2, 1, 1, 1); RBRNo = new QRadioButton(GBRefinementThresholds); RBRNo->setObjectName(QString::fromUtf8("RBRNo")); - gridLayout->addWidget(RBRNo, 3, 0, 1, 1); + gridLayout4->addWidget(RBRNo, 3, 0, 1, 1); - horizontalLayout_2->addWidget(GBRefinementThresholds); + hboxLayout4->addWidget(GBRefinementThresholds); GBCoarseningThresholds = new QGroupBox(GBFieldManagement); GBCoarseningThresholds->setObjectName(QString::fromUtf8("GBCoarseningThresholds")); - gridLayout_4 = new QGridLayout(GBCoarseningThresholds); - gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4")); + gridLayout5 = new QGridLayout(GBCoarseningThresholds); + gridLayout5->setSpacing(6); + gridLayout5->setMargin(9); + gridLayout5->setObjectName(QString::fromUtf8("gridLayout5")); RBCPE = new QRadioButton(GBCoarseningThresholds); RBCPE->setObjectName(QString::fromUtf8("RBCPE")); RBCPE->setCheckable(true); RBCPE->setChecked(false); - gridLayout_4->addWidget(RBCPE, 0, 0, 1, 1); + gridLayout5->addWidget(RBCPE, 0, 0, 1, 1); SpinBox_CPE = new QDoubleSpinBox(GBCoarseningThresholds); SpinBox_CPE->setObjectName(QString::fromUtf8("SpinBox_CPE")); @@ -347,12 +367,12 @@ public: SpinBox_CPE->setMaximum(100); SpinBox_CPE->setSingleStep(0.1); - gridLayout_4->addWidget(SpinBox_CPE, 0, 1, 1, 1); + gridLayout5->addWidget(SpinBox_CPE, 0, 1, 1, 1); RBCRel = new QRadioButton(GBCoarseningThresholds); RBCRel->setObjectName(QString::fromUtf8("RBCRel")); - gridLayout_4->addWidget(RBCRel, 1, 0, 1, 1); + gridLayout5->addWidget(RBCRel, 1, 0, 1, 1); SpinBox_CRel = new QDoubleSpinBox(GBCoarseningThresholds); SpinBox_CRel->setObjectName(QString::fromUtf8("SpinBox_CRel")); @@ -361,12 +381,12 @@ public: SpinBox_CRel->setMaximum(100); SpinBox_CRel->setSingleStep(0.1); - gridLayout_4->addWidget(SpinBox_CRel, 1, 1, 1, 1); + gridLayout5->addWidget(SpinBox_CRel, 1, 1, 1, 1); RBCAbs = new QRadioButton(GBCoarseningThresholds); RBCAbs->setObjectName(QString::fromUtf8("RBCAbs")); - gridLayout_4->addWidget(RBCAbs, 2, 0, 1, 1); + gridLayout5->addWidget(RBCAbs, 2, 0, 1, 1); SpinBox_CAbs = new QDoubleSpinBox(GBCoarseningThresholds); SpinBox_CAbs->setObjectName(QString::fromUtf8("SpinBox_CAbs")); @@ -375,165 +395,170 @@ public: SpinBox_CAbs->setMaximum(100); SpinBox_CAbs->setSingleStep(0.1); - gridLayout_4->addWidget(SpinBox_CAbs, 2, 1, 1, 1); + gridLayout5->addWidget(SpinBox_CAbs, 2, 1, 1, 1); RBCNo = new QRadioButton(GBCoarseningThresholds); RBCNo->setObjectName(QString::fromUtf8("RBCNo")); RBCNo->setChecked(true); - gridLayout_4->addWidget(RBCNo, 3, 0, 1, 1); + gridLayout5->addWidget(RBCNo, 3, 0, 1, 1); - horizontalLayout_2->addWidget(GBCoarseningThresholds); + hboxLayout4->addWidget(GBCoarseningThresholds); - gridLayout_6->addLayout(horizontalLayout_2, 2, 0, 1, 1); + gridLayout3->addLayout(hboxLayout4, 2, 0, 1, 1); - gridLayout_10->addWidget(GBFieldManagement, 4, 0, 1, 2); + gridLayout->addWidget(GBFieldManagement, 4, 0, 1, 2); GBAreaManagement = new QGroupBox(CreateHypothesis); GBAreaManagement->setObjectName(QString::fromUtf8("GBAreaManagement")); - sizePolicy.setHeightForWidth(GBAreaManagement->sizePolicy().hasHeightForWidth()); - GBAreaManagement->setSizePolicy(sizePolicy); - gridLayout_3 = new QGridLayout(GBAreaManagement); - gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3")); - - - + QSizePolicy sizePolicy4(static_cast(0), static_cast(0)); + sizePolicy4.setHorizontalStretch(0); + sizePolicy4.setVerticalStretch(0); + sizePolicy4.setHeightForWidth(GBAreaManagement->sizePolicy().hasHeightForWidth()); + GBAreaManagement->setSizePolicy(sizePolicy4); + gridLayout6 = new QGridLayout(GBAreaManagement); + gridLayout6->setSpacing(6); + gridLayout6->setMargin(9); + gridLayout6->setObjectName(QString::fromUtf8("gridLayout6")); TWZone = new QTableWidget(GBAreaManagement); - if (TWZone->columnCount() < 2) - TWZone->setColumnCount(2); - QTableWidgetItem *__colItem2 = new QTableWidgetItem(); - TWZone->setHorizontalHeaderItem(0, __colItem2); - QTableWidgetItem *__colItem3 = new QTableWidgetItem(); - TWZone->setHorizontalHeaderItem(1, __colItem3); TWZone->setObjectName(QString::fromUtf8("TWZone")); - TWZone->setEditTriggers(QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked); + TWZone->setEditTriggers(QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::NoEditTriggers|QAbstractItemView::SelectedClicked); TWZone->setShowGrid(true); TWZone->setRowCount(0); TWZone->setColumnCount(2); - gridLayout_3->addWidget(TWZone, 0, 0, 1, 1); + gridLayout6->addWidget(TWZone, 0, 0, 1, 1); - verticalLayout_2 = new QVBoxLayout(); - verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); - verticalLayout = new QVBoxLayout(); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + vboxLayout1 = new QVBoxLayout(); + vboxLayout1->setSpacing(6); + vboxLayout1->setMargin(0); + vboxLayout1->setObjectName(QString::fromUtf8("vboxLayout1")); + vboxLayout2 = new QVBoxLayout(); + vboxLayout2->setSpacing(6); + vboxLayout2->setMargin(0); + vboxLayout2->setObjectName(QString::fromUtf8("vboxLayout2")); PBZoneNew = new QPushButton(GBAreaManagement); PBZoneNew->setObjectName(QString::fromUtf8("PBZoneNew")); - verticalLayout->addWidget(PBZoneNew); + vboxLayout2->addWidget(PBZoneNew); PBZoneEdit = new QPushButton(GBAreaManagement); PBZoneEdit->setObjectName(QString::fromUtf8("PBZoneEdit")); - verticalLayout->addWidget(PBZoneEdit); + vboxLayout2->addWidget(PBZoneEdit); PBZoneDelete = new QPushButton(GBAreaManagement); PBZoneDelete->setObjectName(QString::fromUtf8("PBZoneDelete")); - verticalLayout->addWidget(PBZoneDelete); + vboxLayout2->addWidget(PBZoneDelete); - verticalLayout_2->addLayout(verticalLayout); + vboxLayout1->addLayout(vboxLayout2); - verticalSpacer = new QSpacerItem(20, 48, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem2 = new QSpacerItem(20, 48, QSizePolicy::Minimum, QSizePolicy::Expanding); - verticalLayout_2->addItem(verticalSpacer); + vboxLayout1->addItem(spacerItem2); - gridLayout_3->addLayout(verticalLayout_2, 0, 1, 1, 1); + gridLayout6->addLayout(vboxLayout1, 0, 1, 1, 1); - gridLayout_10->addWidget(GBAreaManagement, 5, 0, 1, 2); + gridLayout->addWidget(GBAreaManagement, 5, 0, 1, 2); GBField = new QGroupBox(CreateHypothesis); GBField->setObjectName(QString::fromUtf8("GBField")); - gridLayout_8 = new QGridLayout(GBField); - gridLayout_8->setObjectName(QString::fromUtf8("gridLayout_8")); - gridLayout_7 = new QGridLayout(); - gridLayout_7->setObjectName(QString::fromUtf8("gridLayout_7")); + gridLayout7 = new QGridLayout(GBField); + gridLayout7->setSpacing(6); + gridLayout7->setMargin(9); + gridLayout7->setObjectName(QString::fromUtf8("gridLayout7")); + gridLayout8 = new QGridLayout(); + gridLayout8->setSpacing(6); + gridLayout8->setMargin(0); + gridLayout8->setObjectName(QString::fromUtf8("gridLayout8")); RBFieldNo = new QRadioButton(GBField); RBFieldNo->setObjectName(QString::fromUtf8("RBFieldNo")); RBFieldNo->setChecked(true); - gridLayout_7->addWidget(RBFieldNo, 0, 0, 1, 1); + gridLayout8->addWidget(RBFieldNo, 0, 0, 1, 1); RBFieldAll = new QRadioButton(GBField); RBFieldAll->setObjectName(QString::fromUtf8("RBFieldAll")); RBFieldAll->setChecked(false); - gridLayout_7->addWidget(RBFieldAll, 0, 1, 1, 1); + gridLayout8->addWidget(RBFieldAll, 0, 1, 1, 1); RBFieldChosen = new QRadioButton(GBField); RBFieldChosen->setObjectName(QString::fromUtf8("RBFieldChosen")); RBFieldChosen->setChecked(false); - gridLayout_7->addWidget(RBFieldChosen, 0, 2, 1, 1); + gridLayout8->addWidget(RBFieldChosen, 0, 2, 1, 1); - gridLayout_8->addLayout(gridLayout_7, 0, 0, 1, 1); + gridLayout7->addLayout(gridLayout8, 0, 0, 1, 1); TWField = new QTableWidget(GBField); - if (TWField->columnCount() < 2) - TWField->setColumnCount(2); - QTableWidgetItem *__colItem4 = new QTableWidgetItem(); - TWField->setHorizontalHeaderItem(0, __colItem4); - QTableWidgetItem *__colItem5 = new QTableWidgetItem(); - TWField->setHorizontalHeaderItem(1, __colItem5); TWField->setObjectName(QString::fromUtf8("TWField")); - gridLayout_8->addWidget(TWField, 1, 0, 1, 1); + gridLayout7->addWidget(TWField, 1, 0, 1, 1); - gridLayout_10->addWidget(GBField, 6, 0, 1, 2); + gridLayout->addWidget(GBField, 6, 0, 1, 2); CBGroupe = new QCheckBox(CreateHypothesis); CBGroupe->setObjectName(QString::fromUtf8("CBGroupe")); - gridLayout_10->addWidget(CBGroupe, 7, 0, 1, 2); + gridLayout->addWidget(CBGroupe, 7, 0, 1, 2); GBButtons = new QGroupBox(CreateHypothesis); GBButtons->setObjectName(QString::fromUtf8("GBButtons")); - gridLayout_5 = new QGridLayout(GBButtons); - gridLayout_5->setObjectName(QString::fromUtf8("gridLayout_5")); + gridLayout9 = new QGridLayout(GBButtons); + gridLayout9->setSpacing(6); + gridLayout9->setMargin(9); + gridLayout9->setObjectName(QString::fromUtf8("gridLayout9")); buttonOk = new QPushButton(GBButtons); buttonOk->setObjectName(QString::fromUtf8("buttonOk")); - gridLayout_5->addWidget(buttonOk, 0, 0, 1, 1); + gridLayout9->addWidget(buttonOk, 0, 0, 1, 1); buttonApply = new QPushButton(GBButtons); buttonApply->setObjectName(QString::fromUtf8("buttonApply")); - gridLayout_5->addWidget(buttonApply, 0, 1, 1, 1); + gridLayout9->addWidget(buttonApply, 0, 1, 1, 1); buttonCancel = new QPushButton(GBButtons); buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); - gridLayout_5->addWidget(buttonCancel, 0, 2, 1, 1); + gridLayout9->addWidget(buttonCancel, 0, 2, 1, 1); buttonHelp = new QPushButton(GBButtons); buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); - gridLayout_5->addWidget(buttonHelp, 0, 3, 1, 1); + gridLayout9->addWidget(buttonHelp, 0, 3, 1, 1); - gridLayout_10->addWidget(GBButtons, 8, 0, 1, 2); + gridLayout->addWidget(GBButtons, 8, 0, 1, 2); retranslateUi(CreateHypothesis); + QSize size(717, 1166); + size = size.expandedTo(CreateHypothesis->minimumSizeHint()); + CreateHypothesis->resize(size); + + QMetaObject::connectSlotsByName(CreateHypothesis); } // setupUi void retranslateUi(QDialog *CreateHypothesis) { - CreateHypothesis->setWindowTitle(QApplication::translate("CreateHypothesis", "Create Hypothesis", 0, QApplication::UnicodeUTF8)); + CreateHypothesis->setWindowTitle(QApplication::translate("CreateHypothesis", "Create an hypothesis", 0, QApplication::UnicodeUTF8)); Name->setText(QApplication::translate("CreateHypothesis", "Name", 0, QApplication::UnicodeUTF8)); GBTypeAdaptation->setTitle(QApplication::translate("CreateHypothesis", "Type of adaptation", 0, QApplication::UnicodeUTF8)); RBUniforme->setText(QApplication::translate("CreateHypothesis", "Uniform", 0, QApplication::UnicodeUTF8)); - RBChamp->setText(QApplication::translate("CreateHypothesis", "Following a field", 0, QApplication::UnicodeUTF8)); + RBChamp->setText(QApplication::translate("CreateHypothesis", "Driven by a field", 0, QApplication::UnicodeUTF8)); RBZone->setText(QApplication::translate("CreateHypothesis", "With geometrical zones", 0, QApplication::UnicodeUTF8)); GBUniform->setTitle(QApplication::translate("CreateHypothesis", "Uniform adaptation", 0, QApplication::UnicodeUTF8)); RBUniDera->setText(QApplication::translate("CreateHypothesis", "Coarsening", 0, QApplication::UnicodeUTF8)); @@ -541,28 +566,44 @@ public: GBFieldFile->setTitle(QString()); FieldFile->setText(QApplication::translate("CreateHypothesis", "File of the fields", 0, QApplication::UnicodeUTF8)); GBFieldManagement->setTitle(QApplication::translate("CreateHypothesis", "Governing field for the adaptation", 0, QApplication::UnicodeUTF8)); - FieldName->setText(QApplication::translate("CreateHypothesis", "Field Name", 0, QApplication::UnicodeUTF8)); - TWCMP->horizontalHeaderItem(0)->setText(QApplication::translate("CreateHypothesis", "Selection", 0, QApplication::UnicodeUTF8)); - TWCMP->horizontalHeaderItem(1)->setText(QApplication::translate("CreateHypothesis", "Component", 0, QApplication::UnicodeUTF8)); + FieldName->setText(QApplication::translate("CreateHypothesis", "Field name", 0, QApplication::UnicodeUTF8)); + if (TWCMP->columnCount() < 2) + TWCMP->setColumnCount(2); + + QTableWidgetItem *__colItem = new QTableWidgetItem(); + __colItem->setText(QApplication::translate("CreateHypothesis", "Selection", 0, QApplication::UnicodeUTF8)); + TWCMP->setHorizontalHeaderItem(0, __colItem); + + QTableWidgetItem *__colItem1 = new QTableWidgetItem(); + __colItem1->setText(QApplication::translate("CreateHypothesis", "Component", 0, QApplication::UnicodeUTF8)); + TWCMP->setHorizontalHeaderItem(1, __colItem1); RBL2->setText(QApplication::translate("CreateHypothesis", "L2 norm", 0, QApplication::UnicodeUTF8)); RBInf->setText(QApplication::translate("CreateHypothesis", "Infinite norm", 0, QApplication::UnicodeUTF8)); - GBRefinementThresholds->setTitle(QApplication::translate("CreateHypothesis", "Refinement thresholds", 0, QApplication::UnicodeUTF8)); + GBRefinementThresholds->setTitle(QApplication::translate("CreateHypothesis", "Refinement threshold", 0, QApplication::UnicodeUTF8)); RBRPE->setText(QApplication::translate("CreateHypothesis", "Percentage of meshes", 0, QApplication::UnicodeUTF8)); SpinBox_RPE->setSuffix(QApplication::translate("CreateHypothesis", " %", 0, QApplication::UnicodeUTF8)); RBRRel->setText(QApplication::translate("CreateHypothesis", "Relative", 0, QApplication::UnicodeUTF8)); SpinBox_RRel->setSuffix(QApplication::translate("CreateHypothesis", " %", 0, QApplication::UnicodeUTF8)); RBRAbs->setText(QApplication::translate("CreateHypothesis", "Absolute", 0, QApplication::UnicodeUTF8)); RBRNo->setText(QApplication::translate("CreateHypothesis", "No refinement", 0, QApplication::UnicodeUTF8)); - GBCoarseningThresholds->setTitle(QApplication::translate("CreateHypothesis", "Coarsening thresholds", 0, QApplication::UnicodeUTF8)); + GBCoarseningThresholds->setTitle(QApplication::translate("CreateHypothesis", "Coarsening threshold", 0, QApplication::UnicodeUTF8)); RBCPE->setText(QApplication::translate("CreateHypothesis", "Percentage of meshes", 0, QApplication::UnicodeUTF8)); SpinBox_CPE->setSuffix(QApplication::translate("CreateHypothesis", " %", 0, QApplication::UnicodeUTF8)); RBCRel->setText(QApplication::translate("CreateHypothesis", "Relative", 0, QApplication::UnicodeUTF8)); SpinBox_CRel->setSuffix(QApplication::translate("CreateHypothesis", " %", 0, QApplication::UnicodeUTF8)); RBCAbs->setText(QApplication::translate("CreateHypothesis", "Absolute", 0, QApplication::UnicodeUTF8)); RBCNo->setText(QApplication::translate("CreateHypothesis", "No coarsening", 0, QApplication::UnicodeUTF8)); - GBAreaManagement->setTitle(QApplication::translate("CreateHypothesis", "Area management", 0, QApplication::UnicodeUTF8)); - TWZone->horizontalHeaderItem(0)->setText(QApplication::translate("CreateHypothesis", "Selection", 0, QApplication::UnicodeUTF8)); - TWZone->horizontalHeaderItem(1)->setText(QApplication::translate("CreateHypothesis", "Zone name", 0, QApplication::UnicodeUTF8)); + GBAreaManagement->setTitle(QApplication::translate("CreateHypothesis", "Zone management", 0, QApplication::UnicodeUTF8)); + if (TWZone->columnCount() < 2) + TWZone->setColumnCount(2); + + QTableWidgetItem *__colItem2 = new QTableWidgetItem(); + __colItem2->setText(QApplication::translate("CreateHypothesis", "Selection", 0, QApplication::UnicodeUTF8)); + TWZone->setHorizontalHeaderItem(0, __colItem2); + + QTableWidgetItem *__colItem3 = new QTableWidgetItem(); + __colItem3->setText(QApplication::translate("CreateHypothesis", "Zone name", 0, QApplication::UnicodeUTF8)); + TWZone->setHorizontalHeaderItem(1, __colItem3); PBZoneNew->setText(QApplication::translate("CreateHypothesis", "New", 0, QApplication::UnicodeUTF8)); PBZoneEdit->setText(QApplication::translate("CreateHypothesis", "Edit", 0, QApplication::UnicodeUTF8)); PBZoneDelete->setText(QString()); @@ -570,14 +611,22 @@ public: RBFieldNo->setText(QApplication::translate("CreateHypothesis", "None", 0, QApplication::UnicodeUTF8)); RBFieldAll->setText(QApplication::translate("CreateHypothesis", "All", 0, QApplication::UnicodeUTF8)); RBFieldChosen->setText(QApplication::translate("CreateHypothesis", "Chosen", 0, QApplication::UnicodeUTF8)); - TWField->horizontalHeaderItem(0)->setText(QApplication::translate("CreateHypothesis", "Selection", 0, QApplication::UnicodeUTF8)); - TWField->horizontalHeaderItem(1)->setText(QApplication::translate("CreateHypothesis", "Field Name", 0, QApplication::UnicodeUTF8)); + if (TWField->columnCount() < 2) + TWField->setColumnCount(2); + + QTableWidgetItem *__colItem4 = new QTableWidgetItem(); + __colItem4->setText(QApplication::translate("CreateHypothesis", "Selection", 0, QApplication::UnicodeUTF8)); + TWField->setHorizontalHeaderItem(0, __colItem4); + + QTableWidgetItem *__colItem5 = new QTableWidgetItem(); + __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)); GBButtons->setTitle(QString()); - buttonOk->setText(QApplication::translate("CreateHypothesis", "&Ok", 0, QApplication::UnicodeUTF8)); - buttonApply->setText(QApplication::translate("CreateHypothesis", "&Apply", 0, QApplication::UnicodeUTF8)); - buttonCancel->setText(QApplication::translate("CreateHypothesis", "&Cancel", 0, QApplication::UnicodeUTF8)); - buttonHelp->setText(QApplication::translate("CreateHypothesis", "&Help", 0, QApplication::UnicodeUTF8)); + buttonOk->setText(QApplication::translate("CreateHypothesis", "OK", 0, QApplication::UnicodeUTF8)); + buttonApply->setText(QApplication::translate("CreateHypothesis", "Apply", 0, QApplication::UnicodeUTF8)); + buttonCancel->setText(QApplication::translate("CreateHypothesis", "Cancel", 0, QApplication::UnicodeUTF8)); + buttonHelp->setText(QApplication::translate("CreateHypothesis", "Help", 0, QApplication::UnicodeUTF8)); Q_UNUSED(CreateHypothesis); } // retranslateUi @@ -587,6 +636,4 @@ namespace Ui { class CreateHypothesis: public Ui_CreateHypothesis {}; } // namespace Ui -QT_END_NAMESPACE - #endif // CREATEHYPOTHESIS_H diff --git a/src/HOMARDGUI/CreateHypothesis.ui b/src/HOMARDGUI/CreateHypothesis.ui index 7e5bc80e..7bc8b7f4 100644 --- a/src/HOMARDGUI/CreateHypothesis.ui +++ b/src/HOMARDGUI/CreateHypothesis.ui @@ -6,25 +6,33 @@ 0 0 717 - 1005 + 1166 - + + 0 + 0 0 0 - Create Hypothesis + Create an hypothesis - false + true true - + + + 9 + + + 6 + @@ -50,7 +58,13 @@ Type of adaptation - + + + 9 + + + 6 + @@ -64,7 +78,7 @@ - Following a field + Driven by a field @@ -83,7 +97,13 @@ Uniform adaptation - + + + 9 + + + 6 + @@ -109,7 +129,13 @@ - + + + 9 + + + 6 + @@ -133,7 +159,9 @@ - + + 0 + 0 0 0 @@ -141,20 +169,34 @@ Governing field for the adaptation - + + + 9 + + + 6 + - + + + 0 + + + 6 + - Field Name + Field name - + + 0 + 0 0 0 @@ -168,11 +210,11 @@ - + Qt::Horizontal - + 48 20 @@ -183,11 +225,17 @@ - + + + 0 + + + 6 + - QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked + QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::NoEditTriggers|QAbstractItemView::SelectedClicked true @@ -211,11 +259,11 @@ - + Qt::Horizontal - + 60 20 @@ -224,9 +272,21 @@ - + + + 0 + + + 6 + - + + + 0 + + + 6 + @@ -254,19 +314,33 @@ - + + + 0 + + + 6 + - + + 0 + 0 0 0 - Refinement thresholds + Refinement threshold - + + + 9 + + + 6 + @@ -361,9 +435,15 @@ - Coarsening thresholds + Coarsening threshold - + + + 9 + + + 6 + @@ -466,19 +546,27 @@ - + + 0 + 0 0 0 - Area management + Zone management - + + + 9 + + + 6 + - QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked + QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::NoEditTriggers|QAbstractItemView::SelectedClicked true @@ -502,9 +590,21 @@ - + + + 0 + + + 6 + - + + + 0 + + + 6 + @@ -529,11 +629,11 @@ - + Qt::Vertical - + 20 48 @@ -551,9 +651,21 @@ Field Interpolation - + + + 9 + + + 6 + - + + + 0 + + + 6 + @@ -615,32 +727,38 @@ - + + + 9 + + + 6 + - &Ok + OK - &Apply + Apply - &Cancel + Cancel - &Help + Help diff --git a/src/HOMARDGUI/CreateIteration.h b/src/HOMARDGUI/CreateIteration.h index a1d65484..b116d885 100644 --- a/src/HOMARDGUI/CreateIteration.h +++ b/src/HOMARDGUI/CreateIteration.h @@ -1,8 +1,8 @@ /******************************************************************************** ** Form generated from reading ui file 'CreateIteration.ui' ** -** Created: Thu Nov 18 15:59:09 2010 -** by: Qt User Interface Compiler version 4.4.3 +** Created: Tue Mar 15 10:16:06 2011 +** by: Qt User Interface Compiler version 4.2.1 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! ********************************************************************************/ @@ -25,51 +25,49 @@ #include #include -QT_BEGIN_NAMESPACE - class Ui_CreateIteration { public: - QGridLayout *gridLayout_2; + QGridLayout *gridLayout; QLabel *Iteration_Name; QLineEdit *LEIterationName; QLabel *Iter_Parent; - QSpacerItem *verticalSpacer; + QSpacerItem *spacerItem; QPushButton *PBIterParent; QLineEdit *LEIterationParentName; QLabel *Mesh_n; - QSpacerItem *verticalSpacer_6; + QSpacerItem *spacerItem1; QLineEdit *LEMeshName_n; - QSpacerItem *verticalSpacer_1; + QSpacerItem *spacerItem2; QLabel *Mesh_np1; QLineEdit *LEMeshName_np1; - QSpacerItem *verticalSpacer_3; + QSpacerItem *spacerItem3; QGroupBox *GBField; - QGridLayout *gridLayout; + QGridLayout *gridLayout1; QLabel *FieldFile; QPushButton *PushFieldFile; QLineEdit *LEFieldFile; - QSpacerItem *verticalSpacer_7; + QSpacerItem *spacerItem4; QRadioButton *RBNo; QRadioButton *RBLast; QRadioButton *RBChosen; - QSpacerItem *verticalSpacer_4; + QSpacerItem *spacerItem5; QLabel *TimeStep; QSpinBox *SpinBox_TimeStep; - QSpacerItem *spacer; + QSpacerItem *spacerItem6; QLabel *Rank; QSpinBox *SpinBox_Rank; - QSpacerItem *spacer_3; - QSpacerItem *verticalSpacer_2; + QSpacerItem *spacerItem7; + QSpacerItem *spacerItem8; QGroupBox *Hypothese; - QGridLayout *gridLayout_3; + QGridLayout *gridLayout2; QComboBox *CBHypothese; - QSpacerItem *spacer_2; + QSpacerItem *spacerItem9; QPushButton *PBHypoEdit; QPushButton *PBHypoNew; - QSpacerItem *verticalSpacer_5; + QSpacerItem *spacerItem10; QGroupBox *GroupButtons; - QGridLayout *gridLayout_4; + QGridLayout *gridLayout3; QPushButton *buttonOk; QPushButton *buttonApply; QPushButton *buttonCancel; @@ -77,38 +75,38 @@ public: void setupUi(QWidget *CreateIteration) { - if (CreateIteration->objectName().isEmpty()) - CreateIteration->setObjectName(QString::fromUtf8("CreateIteration")); - CreateIteration->resize(587, 598); - gridLayout_2 = new QGridLayout(CreateIteration); - gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); + CreateIteration->setObjectName(QString::fromUtf8("CreateIteration")); + gridLayout = new QGridLayout(CreateIteration); + gridLayout->setSpacing(6); + gridLayout->setMargin(9); + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); Iteration_Name = new QLabel(CreateIteration); Iteration_Name->setObjectName(QString::fromUtf8("Iteration_Name")); - gridLayout_2->addWidget(Iteration_Name, 0, 0, 1, 2); + gridLayout->addWidget(Iteration_Name, 0, 0, 1, 2); LEIterationName = new QLineEdit(CreateIteration); LEIterationName->setObjectName(QString::fromUtf8("LEIterationName")); LEIterationName->setMinimumSize(QSize(290, 21)); LEIterationName->setMaxLength(200); - gridLayout_2->addWidget(LEIterationName, 0, 2, 1, 2); + gridLayout->addWidget(LEIterationName, 0, 2, 1, 2); Iter_Parent = new QLabel(CreateIteration); Iter_Parent->setObjectName(QString::fromUtf8("Iter_Parent")); - gridLayout_2->addWidget(Iter_Parent, 1, 0, 1, 1); + gridLayout->addWidget(Iter_Parent, 1, 0, 1, 1); - verticalSpacer = new QSpacerItem(20, 24, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem = new QSpacerItem(20, 24, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout_2->addItem(verticalSpacer, 1, 1, 1, 1); + gridLayout->addItem(spacerItem, 1, 1, 1, 1); PBIterParent = new QPushButton(CreateIteration); PBIterParent->setObjectName(QString::fromUtf8("PBIterParent")); PBIterParent->setEnabled(true); PBIterParent->setMaximumSize(QSize(50, 27)); - gridLayout_2->addWidget(PBIterParent, 1, 2, 1, 1); + gridLayout->addWidget(PBIterParent, 1, 2, 1, 1); LEIterationParentName = new QLineEdit(CreateIteration); LEIterationParentName->setObjectName(QString::fromUtf8("LEIterationParentName")); @@ -116,16 +114,16 @@ public: LEIterationParentName->setMaxLength(200); LEIterationParentName->setReadOnly(true); - gridLayout_2->addWidget(LEIterationParentName, 1, 3, 1, 1); + gridLayout->addWidget(LEIterationParentName, 1, 3, 1, 1); Mesh_n = new QLabel(CreateIteration); Mesh_n->setObjectName(QString::fromUtf8("Mesh_n")); - gridLayout_2->addWidget(Mesh_n, 2, 0, 1, 1); + gridLayout->addWidget(Mesh_n, 2, 0, 1, 1); - verticalSpacer_6 = new QSpacerItem(20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem1 = new QSpacerItem(20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout_2->addItem(verticalSpacer_6, 2, 1, 1, 1); + gridLayout->addItem(spacerItem1, 2, 1, 1, 1); LEMeshName_n = new QLineEdit(CreateIteration); LEMeshName_n->setObjectName(QString::fromUtf8("LEMeshName_n")); @@ -133,177 +131,188 @@ public: LEMeshName_n->setMaxLength(32); LEMeshName_n->setReadOnly(true); - gridLayout_2->addWidget(LEMeshName_n, 2, 2, 1, 2); + gridLayout->addWidget(LEMeshName_n, 2, 2, 1, 2); - verticalSpacer_1 = new QSpacerItem(20, 22, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem2 = new QSpacerItem(20, 22, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout_2->addItem(verticalSpacer_1, 3, 1, 1, 1); + gridLayout->addItem(spacerItem2, 3, 1, 1, 1); Mesh_np1 = new QLabel(CreateIteration); Mesh_np1->setObjectName(QString::fromUtf8("Mesh_np1")); - gridLayout_2->addWidget(Mesh_np1, 4, 0, 1, 2); + gridLayout->addWidget(Mesh_np1, 4, 0, 1, 2); LEMeshName_np1 = new QLineEdit(CreateIteration); LEMeshName_np1->setObjectName(QString::fromUtf8("LEMeshName_np1")); LEMeshName_np1->setMinimumSize(QSize(290, 21)); LEMeshName_np1->setMaxLength(32); - gridLayout_2->addWidget(LEMeshName_np1, 4, 2, 1, 2); + gridLayout->addWidget(LEMeshName_np1, 4, 2, 1, 2); - verticalSpacer_3 = new QSpacerItem(20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem3 = new QSpacerItem(20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout_2->addItem(verticalSpacer_3, 5, 1, 1, 1); + gridLayout->addItem(spacerItem3, 5, 1, 1, 1); GBField = new QGroupBox(CreateIteration); GBField->setObjectName(QString::fromUtf8("GBField")); - gridLayout = new QGridLayout(GBField); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + gridLayout1 = new QGridLayout(GBField); + gridLayout1->setSpacing(6); + gridLayout1->setMargin(9); + gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); FieldFile = new QLabel(GBField); FieldFile->setObjectName(QString::fromUtf8("FieldFile")); - gridLayout->addWidget(FieldFile, 0, 0, 1, 1); + gridLayout1->addWidget(FieldFile, 0, 0, 1, 1); PushFieldFile = new QPushButton(GBField); PushFieldFile->setObjectName(QString::fromUtf8("PushFieldFile")); - gridLayout->addWidget(PushFieldFile, 0, 1, 1, 1); + gridLayout1->addWidget(PushFieldFile, 0, 1, 1, 1); LEFieldFile = new QLineEdit(GBField); LEFieldFile->setObjectName(QString::fromUtf8("LEFieldFile")); LEFieldFile->setMinimumSize(QSize(282, 21)); - gridLayout->addWidget(LEFieldFile, 0, 2, 1, 6); + gridLayout1->addWidget(LEFieldFile, 0, 2, 1, 6); - verticalSpacer_7 = new QSpacerItem(138, 18, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem4 = new QSpacerItem(138, 18, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout->addItem(verticalSpacer_7, 1, 3, 1, 4); + gridLayout1->addItem(spacerItem4, 1, 3, 1, 4); RBNo = new QRadioButton(GBField); RBNo->setObjectName(QString::fromUtf8("RBNo")); RBNo->setCheckable(true); RBNo->setChecked(true); - gridLayout->addWidget(RBNo, 2, 0, 1, 3); + gridLayout1->addWidget(RBNo, 2, 0, 1, 3); RBLast = new QRadioButton(GBField); RBLast->setObjectName(QString::fromUtf8("RBLast")); - gridLayout->addWidget(RBLast, 2, 3, 1, 3); + gridLayout1->addWidget(RBLast, 2, 3, 1, 3); RBChosen = new QRadioButton(GBField); RBChosen->setObjectName(QString::fromUtf8("RBChosen")); - gridLayout->addWidget(RBChosen, 2, 7, 1, 1); + gridLayout1->addWidget(RBChosen, 2, 7, 1, 1); - verticalSpacer_4 = new QSpacerItem(138, 28, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem5 = new QSpacerItem(138, 28, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout->addItem(verticalSpacer_4, 3, 0, 1, 4); + gridLayout1->addItem(spacerItem5, 3, 0, 1, 4); TimeStep = new QLabel(GBField); TimeStep->setObjectName(QString::fromUtf8("TimeStep")); - gridLayout->addWidget(TimeStep, 4, 0, 1, 1); + gridLayout1->addWidget(TimeStep, 4, 0, 1, 1); SpinBox_TimeStep = new QSpinBox(GBField); SpinBox_TimeStep->setObjectName(QString::fromUtf8("SpinBox_TimeStep")); - SpinBox_TimeStep->setMinimum(-2); SpinBox_TimeStep->setMaximum(100000); + SpinBox_TimeStep->setMinimum(-2); SpinBox_TimeStep->setValue(-1); - gridLayout->addWidget(SpinBox_TimeStep, 4, 1, 1, 1); + gridLayout1->addWidget(SpinBox_TimeStep, 4, 1, 1, 1); - spacer = new QSpacerItem(40, 13, QSizePolicy::Fixed, QSizePolicy::Minimum); + spacerItem6 = new QSpacerItem(40, 13, QSizePolicy::Fixed, QSizePolicy::Minimum); - gridLayout->addItem(spacer, 4, 2, 1, 2); + gridLayout1->addItem(spacerItem6, 4, 2, 1, 2); Rank = new QLabel(GBField); Rank->setObjectName(QString::fromUtf8("Rank")); - gridLayout->addWidget(Rank, 4, 4, 1, 1); + gridLayout1->addWidget(Rank, 4, 4, 1, 1); SpinBox_Rank = new QSpinBox(GBField); SpinBox_Rank->setObjectName(QString::fromUtf8("SpinBox_Rank")); - SpinBox_Rank->setMinimum(-1); SpinBox_Rank->setMaximum(1010000); + SpinBox_Rank->setMinimum(-1); SpinBox_Rank->setValue(1); - gridLayout->addWidget(SpinBox_Rank, 4, 5, 1, 1); + gridLayout1->addWidget(SpinBox_Rank, 4, 5, 1, 1); - spacer_3 = new QSpacerItem(255, 13, QSizePolicy::Expanding, QSizePolicy::Minimum); + spacerItem7 = new QSpacerItem(255, 13, QSizePolicy::Expanding, QSizePolicy::Minimum); - gridLayout->addItem(spacer_3, 4, 6, 1, 2); + gridLayout1->addItem(spacerItem7, 4, 6, 1, 2); - gridLayout_2->addWidget(GBField, 6, 0, 1, 4); + gridLayout->addWidget(GBField, 6, 0, 1, 4); - verticalSpacer_2 = new QSpacerItem(20, 22, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem8 = new QSpacerItem(20, 22, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout_2->addItem(verticalSpacer_2, 7, 1, 1, 1); + gridLayout->addItem(spacerItem8, 7, 1, 1, 1); Hypothese = new QGroupBox(CreateIteration); Hypothese->setObjectName(QString::fromUtf8("Hypothese")); - gridLayout_3 = new QGridLayout(Hypothese); - gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3")); + gridLayout2 = new QGridLayout(Hypothese); + gridLayout2->setSpacing(6); + gridLayout2->setMargin(9); + gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); CBHypothese = new QComboBox(Hypothese); CBHypothese->setObjectName(QString::fromUtf8("CBHypothese")); CBHypothese->setSizeAdjustPolicy(QComboBox::AdjustToContents); - gridLayout_3->addWidget(CBHypothese, 0, 0, 1, 1); + gridLayout2->addWidget(CBHypothese, 0, 0, 1, 1); - spacer_2 = new QSpacerItem(40, 13, QSizePolicy::Fixed, QSizePolicy::Minimum); + spacerItem9 = new QSpacerItem(40, 13, QSizePolicy::Fixed, QSizePolicy::Minimum); - gridLayout_3->addItem(spacer_2, 0, 1, 1, 1); + gridLayout2->addItem(spacerItem9, 0, 1, 1, 1); PBHypoEdit = new QPushButton(Hypothese); PBHypoEdit->setObjectName(QString::fromUtf8("PBHypoEdit")); - gridLayout_3->addWidget(PBHypoEdit, 0, 2, 1, 1); + gridLayout2->addWidget(PBHypoEdit, 0, 2, 1, 1); PBHypoNew = new QPushButton(Hypothese); PBHypoNew->setObjectName(QString::fromUtf8("PBHypoNew")); - gridLayout_3->addWidget(PBHypoNew, 0, 3, 1, 1); + gridLayout2->addWidget(PBHypoNew, 0, 3, 1, 1); - gridLayout_2->addWidget(Hypothese, 8, 0, 1, 4); + gridLayout->addWidget(Hypothese, 8, 0, 1, 4); - verticalSpacer_5 = new QSpacerItem(20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding); + spacerItem10 = new QSpacerItem(20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding); - gridLayout_2->addItem(verticalSpacer_5, 9, 0, 1, 2); + gridLayout->addItem(spacerItem10, 9, 0, 1, 2); GroupButtons = new QGroupBox(CreateIteration); GroupButtons->setObjectName(QString::fromUtf8("GroupButtons")); - gridLayout_4 = new QGridLayout(GroupButtons); - gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4")); + gridLayout3 = new QGridLayout(GroupButtons); + gridLayout3->setSpacing(6); + gridLayout3->setMargin(9); + gridLayout3->setObjectName(QString::fromUtf8("gridLayout3")); buttonOk = new QPushButton(GroupButtons); buttonOk->setObjectName(QString::fromUtf8("buttonOk")); buttonOk->setAutoDefault(false); buttonOk->setDefault(false); - gridLayout_4->addWidget(buttonOk, 0, 0, 1, 1); + gridLayout3->addWidget(buttonOk, 0, 0, 1, 1); buttonApply = new QPushButton(GroupButtons); buttonApply->setObjectName(QString::fromUtf8("buttonApply")); - gridLayout_4->addWidget(buttonApply, 0, 1, 1, 1); + gridLayout3->addWidget(buttonApply, 0, 1, 1, 1); buttonCancel = new QPushButton(GroupButtons); buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); - gridLayout_4->addWidget(buttonCancel, 0, 2, 1, 1); + gridLayout3->addWidget(buttonCancel, 0, 2, 1, 1); buttonHelp = new QPushButton(GroupButtons); buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); - gridLayout_4->addWidget(buttonHelp, 0, 3, 1, 1); + gridLayout3->addWidget(buttonHelp, 0, 3, 1, 1); - gridLayout_2->addWidget(GroupButtons, 10, 0, 1, 4); + gridLayout->addWidget(GroupButtons, 10, 0, 1, 4); retranslateUi(CreateIteration); + QSize size(587, 598); + size = size.expandedTo(CreateIteration->minimumSizeHint()); + CreateIteration->resize(size); + + CBHypothese->setCurrentIndex(-1); @@ -312,28 +321,28 @@ public: void retranslateUi(QWidget *CreateIteration) { - CreateIteration->setWindowTitle(QApplication::translate("CreateIteration", "Create_Iteration", 0, QApplication::UnicodeUTF8)); + CreateIteration->setWindowTitle(QApplication::translate("CreateIteration", "Create an iteration", 0, QApplication::UnicodeUTF8)); Iteration_Name->setText(QApplication::translate("CreateIteration", "Iteration Name", 0, QApplication::UnicodeUTF8)); Iter_Parent->setText(QApplication::translate("CreateIteration", "Previous iteration", 0, QApplication::UnicodeUTF8)); PBIterParent->setText(QString()); Mesh_n->setText(QApplication::translate("CreateIteration", "Mesh n", 0, QApplication::UnicodeUTF8)); Mesh_np1->setText(QApplication::translate("CreateIteration", "Mesh n+1", 0, QApplication::UnicodeUTF8)); GBField->setTitle(QApplication::translate("CreateIteration", "Field information", 0, QApplication::UnicodeUTF8)); - FieldFile->setText(QApplication::translate("CreateIteration", "Field File", 0, QApplication::UnicodeUTF8)); + FieldFile->setText(QApplication::translate("CreateIteration", "Field file", 0, QApplication::UnicodeUTF8)); PushFieldFile->setText(QString()); - RBNo->setText(QApplication::translate("CreateIteration", "No Time Step", 0, QApplication::UnicodeUTF8)); - RBLast->setText(QApplication::translate("CreateIteration", "Last Time Step", 0, QApplication::UnicodeUTF8)); + RBNo->setText(QApplication::translate("CreateIteration", "No time step", 0, QApplication::UnicodeUTF8)); + RBLast->setText(QApplication::translate("CreateIteration", "Last time step", 0, QApplication::UnicodeUTF8)); RBChosen->setText(QApplication::translate("CreateIteration", "Chosen time step", 0, QApplication::UnicodeUTF8)); - TimeStep->setText(QApplication::translate("CreateIteration", "Time Step", 0, QApplication::UnicodeUTF8)); + TimeStep->setText(QApplication::translate("CreateIteration", "Time step", 0, QApplication::UnicodeUTF8)); Rank->setText(QApplication::translate("CreateIteration", "Rank", 0, QApplication::UnicodeUTF8)); Hypothese->setTitle(QApplication::translate("CreateIteration", "Hypothesis", 0, QApplication::UnicodeUTF8)); PBHypoEdit->setText(QApplication::translate("CreateIteration", "Edit", 0, QApplication::UnicodeUTF8)); PBHypoNew->setText(QApplication::translate("CreateIteration", "New", 0, QApplication::UnicodeUTF8)); GroupButtons->setTitle(QString()); - buttonOk->setText(QApplication::translate("CreateIteration", "&Ok", 0, QApplication::UnicodeUTF8)); - buttonApply->setText(QApplication::translate("CreateIteration", "&Apply", 0, QApplication::UnicodeUTF8)); - buttonCancel->setText(QApplication::translate("CreateIteration", "&Cancel", 0, QApplication::UnicodeUTF8)); - buttonHelp->setText(QApplication::translate("CreateIteration", "&Help", 0, QApplication::UnicodeUTF8)); + buttonOk->setText(QApplication::translate("CreateIteration", "OK", 0, QApplication::UnicodeUTF8)); + buttonApply->setText(QApplication::translate("CreateIteration", "Apply", 0, QApplication::UnicodeUTF8)); + buttonCancel->setText(QApplication::translate("CreateIteration", "Cancel", 0, QApplication::UnicodeUTF8)); + buttonHelp->setText(QApplication::translate("CreateIteration", "Help", 0, QApplication::UnicodeUTF8)); Q_UNUSED(CreateIteration); } // retranslateUi @@ -343,6 +352,4 @@ namespace Ui { class CreateIteration: public Ui_CreateIteration {}; } // namespace Ui -QT_END_NAMESPACE - #endif // CREATEITERATION_H diff --git a/src/HOMARDGUI/CreateIteration.ui b/src/HOMARDGUI/CreateIteration.ui index dbe973d0..1b2eb8e4 100644 --- a/src/HOMARDGUI/CreateIteration.ui +++ b/src/HOMARDGUI/CreateIteration.ui @@ -10,9 +10,15 @@ - Create_Iteration + Create an iteration - + + + 9 + + + 6 + @@ -41,11 +47,11 @@ - + Qt::Vertical - + 20 24 @@ -93,11 +99,11 @@ - + Qt::Vertical - + 20 21 @@ -122,11 +128,11 @@ - + Qt::Vertical - + 20 22 @@ -155,11 +161,11 @@ - + Qt::Vertical - + 20 21 @@ -172,11 +178,17 @@ Field information - + + + 9 + + + 6 + - Field File + Field file @@ -198,11 +210,11 @@ - + Qt::Vertical - + 138 18 @@ -213,7 +225,7 @@ - No Time Step + No time step true @@ -226,7 +238,7 @@ - Last Time Step + Last time step @@ -238,11 +250,11 @@ - + Qt::Vertical - + 138 28 @@ -253,32 +265,32 @@ - Time Step + Time step - - -2 - 100000 + + -2 + -1 - + Qt::Horizontal QSizePolicy::Fixed - + 40 13 @@ -295,26 +307,26 @@ - - -1 - 1010000 + + -1 + 1 - + Qt::Horizontal QSizePolicy::Expanding - + 255 13 @@ -326,11 +338,11 @@ - + Qt::Vertical - + 20 22 @@ -343,7 +355,13 @@ Hypothesis - + + + 9 + + + 6 + @@ -355,14 +373,14 @@ - + Qt::Horizontal QSizePolicy::Fixed - + 40 13 @@ -388,11 +406,11 @@ - + Qt::Vertical - + 20 21 @@ -405,11 +423,17 @@ - + + + 9 + + + 6 + - &Ok + OK false @@ -422,21 +446,21 @@ - &Apply + Apply - &Cancel + Cancel - &Help + Help diff --git a/src/HOMARDGUI/CreateListGroup.h b/src/HOMARDGUI/CreateListGroup.h index cf645bcd..49c5a17f 100644 --- a/src/HOMARDGUI/CreateListGroup.h +++ b/src/HOMARDGUI/CreateListGroup.h @@ -1,8 +1,8 @@ /******************************************************************************** ** Form generated from reading ui file 'CreateListGroup.ui' ** -** Created: Thu Nov 18 16:31:34 2010 -** by: Qt User Interface Compiler version 4.5.2 +** Created: Thu Feb 24 09:10:36 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,21 +17,18 @@ #include #include #include -#include #include #include -QT_BEGIN_NAMESPACE - class Ui_CreateListGroup { public: QGridLayout *gridLayout; QGroupBox *GBOptions; - QGridLayout *gridLayout_7; + QGridLayout *gridLayout1; QTableWidget *TWGroupe; QGroupBox *GBButtons; - QGridLayout *gridLayout_5; + QGridLayout *gridLayout2; QPushButton *buttonOk; QPushButton *buttonApply; QPushButton *buttonCancel; @@ -39,86 +36,95 @@ public: void setupUi(QDialog *CreateListGroup) { - if (CreateListGroup->objectName().isEmpty()) - CreateListGroup->setObjectName(QString::fromUtf8("CreateListGroup")); - CreateListGroup->resize(717, 600); - QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - sizePolicy.setHorizontalStretch(0); - sizePolicy.setVerticalStretch(0); - sizePolicy.setHeightForWidth(CreateListGroup->sizePolicy().hasHeightForWidth()); - CreateListGroup->setSizePolicy(sizePolicy); - CreateListGroup->setAutoFillBackground(false); - CreateListGroup->setSizeGripEnabled(true); - gridLayout = new QGridLayout(CreateListGroup); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - GBOptions = new QGroupBox(CreateListGroup); - GBOptions->setObjectName(QString::fromUtf8("GBOptions")); - gridLayout_7 = new QGridLayout(GBOptions); - gridLayout_7->setObjectName(QString::fromUtf8("gridLayout_7")); - TWGroupe = new QTableWidget(GBOptions); - if (TWGroupe->columnCount() < 2) - TWGroupe->setColumnCount(2); - QTableWidgetItem *__qtablewidgetitem = new QTableWidgetItem(); - TWGroupe->setHorizontalHeaderItem(0, __qtablewidgetitem); - QTableWidgetItem *__qtablewidgetitem1 = new QTableWidgetItem(); - TWGroupe->setHorizontalHeaderItem(1, __qtablewidgetitem1); - TWGroupe->setObjectName(QString::fromUtf8("TWGroupe")); - TWGroupe->setShowGrid(true); - TWGroupe->setRowCount(0); - TWGroupe->setColumnCount(2); + CreateListGroup->setObjectName(QString::fromUtf8("CreateListGroup")); + QSizePolicy sizePolicy(static_cast(0), static_cast(0)); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(0); + sizePolicy.setHeightForWidth(CreateListGroup->sizePolicy().hasHeightForWidth()); + CreateListGroup->setSizePolicy(sizePolicy); + CreateListGroup->setAutoFillBackground(true); + CreateListGroup->setSizeGripEnabled(true); + gridLayout = new QGridLayout(CreateListGroup); + gridLayout->setSpacing(6); + gridLayout->setMargin(9); + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + GBOptions = new QGroupBox(CreateListGroup); + GBOptions->setObjectName(QString::fromUtf8("GBOptions")); + gridLayout1 = new QGridLayout(GBOptions); + gridLayout1->setSpacing(6); + gridLayout1->setMargin(9); + gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + TWGroupe = new QTableWidget(GBOptions); + TWGroupe->setObjectName(QString::fromUtf8("TWGroupe")); + TWGroupe->setShowGrid(true); + TWGroupe->setRowCount(0); + TWGroupe->setColumnCount(2); + + gridLayout1->addWidget(TWGroupe, 0, 0, 1, 1); + - gridLayout_7->addWidget(TWGroupe, 0, 0, 1, 1); + gridLayout->addWidget(GBOptions, 0, 0, 1, 1); + GBButtons = new QGroupBox(CreateListGroup); + GBButtons->setObjectName(QString::fromUtf8("GBButtons")); + gridLayout2 = new QGridLayout(GBButtons); + gridLayout2->setSpacing(6); + gridLayout2->setMargin(9); + gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); + buttonOk = new QPushButton(GBButtons); + buttonOk->setObjectName(QString::fromUtf8("buttonOk")); - gridLayout->addWidget(GBOptions, 0, 0, 1, 1); + gridLayout2->addWidget(buttonOk, 0, 0, 1, 1); - GBButtons = new QGroupBox(CreateListGroup); - GBButtons->setObjectName(QString::fromUtf8("GBButtons")); - gridLayout_5 = new QGridLayout(GBButtons); - gridLayout_5->setObjectName(QString::fromUtf8("gridLayout_5")); - buttonOk = new QPushButton(GBButtons); - buttonOk->setObjectName(QString::fromUtf8("buttonOk")); + buttonApply = new QPushButton(GBButtons); + buttonApply->setObjectName(QString::fromUtf8("buttonApply")); - gridLayout_5->addWidget(buttonOk, 0, 0, 1, 1); + gridLayout2->addWidget(buttonApply, 0, 1, 1, 1); - buttonApply = new QPushButton(GBButtons); - buttonApply->setObjectName(QString::fromUtf8("buttonApply")); + buttonCancel = new QPushButton(GBButtons); + buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); - gridLayout_5->addWidget(buttonApply, 0, 1, 1, 1); + gridLayout2->addWidget(buttonCancel, 0, 2, 1, 1); - buttonCancel = new QPushButton(GBButtons); - buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); + buttonHelp = new QPushButton(GBButtons); + buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); - gridLayout_5->addWidget(buttonCancel, 0, 2, 1, 1); + gridLayout2->addWidget(buttonHelp, 0, 3, 1, 1); - buttonHelp = new QPushButton(GBButtons); - buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); - gridLayout_5->addWidget(buttonHelp, 0, 3, 1, 1); + gridLayout->addWidget(GBButtons, 1, 0, 1, 1); - gridLayout->addWidget(GBButtons, 1, 0, 1, 1); + retranslateUi(CreateListGroup); + QSize size(717, 600); + size = size.expandedTo(CreateListGroup->minimumSizeHint()); + CreateListGroup->resize(size); - retranslateUi(CreateListGroup); - QMetaObject::connectSlotsByName(CreateListGroup); + QMetaObject::connectSlotsByName(CreateListGroup); } // setupUi void retranslateUi(QDialog *CreateListGroup) { - CreateListGroup->setWindowTitle(QApplication::translate("CreateListGroup", "Create Hypothesis - Group selection", 0, QApplication::UnicodeUTF8)); - GBOptions->setTitle(QApplication::translate("CreateListGroup", "Selected groups", 0, QApplication::UnicodeUTF8)); - QTableWidgetItem *___qtablewidgetitem = TWGroupe->horizontalHeaderItem(0); - ___qtablewidgetitem->setText(QApplication::translate("CreateListGroup", "Selection", 0, QApplication::UnicodeUTF8)); - QTableWidgetItem *___qtablewidgetitem1 = TWGroupe->horizontalHeaderItem(1); - ___qtablewidgetitem1->setText(QApplication::translate("CreateListGroup", "Group", 0, QApplication::UnicodeUTF8)); - GBButtons->setTitle(QString()); - buttonOk->setText(QApplication::translate("CreateListGroup", "&Ok", 0, QApplication::UnicodeUTF8)); - buttonApply->setText(QApplication::translate("CreateListGroup", "&Apply", 0, QApplication::UnicodeUTF8)); - buttonCancel->setText(QApplication::translate("CreateListGroup", "&Cancel", 0, QApplication::UnicodeUTF8)); - buttonHelp->setText(QApplication::translate("CreateListGroup", "&Help", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(CreateListGroup); + CreateListGroup->setWindowTitle(QApplication::translate("CreateListGroup", "Selection of groups", 0, QApplication::UnicodeUTF8)); + GBOptions->setTitle(QApplication::translate("CreateListGroup", "Selected groups", 0, QApplication::UnicodeUTF8)); + if (TWGroupe->columnCount() < 2) + TWGroupe->setColumnCount(2); + + QTableWidgetItem *__colItem = new QTableWidgetItem(); + __colItem->setText(QApplication::translate("CreateListGroup", "Selection", 0, QApplication::UnicodeUTF8)); + TWGroupe->setHorizontalHeaderItem(0, __colItem); + + QTableWidgetItem *__colItem1 = new QTableWidgetItem(); + __colItem1->setText(QApplication::translate("CreateListGroup", "Group", 0, QApplication::UnicodeUTF8)); + TWGroupe->setHorizontalHeaderItem(1, __colItem1); + GBButtons->setTitle(QString()); + buttonOk->setText(QApplication::translate("CreateListGroup", "OK", 0, QApplication::UnicodeUTF8)); + buttonApply->setText(QApplication::translate("CreateListGroup", "Apply", 0, QApplication::UnicodeUTF8)); + buttonCancel->setText(QApplication::translate("CreateListGroup", "Cancel", 0, QApplication::UnicodeUTF8)); + buttonHelp->setText(QApplication::translate("CreateListGroup", "Help", 0, QApplication::UnicodeUTF8)); + Q_UNUSED(CreateListGroup); } // retranslateUi }; @@ -127,6 +133,4 @@ namespace Ui { class CreateListGroup: public Ui_CreateListGroup {}; } // namespace Ui -QT_END_NAMESPACE - #endif // CREATELISTGROUP_H diff --git a/src/HOMARDGUI/CreateListGroup.ui b/src/HOMARDGUI/CreateListGroup.ui index f496638b..f20fdde0 100644 --- a/src/HOMARDGUI/CreateListGroup.ui +++ b/src/HOMARDGUI/CreateListGroup.ui @@ -10,27 +10,41 @@ - + + 0 + 0 0 0 - Create Hypothesis - Group selection + Selection of groups - false + true true - + + + 9 + + + 6 + Selected groups - + + + 9 + + + 6 + @@ -62,32 +76,38 @@ - + + + 9 + + + 6 + - &Ok + OK - &Apply + Apply - &Cancel + Cancel - &Help + Help diff --git a/src/HOMARDGUI/CreateZone.h b/src/HOMARDGUI/CreateZone.h index bce2565e..1bbdb5a3 100644 --- a/src/HOMARDGUI/CreateZone.h +++ b/src/HOMARDGUI/CreateZone.h @@ -1,8 +1,8 @@ /******************************************************************************** ** Form generated from reading ui file 'CreateZone.ui' ** -** Created: Mon Sep 27 14:45:47 2010 -** by: Qt User Interface Compiler version 4.5.2 +** Created: Thu Feb 24 09:10:36 2011 +** by: Qt User Interface Compiler version 4.2.1 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! ********************************************************************************/ @@ -19,26 +19,23 @@ #include #include #include -#include #include #include #include #include -QT_BEGIN_NAMESPACE - class Ui_CreateZone { public: - QGridLayout *gridLayout_3; + QGridLayout *gridLayout; QLabel *Name; QLineEdit *LEZoneName; QGroupBox *TypeZone; - QHBoxLayout *horizontalLayout; + QHBoxLayout *hboxLayout; QRadioButton *RBBox; QRadioButton *RBSphere; QGroupBox *gBBox; - QGridLayout *gridLayout; + QGridLayout *gridLayout1; QLabel *TLXmini; QDoubleSpinBox *SpinBox_Xmini; QLabel *TLYmini; @@ -52,7 +49,7 @@ public: QDoubleSpinBox *SpinBox_Xmaxi; QDoubleSpinBox *SpinBox_Ymaxi; QGroupBox *gBSphere; - QGridLayout *gridLayout_2; + QGridLayout *gridLayout2; QLabel *TLXcentre; QDoubleSpinBox *SpinBox_Xcentre; QLabel *TLYcentre; @@ -62,7 +59,7 @@ public: QLabel *TLZcentre; QDoubleSpinBox *SpinBox_Zcentre; QGroupBox *GBButtons; - QHBoxLayout *hboxLayout; + QHBoxLayout *hboxLayout1; QPushButton *buttonOk; QPushButton *buttonApply; QPushButton *buttonCancel; @@ -70,309 +67,351 @@ public: void setupUi(QDialog *CreateZone) { - if (CreateZone->objectName().isEmpty()) - CreateZone->setObjectName(QString::fromUtf8("CreateZone")); - CreateZone->resize(415, 472); - CreateZone->setAutoFillBackground(false); - CreateZone->setSizeGripEnabled(true); - gridLayout_3 = new QGridLayout(CreateZone); - gridLayout_3->setObjectName(QString::fromUtf8("gridLayout_3")); - Name = new QLabel(CreateZone); - Name->setObjectName(QString::fromUtf8("Name")); - - gridLayout_3->addWidget(Name, 0, 0, 1, 1); - - LEZoneName = new QLineEdit(CreateZone); - LEZoneName->setObjectName(QString::fromUtf8("LEZoneName")); - LEZoneName->setMaxLength(32); - - gridLayout_3->addWidget(LEZoneName, 0, 1, 1, 1); - - TypeZone = new QGroupBox(CreateZone); - TypeZone->setObjectName(QString::fromUtf8("TypeZone")); - QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - sizePolicy.setHorizontalStretch(0); - sizePolicy.setVerticalStretch(0); - sizePolicy.setHeightForWidth(TypeZone->sizePolicy().hasHeightForWidth()); - TypeZone->setSizePolicy(sizePolicy); - TypeZone->setMinimumSize(QSize(340, 0)); - horizontalLayout = new QHBoxLayout(TypeZone); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); - RBBox = new QRadioButton(TypeZone); - RBBox->setObjectName(QString::fromUtf8("RBBox")); - QIcon icon; - icon.addFile(QString::fromUtf8("../../resources/zone_boxdxyz.png"), QSize(), QIcon::Normal, QIcon::Off); - RBBox->setIcon(icon); - RBBox->setCheckable(true); - RBBox->setChecked(true); - - horizontalLayout->addWidget(RBBox); - - RBSphere = new QRadioButton(TypeZone); - RBSphere->setObjectName(QString::fromUtf8("RBSphere")); - QIcon icon1; - icon1.addFile(QString::fromUtf8("../../resources/zone_spherepoint.png"), QSize(), QIcon::Normal, QIcon::Off); - RBSphere->setIcon(icon1); - - horizontalLayout->addWidget(RBSphere); - - - gridLayout_3->addWidget(TypeZone, 1, 0, 1, 2); - - gBBox = new QGroupBox(CreateZone); - gBBox->setObjectName(QString::fromUtf8("gBBox")); - sizePolicy.setHeightForWidth(gBBox->sizePolicy().hasHeightForWidth()); - gBBox->setSizePolicy(sizePolicy); - gridLayout = new QGridLayout(gBBox); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - TLXmini = new QLabel(gBBox); - TLXmini->setObjectName(QString::fromUtf8("TLXmini")); - sizePolicy.setHeightForWidth(TLXmini->sizePolicy().hasHeightForWidth()); - TLXmini->setSizePolicy(sizePolicy); - TLXmini->setWordWrap(false); - - gridLayout->addWidget(TLXmini, 0, 0, 1, 1); - - SpinBox_Xmini = new QDoubleSpinBox(gBBox); - SpinBox_Xmini->setObjectName(QString::fromUtf8("SpinBox_Xmini")); - SpinBox_Xmini->setDecimals(5); - SpinBox_Xmini->setMinimum(-1e+09); - SpinBox_Xmini->setMaximum(1e+09); - SpinBox_Xmini->setValue(0); - - gridLayout->addWidget(SpinBox_Xmini, 0, 1, 1, 1); - - TLYmini = new QLabel(gBBox); - TLYmini->setObjectName(QString::fromUtf8("TLYmini")); - sizePolicy.setHeightForWidth(TLYmini->sizePolicy().hasHeightForWidth()); - TLYmini->setSizePolicy(sizePolicy); - TLYmini->setWordWrap(false); - - gridLayout->addWidget(TLYmini, 1, 0, 1, 1); - - SpinBox_Ymini = new QDoubleSpinBox(gBBox); - SpinBox_Ymini->setObjectName(QString::fromUtf8("SpinBox_Ymini")); - SpinBox_Ymini->setDecimals(5); - SpinBox_Ymini->setMinimum(-1e+09); - SpinBox_Ymini->setMaximum(1e+09); - SpinBox_Ymini->setValue(0); - - gridLayout->addWidget(SpinBox_Ymini, 1, 1, 1, 1); - - TLZmini = new QLabel(gBBox); - TLZmini->setObjectName(QString::fromUtf8("TLZmini")); - sizePolicy.setHeightForWidth(TLZmini->sizePolicy().hasHeightForWidth()); - TLZmini->setSizePolicy(sizePolicy); - TLZmini->setWordWrap(false); - - gridLayout->addWidget(TLZmini, 2, 0, 1, 1); - - SpinBox_Zmini = new QDoubleSpinBox(gBBox); - SpinBox_Zmini->setObjectName(QString::fromUtf8("SpinBox_Zmini")); - SpinBox_Zmini->setDecimals(5); - SpinBox_Zmini->setMinimum(-1e+09); - SpinBox_Zmini->setMaximum(1e+09); - SpinBox_Zmini->setValue(0); - - gridLayout->addWidget(SpinBox_Zmini, 2, 1, 1, 1); - - TLXmaxi = new QLabel(gBBox); - TLXmaxi->setObjectName(QString::fromUtf8("TLXmaxi")); - sizePolicy.setHeightForWidth(TLXmaxi->sizePolicy().hasHeightForWidth()); - TLXmaxi->setSizePolicy(sizePolicy); - TLXmaxi->setWordWrap(false); - - gridLayout->addWidget(TLXmaxi, 0, 2, 1, 1); - - TLZmaxi = new QLabel(gBBox); - TLZmaxi->setObjectName(QString::fromUtf8("TLZmaxi")); - sizePolicy.setHeightForWidth(TLZmaxi->sizePolicy().hasHeightForWidth()); - TLZmaxi->setSizePolicy(sizePolicy); - TLZmaxi->setWordWrap(false); - - gridLayout->addWidget(TLZmaxi, 2, 2, 1, 1); - - SpinBox_Zmaxi = new QDoubleSpinBox(gBBox); - SpinBox_Zmaxi->setObjectName(QString::fromUtf8("SpinBox_Zmaxi")); - SpinBox_Zmaxi->setDecimals(5); - SpinBox_Zmaxi->setMinimum(-1e+09); - SpinBox_Zmaxi->setMaximum(1e+09); - SpinBox_Zmaxi->setValue(0); - - gridLayout->addWidget(SpinBox_Zmaxi, 2, 3, 1, 1); - - TLYmaxi = new QLabel(gBBox); - TLYmaxi->setObjectName(QString::fromUtf8("TLYmaxi")); - sizePolicy.setHeightForWidth(TLYmaxi->sizePolicy().hasHeightForWidth()); - TLYmaxi->setSizePolicy(sizePolicy); - TLYmaxi->setWordWrap(false); - - gridLayout->addWidget(TLYmaxi, 1, 2, 1, 1); - - SpinBox_Xmaxi = new QDoubleSpinBox(gBBox); - SpinBox_Xmaxi->setObjectName(QString::fromUtf8("SpinBox_Xmaxi")); - SpinBox_Xmaxi->setDecimals(5); - SpinBox_Xmaxi->setMinimum(-1e+09); - SpinBox_Xmaxi->setMaximum(1e+09); - SpinBox_Xmaxi->setValue(0); - - gridLayout->addWidget(SpinBox_Xmaxi, 0, 3, 1, 1); - - SpinBox_Ymaxi = new QDoubleSpinBox(gBBox); - SpinBox_Ymaxi->setObjectName(QString::fromUtf8("SpinBox_Ymaxi")); - SpinBox_Ymaxi->setDecimals(5); - SpinBox_Ymaxi->setMinimum(-1e+09); - SpinBox_Ymaxi->setMaximum(1e+09); - SpinBox_Ymaxi->setValue(0); - - gridLayout->addWidget(SpinBox_Ymaxi, 1, 3, 1, 1); - - - gridLayout_3->addWidget(gBBox, 2, 0, 1, 2); - - gBSphere = new QGroupBox(CreateZone); - gBSphere->setObjectName(QString::fromUtf8("gBSphere")); - sizePolicy.setHeightForWidth(gBSphere->sizePolicy().hasHeightForWidth()); - gBSphere->setSizePolicy(sizePolicy); - gridLayout_2 = new QGridLayout(gBSphere); - gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); - TLXcentre = new QLabel(gBSphere); - TLXcentre->setObjectName(QString::fromUtf8("TLXcentre")); - sizePolicy.setHeightForWidth(TLXcentre->sizePolicy().hasHeightForWidth()); - TLXcentre->setSizePolicy(sizePolicy); - TLXcentre->setWordWrap(false); - - gridLayout_2->addWidget(TLXcentre, 0, 0, 1, 1); - - SpinBox_Xcentre = new QDoubleSpinBox(gBSphere); - SpinBox_Xcentre->setObjectName(QString::fromUtf8("SpinBox_Xcentre")); - SpinBox_Xcentre->setDecimals(5); - SpinBox_Xcentre->setMinimum(-1e+09); - SpinBox_Xcentre->setMaximum(1e+09); - SpinBox_Xcentre->setValue(0); - - gridLayout_2->addWidget(SpinBox_Xcentre, 0, 1, 1, 1); - - TLYcentre = new QLabel(gBSphere); - TLYcentre->setObjectName(QString::fromUtf8("TLYcentre")); - sizePolicy.setHeightForWidth(TLYcentre->sizePolicy().hasHeightForWidth()); - TLYcentre->setSizePolicy(sizePolicy); - TLYcentre->setWordWrap(false); - - gridLayout_2->addWidget(TLYcentre, 1, 0, 1, 1); + CreateZone->setObjectName(QString::fromUtf8("CreateZone")); + CreateZone->setAutoFillBackground(true); + CreateZone->setSizeGripEnabled(true); + gridLayout = new QGridLayout(CreateZone); + gridLayout->setSpacing(6); + gridLayout->setMargin(9); + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + Name = new QLabel(CreateZone); + Name->setObjectName(QString::fromUtf8("Name")); + + gridLayout->addWidget(Name, 0, 0, 1, 1); + + LEZoneName = new QLineEdit(CreateZone); + LEZoneName->setObjectName(QString::fromUtf8("LEZoneName")); + LEZoneName->setMaxLength(32); + + gridLayout->addWidget(LEZoneName, 0, 1, 1, 1); + + TypeZone = new QGroupBox(CreateZone); + TypeZone->setObjectName(QString::fromUtf8("TypeZone")); + QSizePolicy sizePolicy(static_cast(0), static_cast(0)); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(0); + sizePolicy.setHeightForWidth(TypeZone->sizePolicy().hasHeightForWidth()); + TypeZone->setSizePolicy(sizePolicy); + TypeZone->setMinimumSize(QSize(340, 0)); + hboxLayout = new QHBoxLayout(TypeZone); + hboxLayout->setSpacing(6); + hboxLayout->setMargin(9); + hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); + RBBox = new QRadioButton(TypeZone); + RBBox->setObjectName(QString::fromUtf8("RBBox")); + RBBox->setIcon(QIcon(QString::fromUtf8("../../resources/zone_boxdxyz.png"))); + RBBox->setCheckable(true); + RBBox->setChecked(true); + + hboxLayout->addWidget(RBBox); + + RBSphere = new QRadioButton(TypeZone); + RBSphere->setObjectName(QString::fromUtf8("RBSphere")); + RBSphere->setIcon(QIcon(QString::fromUtf8("../../resources/zone_spherepoint.png"))); + + hboxLayout->addWidget(RBSphere); + + + gridLayout->addWidget(TypeZone, 1, 0, 1, 2); + + gBBox = new QGroupBox(CreateZone); + gBBox->setObjectName(QString::fromUtf8("gBBox")); + QSizePolicy sizePolicy1(static_cast(0), static_cast(0)); + sizePolicy1.setHorizontalStretch(0); + sizePolicy1.setVerticalStretch(0); + sizePolicy1.setHeightForWidth(gBBox->sizePolicy().hasHeightForWidth()); + gBBox->setSizePolicy(sizePolicy1); + gridLayout1 = new QGridLayout(gBBox); + gridLayout1->setSpacing(6); + gridLayout1->setMargin(9); + gridLayout1->setObjectName(QString::fromUtf8("gridLayout1")); + TLXmini = new QLabel(gBBox); + TLXmini->setObjectName(QString::fromUtf8("TLXmini")); + QSizePolicy sizePolicy2(static_cast(0), static_cast(0)); + sizePolicy2.setHorizontalStretch(0); + sizePolicy2.setVerticalStretch(0); + sizePolicy2.setHeightForWidth(TLXmini->sizePolicy().hasHeightForWidth()); + TLXmini->setSizePolicy(sizePolicy2); + TLXmini->setWordWrap(false); + + gridLayout1->addWidget(TLXmini, 0, 0, 1, 1); + + SpinBox_Xmini = new QDoubleSpinBox(gBBox); + SpinBox_Xmini->setObjectName(QString::fromUtf8("SpinBox_Xmini")); + SpinBox_Xmini->setDecimals(5); + SpinBox_Xmini->setMaximum(1e+09); + SpinBox_Xmini->setMinimum(-1e+09); + SpinBox_Xmini->setValue(0); + + gridLayout1->addWidget(SpinBox_Xmini, 0, 1, 1, 1); + + TLYmini = new QLabel(gBBox); + TLYmini->setObjectName(QString::fromUtf8("TLYmini")); + QSizePolicy sizePolicy3(static_cast(0), static_cast(0)); + sizePolicy3.setHorizontalStretch(0); + sizePolicy3.setVerticalStretch(0); + sizePolicy3.setHeightForWidth(TLYmini->sizePolicy().hasHeightForWidth()); + TLYmini->setSizePolicy(sizePolicy3); + TLYmini->setWordWrap(false); + + gridLayout1->addWidget(TLYmini, 1, 0, 1, 1); + + SpinBox_Ymini = new QDoubleSpinBox(gBBox); + SpinBox_Ymini->setObjectName(QString::fromUtf8("SpinBox_Ymini")); + SpinBox_Ymini->setDecimals(5); + SpinBox_Ymini->setMaximum(1e+09); + SpinBox_Ymini->setMinimum(-1e+09); + SpinBox_Ymini->setValue(0); + + gridLayout1->addWidget(SpinBox_Ymini, 1, 1, 1, 1); + + TLZmini = new QLabel(gBBox); + TLZmini->setObjectName(QString::fromUtf8("TLZmini")); + QSizePolicy sizePolicy4(static_cast(0), static_cast(0)); + sizePolicy4.setHorizontalStretch(0); + sizePolicy4.setVerticalStretch(0); + sizePolicy4.setHeightForWidth(TLZmini->sizePolicy().hasHeightForWidth()); + TLZmini->setSizePolicy(sizePolicy4); + TLZmini->setWordWrap(false); + + gridLayout1->addWidget(TLZmini, 2, 0, 1, 1); + + SpinBox_Zmini = new QDoubleSpinBox(gBBox); + SpinBox_Zmini->setObjectName(QString::fromUtf8("SpinBox_Zmini")); + SpinBox_Zmini->setDecimals(5); + SpinBox_Zmini->setMaximum(1e+09); + SpinBox_Zmini->setMinimum(-1e+09); + SpinBox_Zmini->setValue(0); + + gridLayout1->addWidget(SpinBox_Zmini, 2, 1, 1, 1); + + TLXmaxi = new QLabel(gBBox); + TLXmaxi->setObjectName(QString::fromUtf8("TLXmaxi")); + QSizePolicy sizePolicy5(static_cast(0), static_cast(0)); + sizePolicy5.setHorizontalStretch(0); + sizePolicy5.setVerticalStretch(0); + sizePolicy5.setHeightForWidth(TLXmaxi->sizePolicy().hasHeightForWidth()); + TLXmaxi->setSizePolicy(sizePolicy5); + TLXmaxi->setWordWrap(false); + + gridLayout1->addWidget(TLXmaxi, 0, 2, 1, 1); + + TLZmaxi = new QLabel(gBBox); + TLZmaxi->setObjectName(QString::fromUtf8("TLZmaxi")); + QSizePolicy sizePolicy6(static_cast(0), static_cast(0)); + sizePolicy6.setHorizontalStretch(0); + sizePolicy6.setVerticalStretch(0); + sizePolicy6.setHeightForWidth(TLZmaxi->sizePolicy().hasHeightForWidth()); + TLZmaxi->setSizePolicy(sizePolicy6); + TLZmaxi->setWordWrap(false); + + gridLayout1->addWidget(TLZmaxi, 2, 2, 1, 1); + + SpinBox_Zmaxi = new QDoubleSpinBox(gBBox); + SpinBox_Zmaxi->setObjectName(QString::fromUtf8("SpinBox_Zmaxi")); + SpinBox_Zmaxi->setDecimals(5); + SpinBox_Zmaxi->setMaximum(1e+09); + SpinBox_Zmaxi->setMinimum(-1e+09); + SpinBox_Zmaxi->setValue(0); + + gridLayout1->addWidget(SpinBox_Zmaxi, 2, 3, 1, 1); + + TLYmaxi = new QLabel(gBBox); + TLYmaxi->setObjectName(QString::fromUtf8("TLYmaxi")); + QSizePolicy sizePolicy7(static_cast(0), static_cast(0)); + sizePolicy7.setHorizontalStretch(0); + sizePolicy7.setVerticalStretch(0); + sizePolicy7.setHeightForWidth(TLYmaxi->sizePolicy().hasHeightForWidth()); + TLYmaxi->setSizePolicy(sizePolicy7); + TLYmaxi->setWordWrap(false); + + gridLayout1->addWidget(TLYmaxi, 1, 2, 1, 1); + + SpinBox_Xmaxi = new QDoubleSpinBox(gBBox); + SpinBox_Xmaxi->setObjectName(QString::fromUtf8("SpinBox_Xmaxi")); + SpinBox_Xmaxi->setDecimals(5); + SpinBox_Xmaxi->setMaximum(1e+09); + SpinBox_Xmaxi->setMinimum(-1e+09); + SpinBox_Xmaxi->setValue(0); + + gridLayout1->addWidget(SpinBox_Xmaxi, 0, 3, 1, 1); + + SpinBox_Ymaxi = new QDoubleSpinBox(gBBox); + SpinBox_Ymaxi->setObjectName(QString::fromUtf8("SpinBox_Ymaxi")); + SpinBox_Ymaxi->setDecimals(5); + SpinBox_Ymaxi->setMaximum(1e+09); + SpinBox_Ymaxi->setMinimum(-1e+09); + SpinBox_Ymaxi->setValue(0); + + gridLayout1->addWidget(SpinBox_Ymaxi, 1, 3, 1, 1); + + + gridLayout->addWidget(gBBox, 2, 0, 1, 2); + + gBSphere = new QGroupBox(CreateZone); + gBSphere->setObjectName(QString::fromUtf8("gBSphere")); + QSizePolicy sizePolicy8(static_cast(0), static_cast(0)); + sizePolicy8.setHorizontalStretch(0); + sizePolicy8.setVerticalStretch(0); + sizePolicy8.setHeightForWidth(gBSphere->sizePolicy().hasHeightForWidth()); + gBSphere->setSizePolicy(sizePolicy8); + gridLayout2 = new QGridLayout(gBSphere); + gridLayout2->setSpacing(6); + gridLayout2->setMargin(9); + gridLayout2->setObjectName(QString::fromUtf8("gridLayout2")); + TLXcentre = new QLabel(gBSphere); + TLXcentre->setObjectName(QString::fromUtf8("TLXcentre")); + QSizePolicy sizePolicy9(static_cast(0), static_cast(0)); + sizePolicy9.setHorizontalStretch(0); + sizePolicy9.setVerticalStretch(0); + sizePolicy9.setHeightForWidth(TLXcentre->sizePolicy().hasHeightForWidth()); + TLXcentre->setSizePolicy(sizePolicy9); + TLXcentre->setWordWrap(false); + + gridLayout2->addWidget(TLXcentre, 0, 0, 1, 1); + + SpinBox_Xcentre = new QDoubleSpinBox(gBSphere); + SpinBox_Xcentre->setObjectName(QString::fromUtf8("SpinBox_Xcentre")); + SpinBox_Xcentre->setDecimals(5); + SpinBox_Xcentre->setMaximum(1e+09); + SpinBox_Xcentre->setMinimum(-1e+09); + SpinBox_Xcentre->setValue(0); + + gridLayout2->addWidget(SpinBox_Xcentre, 0, 1, 1, 1); + + TLYcentre = new QLabel(gBSphere); + TLYcentre->setObjectName(QString::fromUtf8("TLYcentre")); + QSizePolicy sizePolicy10(static_cast(0), static_cast(0)); + sizePolicy10.setHorizontalStretch(0); + sizePolicy10.setVerticalStretch(0); + sizePolicy10.setHeightForWidth(TLYcentre->sizePolicy().hasHeightForWidth()); + TLYcentre->setSizePolicy(sizePolicy10); + TLYcentre->setWordWrap(false); + + gridLayout2->addWidget(TLYcentre, 1, 0, 1, 1); + + SpinBox_Ycentre = new QDoubleSpinBox(gBSphere); + SpinBox_Ycentre->setObjectName(QString::fromUtf8("SpinBox_Ycentre")); + SpinBox_Ycentre->setDecimals(5); + SpinBox_Ycentre->setMaximum(1e+09); + SpinBox_Ycentre->setMinimum(-1e+09); + SpinBox_Ycentre->setValue(0); + + gridLayout2->addWidget(SpinBox_Ycentre, 1, 1, 1, 1); + + TLRayon = new QLabel(gBSphere); + TLRayon->setObjectName(QString::fromUtf8("TLRayon")); + QSizePolicy sizePolicy11(static_cast(0), static_cast(0)); + sizePolicy11.setHorizontalStretch(0); + sizePolicy11.setVerticalStretch(0); + sizePolicy11.setHeightForWidth(TLRayon->sizePolicy().hasHeightForWidth()); + TLRayon->setSizePolicy(sizePolicy11); + TLRayon->setWordWrap(false); + + gridLayout2->addWidget(TLRayon, 1, 2, 1, 1); + + SpinBox_Rayon = new QDoubleSpinBox(gBSphere); + SpinBox_Rayon->setObjectName(QString::fromUtf8("SpinBox_Rayon")); + SpinBox_Rayon->setDecimals(5); + SpinBox_Rayon->setMaximum(1e+09); + SpinBox_Rayon->setMinimum(-1e+09); + SpinBox_Rayon->setValue(0); + + gridLayout2->addWidget(SpinBox_Rayon, 1, 3, 1, 1); + + TLZcentre = new QLabel(gBSphere); + TLZcentre->setObjectName(QString::fromUtf8("TLZcentre")); + QSizePolicy sizePolicy12(static_cast(0), static_cast(0)); + sizePolicy12.setHorizontalStretch(0); + sizePolicy12.setVerticalStretch(0); + sizePolicy12.setHeightForWidth(TLZcentre->sizePolicy().hasHeightForWidth()); + TLZcentre->setSizePolicy(sizePolicy12); + TLZcentre->setWordWrap(false); + + gridLayout2->addWidget(TLZcentre, 2, 0, 1, 1); + + SpinBox_Zcentre = new QDoubleSpinBox(gBSphere); + SpinBox_Zcentre->setObjectName(QString::fromUtf8("SpinBox_Zcentre")); + SpinBox_Zcentre->setDecimals(5); + SpinBox_Zcentre->setMaximum(1e+09); + SpinBox_Zcentre->setMinimum(-1e+09); + SpinBox_Zcentre->setValue(0); + + gridLayout2->addWidget(SpinBox_Zcentre, 2, 1, 1, 1); - SpinBox_Ycentre = new QDoubleSpinBox(gBSphere); - SpinBox_Ycentre->setObjectName(QString::fromUtf8("SpinBox_Ycentre")); - SpinBox_Ycentre->setDecimals(5); - SpinBox_Ycentre->setMinimum(-1e+09); - SpinBox_Ycentre->setMaximum(1e+09); - SpinBox_Ycentre->setValue(0); - gridLayout_2->addWidget(SpinBox_Ycentre, 1, 1, 1, 1); + gridLayout->addWidget(gBSphere, 3, 0, 1, 2); - TLRayon = new QLabel(gBSphere); - TLRayon->setObjectName(QString::fromUtf8("TLRayon")); - sizePolicy.setHeightForWidth(TLRayon->sizePolicy().hasHeightForWidth()); - TLRayon->setSizePolicy(sizePolicy); - TLRayon->setWordWrap(false); + GBButtons = new QGroupBox(CreateZone); + GBButtons->setObjectName(QString::fromUtf8("GBButtons")); + QSizePolicy sizePolicy13(static_cast(0), static_cast(0)); + sizePolicy13.setHorizontalStretch(0); + sizePolicy13.setVerticalStretch(0); + sizePolicy13.setHeightForWidth(GBButtons->sizePolicy().hasHeightForWidth()); + GBButtons->setSizePolicy(sizePolicy13); + hboxLayout1 = new QHBoxLayout(GBButtons); + hboxLayout1->setSpacing(6); + hboxLayout1->setMargin(9); + hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1")); + buttonOk = new QPushButton(GBButtons); + buttonOk->setObjectName(QString::fromUtf8("buttonOk")); - gridLayout_2->addWidget(TLRayon, 1, 2, 1, 1); + hboxLayout1->addWidget(buttonOk); - SpinBox_Rayon = new QDoubleSpinBox(gBSphere); - SpinBox_Rayon->setObjectName(QString::fromUtf8("SpinBox_Rayon")); - SpinBox_Rayon->setDecimals(5); - SpinBox_Rayon->setMinimum(-1e+09); - SpinBox_Rayon->setMaximum(1e+09); - SpinBox_Rayon->setValue(0); + buttonApply = new QPushButton(GBButtons); + buttonApply->setObjectName(QString::fromUtf8("buttonApply")); - gridLayout_2->addWidget(SpinBox_Rayon, 1, 3, 1, 1); + hboxLayout1->addWidget(buttonApply); - TLZcentre = new QLabel(gBSphere); - TLZcentre->setObjectName(QString::fromUtf8("TLZcentre")); - sizePolicy.setHeightForWidth(TLZcentre->sizePolicy().hasHeightForWidth()); - TLZcentre->setSizePolicy(sizePolicy); - TLZcentre->setWordWrap(false); + buttonCancel = new QPushButton(GBButtons); + buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); - gridLayout_2->addWidget(TLZcentre, 2, 0, 1, 1); + hboxLayout1->addWidget(buttonCancel); - SpinBox_Zcentre = new QDoubleSpinBox(gBSphere); - SpinBox_Zcentre->setObjectName(QString::fromUtf8("SpinBox_Zcentre")); - SpinBox_Zcentre->setDecimals(5); - SpinBox_Zcentre->setMinimum(-1e+09); - SpinBox_Zcentre->setMaximum(1e+09); - SpinBox_Zcentre->setValue(0); + buttonHelp = new QPushButton(GBButtons); + buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); - gridLayout_2->addWidget(SpinBox_Zcentre, 2, 1, 1, 1); + hboxLayout1->addWidget(buttonHelp); - gridLayout_3->addWidget(gBSphere, 3, 0, 1, 2); + gridLayout->addWidget(GBButtons, 4, 0, 1, 2); - GBButtons = new QGroupBox(CreateZone); - GBButtons->setObjectName(QString::fromUtf8("GBButtons")); - sizePolicy.setHeightForWidth(GBButtons->sizePolicy().hasHeightForWidth()); - GBButtons->setSizePolicy(sizePolicy); - hboxLayout = new QHBoxLayout(GBButtons); -#ifndef Q_OS_MAC - hboxLayout->setSpacing(6); -#endif -#ifndef Q_OS_MAC - hboxLayout->setMargin(9); -#endif - hboxLayout->setObjectName(QString::fromUtf8("hboxLayout")); - buttonOk = new QPushButton(GBButtons); - buttonOk->setObjectName(QString::fromUtf8("buttonOk")); - hboxLayout->addWidget(buttonOk); + retranslateUi(CreateZone); - buttonApply = new QPushButton(GBButtons); - buttonApply->setObjectName(QString::fromUtf8("buttonApply")); + QSize size(454, 472); + size = size.expandedTo(CreateZone->minimumSizeHint()); + CreateZone->resize(size); - hboxLayout->addWidget(buttonApply); - buttonCancel = new QPushButton(GBButtons); - buttonCancel->setObjectName(QString::fromUtf8("buttonCancel")); - - hboxLayout->addWidget(buttonCancel); - - buttonHelp = new QPushButton(GBButtons); - buttonHelp->setObjectName(QString::fromUtf8("buttonHelp")); - - hboxLayout->addWidget(buttonHelp); - - - gridLayout_3->addWidget(GBButtons, 4, 0, 1, 2); - - - retranslateUi(CreateZone); - - QMetaObject::connectSlotsByName(CreateZone); + QMetaObject::connectSlotsByName(CreateZone); } // setupUi void retranslateUi(QDialog *CreateZone) { - CreateZone->setWindowTitle(QApplication::translate("CreateZone", "Create Zone", 0, QApplication::UnicodeUTF8)); - Name->setText(QApplication::translate("CreateZone", "Name", 0, QApplication::UnicodeUTF8)); - TypeZone->setTitle(QApplication::translate("CreateZone", "Type of zone", 0, QApplication::UnicodeUTF8)); - RBBox->setText(QString()); - RBSphere->setText(QString()); - gBBox->setTitle(QApplication::translate("CreateZone", "Coordinates", 0, QApplication::UnicodeUTF8)); - TLXmini->setText(QApplication::translate("CreateZone", "X mini", 0, QApplication::UnicodeUTF8)); - TLYmini->setText(QApplication::translate("CreateZone", "Y mini", 0, QApplication::UnicodeUTF8)); - TLZmini->setText(QApplication::translate("CreateZone", "Z mini", 0, QApplication::UnicodeUTF8)); - TLXmaxi->setText(QApplication::translate("CreateZone", "X maxi", 0, QApplication::UnicodeUTF8)); - TLZmaxi->setText(QApplication::translate("CreateZone", "Z maxi", 0, QApplication::UnicodeUTF8)); - TLYmaxi->setText(QApplication::translate("CreateZone", "Y maxi", 0, QApplication::UnicodeUTF8)); - gBSphere->setTitle(QApplication::translate("CreateZone", "Coordinates", 0, QApplication::UnicodeUTF8)); - TLXcentre->setText(QApplication::translate("CreateZone", "X centre", 0, QApplication::UnicodeUTF8)); - TLYcentre->setText(QApplication::translate("CreateZone", "Y centre", 0, QApplication::UnicodeUTF8)); - TLRayon->setText(QApplication::translate("CreateZone", "Radius", 0, QApplication::UnicodeUTF8)); - TLZcentre->setText(QApplication::translate("CreateZone", "Z centre", 0, QApplication::UnicodeUTF8)); - GBButtons->setTitle(QString()); - buttonOk->setText(QApplication::translate("CreateZone", "&Ok", 0, QApplication::UnicodeUTF8)); - buttonApply->setText(QApplication::translate("CreateZone", "&Apply", 0, QApplication::UnicodeUTF8)); - buttonCancel->setText(QApplication::translate("CreateZone", "&Cancel", 0, QApplication::UnicodeUTF8)); - buttonHelp->setText(QApplication::translate("CreateZone", "&Help", 0, QApplication::UnicodeUTF8)); - Q_UNUSED(CreateZone); + CreateZone->setWindowTitle(QApplication::translate("CreateZone", "Create a zone", 0, QApplication::UnicodeUTF8)); + Name->setText(QApplication::translate("CreateZone", "Name", 0, QApplication::UnicodeUTF8)); + TypeZone->setTitle(QApplication::translate("CreateZone", "Type of zone", 0, QApplication::UnicodeUTF8)); + RBBox->setText(QString()); + RBSphere->setText(QString()); + gBBox->setTitle(QApplication::translate("CreateZone", "Coordinates", 0, QApplication::UnicodeUTF8)); + TLXmini->setText(QApplication::translate("CreateZone", "X mini", 0, QApplication::UnicodeUTF8)); + TLYmini->setText(QApplication::translate("CreateZone", "Y mini", 0, QApplication::UnicodeUTF8)); + TLZmini->setText(QApplication::translate("CreateZone", "Z mini", 0, QApplication::UnicodeUTF8)); + TLXmaxi->setText(QApplication::translate("CreateZone", "X maxi", 0, QApplication::UnicodeUTF8)); + TLZmaxi->setText(QApplication::translate("CreateZone", "Z maxi", 0, QApplication::UnicodeUTF8)); + TLYmaxi->setText(QApplication::translate("CreateZone", "Y maxi", 0, QApplication::UnicodeUTF8)); + gBSphere->setTitle(QApplication::translate("CreateZone", "Coordinates", 0, QApplication::UnicodeUTF8)); + TLXcentre->setText(QApplication::translate("CreateZone", "X centre", 0, QApplication::UnicodeUTF8)); + TLYcentre->setText(QApplication::translate("CreateZone", "Y centre", 0, QApplication::UnicodeUTF8)); + TLRayon->setText(QApplication::translate("CreateZone", "Radius", 0, QApplication::UnicodeUTF8)); + TLZcentre->setText(QApplication::translate("CreateZone", "Z centre", 0, QApplication::UnicodeUTF8)); + GBButtons->setTitle(QString()); + buttonOk->setText(QApplication::translate("CreateZone", "OK", 0, QApplication::UnicodeUTF8)); + buttonApply->setText(QApplication::translate("CreateZone", "Apply", 0, QApplication::UnicodeUTF8)); + buttonCancel->setText(QApplication::translate("CreateZone", "Cancel", 0, QApplication::UnicodeUTF8)); + buttonHelp->setText(QApplication::translate("CreateZone", "Help", 0, QApplication::UnicodeUTF8)); + Q_UNUSED(CreateZone); } // retranslateUi }; @@ -381,6 +420,4 @@ namespace Ui { class CreateZone: public Ui_CreateZone {}; } // namespace Ui -QT_END_NAMESPACE - #endif // CREATEZONE_H diff --git a/src/HOMARDGUI/CreateZone.ui b/src/HOMARDGUI/CreateZone.ui index 0c98d284..e851ad47 100644 --- a/src/HOMARDGUI/CreateZone.ui +++ b/src/HOMARDGUI/CreateZone.ui @@ -1,288 +1,319 @@ - - + CreateZone - - + + 0 0 - 415 + 454 472 - - Create Zone + + Create a zone - - false + + true - + true - - - - + + + 9 + + + 6 + + + + Name - - - + + + 32 - - - - + + + + + 0 + 0 0 0 - + 340 0 - + Type of zone - + + + 9 + + + 6 + - - + + - - - ../../resources/zone_boxdxyz.png../../resources/zone_boxdxyz.png + + ../../resources/zone_boxdxyz.png - + true - + true - - + + - - - ../../resources/zone_spherepoint.png../../resources/zone_spherepoint.png + + ../../resources/zone_spherepoint.png - - - - + + + + + 0 + 0 0 0 - + Coordinates - - - - - + + + 9 + + + 6 + + + + + + 0 + 0 0 0 - + X mini - + false - - - + + + 5 - - -999999999.000000000000000 - - + 999999999.000000000000000 - + + -999999999.000000000000000 + + 0.000000000000000 - - - - + + + + + 0 + 0 0 0 - + Y mini - + false - - - + + + 5 - - -999999999.000000000000000 - - + 999999999.000000000000000 - + + -999999999.000000000000000 + + 0.000000000000000 - - - - + + + + + 0 + 0 0 0 - + Z mini - + false - - - + + + 5 - - -999999999.000000000000000 - - + 999999999.000000000000000 - + + -999999999.000000000000000 + + 0.000000000000000 - - - - + + + + + 0 + 0 0 0 - + X maxi - + false - - - - + + + + + 0 + 0 0 0 - + Z maxi - + false - - - + + + 5 - - -999999999.000000000000000 - - + 999999999.000000000000000 - + + -999999999.000000000000000 + + 0.000000000000000 - - - - + + + + + 0 + 0 0 0 - + Y maxi - + false - - - + + + 5 - - -999999999.000000000000000 - - + 999999999.000000000000000 - + + -999999999.000000000000000 + + 0.000000000000000 - - - + + + 5 - - -999999999.000000000000000 - - + 999999999.000000000000000 - + + -999999999.000000000000000 + + 0.000000000000000 @@ -290,142 +321,158 @@ - - - - + + + + + 0 + 0 0 0 - + Coordinates - - - - - + + + 9 + + + 6 + + + + + + 0 + 0 0 0 - + X centre - + false - - - + + + 5 - - -999999999.000000000000000 - - + 999999999.000000000000000 - + + -999999999.000000000000000 + + 0.000000000000000 - - - - + + + + + 0 + 0 0 0 - + Y centre - + false - - - + + + 5 - - -999999999.000000000000000 - - + 999999999.000000000000000 - + + -999999999.000000000000000 + + 0.000000000000000 - - - - + + + + + 0 + 0 0 0 - + Radius - + false - - - + + + 5 - - -999999999.000000000000000 - - + 999999999.000000000000000 - + + -999999999.000000000000000 + + 0.000000000000000 - - - - + + + + + 0 + 0 0 0 - + Z centre - + false - - - + + + 5 - - -999999999.000000000000000 - - + 999999999.000000000000000 - + + -999999999.000000000000000 + + 0.000000000000000 @@ -433,49 +480,51 @@ - - - - + + + + + 0 + 0 0 0 - + - - - 6 - - + + 9 + + 6 + - - - &Ok + + + OK - - - &Apply + + + Apply - - - &Cancel + + + Cancel - - - &Help + + + Help diff --git a/src/HOMARDGUI/EditFile.h b/src/HOMARDGUI/EditFile.h index a3c982f6..4248dd51 100644 --- a/src/HOMARDGUI/EditFile.h +++ b/src/HOMARDGUI/EditFile.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading ui file 'EditFile.ui' ** -** Created: Tue Feb 1 14:56:22 2011 +** Created: Tue Mar 15 10:38:58 2011 ** by: Qt User Interface Compiler version 4.2.1 ** ** WARNING! All changes made in this file will be lost when recompiling ui file! @@ -82,7 +82,7 @@ public: retranslateUi(EditFile); - QSize size(548, 901); + QSize size(675, 901); size = size.expandedTo(EditFile->minimumSizeHint()); EditFile->resize(size); @@ -92,10 +92,10 @@ public: void retranslateUi(QWidget *EditFile) { - EditFile->setWindowTitle(QApplication::translate("EditFile", "Edit File", 0, QApplication::UnicodeUTF8)); + EditFile->setWindowTitle(QApplication::translate("EditFile", "Edit a file", 0, QApplication::UnicodeUTF8)); GroupButtons->setTitle(QString()); - buttonPrint->setText(QApplication::translate("EditFile", "&Print", 0, QApplication::UnicodeUTF8)); - buttonQuit->setText(QApplication::translate("EditFile", "&Quit", 0, QApplication::UnicodeUTF8)); + buttonPrint->setText(QApplication::translate("EditFile", "Print", 0, QApplication::UnicodeUTF8)); + buttonQuit->setText(QApplication::translate("EditFile", "Quit", 0, QApplication::UnicodeUTF8)); Q_UNUSED(EditFile); } // retranslateUi diff --git a/src/HOMARDGUI/EditFile.ui b/src/HOMARDGUI/EditFile.ui index 8c7b2087..266c3d35 100644 --- a/src/HOMARDGUI/EditFile.ui +++ b/src/HOMARDGUI/EditFile.ui @@ -5,12 +5,12 @@ 0 0 - 548 + 675 901 - Edit File + Edit a file @@ -47,14 +47,14 @@ - &Print + Print - &Quit + Quit true diff --git a/src/HOMARDGUI/HOMARDGUI.cxx b/src/HOMARDGUI/HOMARDGUI.cxx index 41b6721f..fd1f2c60 100644 --- a/src/HOMARDGUI/HOMARDGUI.cxx +++ b/src/HOMARDGUI/HOMARDGUI.cxx @@ -107,6 +107,7 @@ void HOMARDGUI::initialize( CAM_Application* app ) //================================================ void HOMARDGUI::createHOMARDAction( const int id, const QString& po_id, const QString& icon_id, const int key, const bool toggle ) { + MESSAGE("HOMARDGUI::createHOMARDAction"); QIcon icon; QWidget* parent = application()->desktop(); SUIT_ResourceMgr* resMgr = application()->resourceMgr(); @@ -114,13 +115,13 @@ void HOMARDGUI::createHOMARDAction( const int id, const QString& po_id, const QS if ( icon_id.length() ) pix = resMgr->loadPixmap( "HOMARD", tr( icon_id .toLatin1().data()) ); else - pix = resMgr->loadPixmap( "HOMARD", tr( QString( "ICO_%1" ).arg( po_id ).toLatin1().data() ), false ); + pix = resMgr->loadPixmap( "HOMARD", tr( QString( "ICO_%1" ).arg( po_id ).toLatin1().data()), false ); if ( !pix.isNull() ) icon = QIcon( pix ); - QString tooltip = tr( QString( "TOP_%1" ).arg( po_id ).toLatin1().data() ), - menu = tr( QString( "MEN_%1" ).arg( po_id ).toLatin1().data() ), - status_bar = tr( QString( "STB_%1" ).arg( po_id ).toLatin1().data() ); + QString tooltip = tr(QString( "HOM_TOP_%1" ).arg( po_id ).toLatin1().data()), + menu = tr(QString( "HOM_MEN_%1" ).arg( po_id ).toLatin1().data()), + status_bar = tr(QString( "HOM_STB_%1" ).arg( po_id ).toLatin1().data()); createAction( id, tooltip, icon, menu, status_bar, key, parent, toggle, this, SLOT( OnGUIEvent() ) ); } @@ -162,6 +163,7 @@ void HOMARDGUI::createPreferences(){ // Verifier l'avant dernier nombre passe en parametre //================================================ void HOMARDGUI::createMenus(){ + MESSAGE("HOMARDGUI::createMenus") int HOMARD_Id = createMenu( tr( "HOMARD" ), -1, 5, 10 ); createMenu( 1101, HOMARD_Id, -1 ); //Create_Case createMenu( 1102, HOMARD_Id, -1 ); //Create_Iteration @@ -227,8 +229,9 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID) { case 1101: // Creation d un Cas { + MESSAGE("etape 1101") MESSAGE("command " << theCommandID << " activated"); - MonCreateCase *aDlg = new MonCreateCase( parent, TRUE, + MonCreateCase *aDlg = new MonCreateCase( parent, TRUE, HOMARD::HOMARD_Gen::_duplicate(homardGen) ) ; aDlg->show(); break; @@ -239,7 +242,7 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID) MESSAGE("command " << theCommandID << " activated"); QString IterParentName=HOMARD_QT_COMMUN::SelectionArbreEtude(QString("IterationHomard"), 0); MESSAGE("IterParentName " << IterParentName.toStdString().c_str() << " choisi dans arbre"); - MonCreateIteration *IterDlg = new MonCreateIteration( parent, true, + MonCreateIteration *IterDlg = new MonCreateIteration( parent, true, HOMARD::HOMARD_Gen::_duplicate(homardGen), IterParentName ) ; IterDlg->show(); break; @@ -256,9 +259,8 @@ bool HOMARDGUI::OnGUIEvent (int theCommandID) } catch( SALOME::SALOME_Exception& S_ex ) { - QMessageBox::information( 0, "Error", - QString(CORBA::string_dup(S_ex.details.text)), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QString(CORBA::string_dup(S_ex.details.text)) ); getApp()->updateObjectBrowser(); return false; } @@ -398,13 +400,13 @@ void HOMARDGUI::windows( QMap& theMap ) const void HOMARDGUI::setOrb() //============================================================================= { - try + try { ORB_INIT &init = *SINGLETON_::Instance(); ASSERT(SINGLETON_::IsAlreadyExisting()); _orb = init( 0 , 0 ); - } - catch (...) + } + catch (...) { INFOS("internal error : orb not found"); _orb = 0; @@ -420,7 +422,7 @@ _PTR(SObject) HOMARDGUI::chercheMonObjet() _PTR(SObject) obj; SALOME_ListIO lst; getApp()->selectionMgr()->selectedObjects( lst ); - if ( lst.Extent() == 1 ) + if ( lst.Extent() == 1 ) { Handle(SALOME_InteractiveObject) io = lst.First(); SalomeApp_Study* appStudy = dynamic_cast( application()->activeStudy() ); @@ -436,7 +438,7 @@ _PTR(SObject) HOMARDGUI::chercheMonObjet() void HOMARDGUI::contextMenuPopup( const QString& client, QMenu* menu, QString& title ) //============================================================================= { - MESSAGE("Debut de contextMenuPopup"); + MESSAGE("Debut de HOMARDGUI::contextMenuPopup"); _PTR(SObject) obj = chercheMonObjet(); if ( obj ) { @@ -447,41 +449,41 @@ void HOMARDGUI::contextMenuPopup( const QString& client, QMenu* menu, QString& t if ( HOMARD_UTILS::isBoundaryAn(obj) ) { QPixmap pix = resMgr->loadPixmap( "HOMARD", "whatis.png" ); - menu->addAction(QIcon(pix), "Edit boundary", this,SLOT(EditBoDi())); + menu->addAction(QIcon(pix), tr(QString("HOM_MEN_EDIT_BOUNDARY").toLatin1().data()), this,SLOT(EditBoDi())); } else if ( HOMARD_UTILS::isBoundaryDi(obj) ) { QPixmap pix = resMgr->loadPixmap( "HOMARD", "whatis.png" ); - menu->addAction(QIcon(pix), "Edit boundary", this,SLOT(EditBoDi())); + menu->addAction(QIcon(pix), tr(QString("HOM_MEN_EDIT_BOUNDARY").toLatin1().data()), this,SLOT(EditBoDi())); } else if ( HOMARD_UTILS::isZone(obj) ) { QPixmap pix = resMgr->loadPixmap( "HOMARD", "whatis.png" ); - menu->addAction(QIcon(pix), "Edit zone", this,SLOT(EditZone())); + menu->addAction(QIcon(pix), tr(QString("HOM_MEN_EDIT_ZONE").toLatin1().data()), this,SLOT(EditZone())); } else if ( HOMARD_UTILS::isHypo(obj) ) { QPixmap pix = resMgr->loadPixmap( "HOMARD", "whatis.png" ); - menu->addAction(QIcon(pix), "Edit hypothesis", this,SLOT(EditHypo())); + menu->addAction(QIcon(pix), tr(QString("HOM_MEN_EDIT_HYPO").toLatin1().data()), this,SLOT(EditHypo())); } else if ( HOMARD_UTILS::isIter(obj) ) { QPixmap pix = resMgr->loadPixmap( "HOMARD", "iter_next.png" ); - menu->addAction(QIcon(pix), "Next iteration", this,SLOT(NextIter())); + menu->addAction(QIcon(pix), tr(QString("HOM_MEN_NEW_ITERATION").toLatin1().data()), this,SLOT(NextIter())); QPixmap pix1 = resMgr->loadPixmap( "HOMARD", "whatis.png" ); - menu->addAction(QIcon(pix1), "Edit iteration", this,SLOT(EditIter())); + menu->addAction(QIcon(pix1), tr(QString("HOM_MEN_EDIT_ITERATION").toLatin1().data()), this,SLOT(EditIter())); QPixmap pix2 = resMgr->loadPixmap( "HOMARD", "mesh_compute.png" ); - menu->addAction(QIcon(pix2), "Compute", this,SLOT(LanceCalcul())); + menu->addAction(QIcon(pix2), tr(QString("HOM_MEN_COMPUTE").toLatin1().data()), this,SLOT(LanceCalcul())); } else if ( HOMARD_UTILS::isCase(obj) ) { QPixmap pix = resMgr->loadPixmap( "HOMARD", "whatis.png" ); - menu->addAction(QIcon(pix), "Edit case", this,SLOT(EditCase())); + menu->addAction(QIcon(pix), tr(QString("HOM_MEN_EDIT_CASE").toLatin1().data()), this,SLOT(EditCase())); } else if ( HOMARD_UTILS::isFileMess(obj) or HOMARD_UTILS::isFileSummary(obj) ) { QPixmap pix = resMgr->loadPixmap( "HOMARD", "texte.png" ); - menu->addAction(QIcon(pix), "Show file", this,SLOT(EditAsciiFile())); + menu->addAction(QIcon(pix), tr(QString("HOM_MEN_EDIT_MESS_FILE").toLatin1().data()), this,SLOT(EditAsciiFile())); } } } @@ -501,9 +503,9 @@ void HOMARDGUI::EditCase() this->OnGUIEvent(1120); } -void HOMARDGUI::EditIter() +void HOMARDGUI::EditIter() { - this->OnGUIEvent(1121); + this->OnGUIEvent(1121); } void HOMARDGUI::EditHypo() diff --git a/src/HOMARDGUI/HOMARD_icons.po b/src/HOMARDGUI/HOMARD_icons.po deleted file mode 100644 index b386757a..00000000 --- a/src/HOMARDGUI/HOMARD_icons.po +++ /dev/null @@ -1,11 +0,0 @@ -# This is a Qt message file in .po format. Each msgid starts with -# a scope. This scope should *NOT* be translated - eg. "Foo::Bar" -# would be translated to "Pub", not "Foo::Pub". -msgid "" -msgstr "" -"Project-Id-Version: PROJECT VERSION\n" -"POT-Creation-Date: 2002-05-28 10:57:43 AM CEST\n" -"PO-Revision-Date: YYYY-MM-DD\n" -"Last-Translator: FULLNAME \n" -"Content-Type: text/plain; charset=iso-8859-1\n" - diff --git a/src/HOMARDGUI/HOMARD_msg_en.po b/src/HOMARDGUI/HOMARD_msg_en.po deleted file mode 100644 index eea471a9..00000000 --- a/src/HOMARDGUI/HOMARD_msg_en.po +++ /dev/null @@ -1,111 +0,0 @@ -# This is a Qt message file in .po format. Each msgid starts with -# a scope. This scope should *NOT* be translated - eg. translating -# from French to English, "Foo::Bar" would be translated to "Pub", -# not "Foo::Pub". -msgid "" -msgstr "" -"Project-Id-Version: PROJECT VERSION\n" -"POT-Creation-Date: 2003-11-19 03:10:19 PM CET\n" -"PO-Revision-Date: YYYY-MM-DD\n" -"Last-Translator: FULLNAME \n" -"Content-Type: text/plain; charset=iso-8859-1\n" - -#: HOMARDGUI.cxx:76 -msgid "HOMARDGUI::BUT_OK" -msgstr "OK" - -#: HOMARDGUI.cxx:76 -msgid "HOMARDGUI::INF_HOMARD_BANNER" -msgstr "HOMARD Information" - -#: HOMARDGUI.cxx:76 -msgid "HOMARDGUI::INF_HOMARD_MENU" -msgstr "This is just a test" - -#: HOMARDGUI.cxx:57 -msgid "HOMARDGUI::QUE_HOMARD_LABEL" -msgstr "Name Import" - -#: HOMARDGUI.cxx:57 -msgid "HOMARDGUI::QUE_HOMARD_NAME" -msgstr "Please, Enter your name" - -msgid "PREF_GROUP_GENERAL" -msgstr "General" - -msgid "PREF_TAB_SETTINGS" -msgstr "Settings" - -msgid "PREF_TEST" -msgstr "Pascale" - - -#------------------------------------------------------------------------- -# MEN -#------------------------------------------------------------------------- - -msgid "MEN_HOMARD" -msgstr "HOMARD" - -msgid "ROOT_INFO" -msgstr "Informations" - -#----------- Menu bar ----------# -#------ MEN -----# -msgid "MEN_EDIT" -msgstr "Edition d un fichier de commande Homard par Eficas" - -msgid "MEN_INFO" -msgstr "Information Maillage (interactif)" - -msgid "MEN_ADAPT_GESTION" -msgstr "Adaptation : gestion d une iteration" - -msgid "MEN_ADAPT_CREATION" -msgstr "Adaptation : creation du cas" - -msgid "MEN_UNIFORME" -msgstr "Raffiment Uniforme" - -msgid "MEN_POURLESNULS" -msgstr "Homard Pour Les Nuls" - -msgid "SSM_AVANCE" -msgstr "Utilisation Avancee" - -#----------- Menu bar ----------# -#------ MEN -----# -msgid "MEN_EDIT" -msgstr "Edition d un fichier de commande Homard par Eficas" - -msgid "MEN_INFO" -msgstr "Information Maillage (interactif)" - -msgid "MEN_ADAPT_GESTION" -msgstr "Adaptation : gestion d une iteration" - -msgid "MEN_ADAPT_CREATION" -msgstr "Adaptation : creation du cas" - - -#------ STB -----# -msgid "STB_EDIT" -msgstr "Lance Eficas pour editer le fichier de commande Homard" - -msgid "STB_INFO" -msgstr "Information Homard (interactif)" - -msgid "STB_ADAPT_GESTION" -msgstr "Adaptation Homard" - -msgid "STB_ADAPT_CREATION" -msgstr "Creation d un cas Homard" - - -#-------Popup Menu ----------------# -msgid "MEN_FILE_EDIT" -msgstr "Edition" -msgid "TOP_FILE_EDIT" -msgstr "Edition" -msgid "MEN_FILE_EDIT" -msgstr "Edition" diff --git a/src/HOMARDGUI/HOMARD_msg_en.ts b/src/HOMARDGUI/HOMARD_msg_en.ts index bcc2452b..6f5f7684 100644 --- a/src/HOMARDGUI/HOMARD_msg_en.ts +++ b/src/HOMARDGUI/HOMARD_msg_en.ts @@ -1,69 +1,319 @@ + - - - - @default - - MEN_HOMARD - HOMARD - - - MEN_NEW_CASE - New case - - - MEN_NEW_ITERATION - Next iteration - - - MEN_COMPUTE - Compute - - - MEN_EDIT_CASE - Edit case - - - MEN_EDIT_ITERATION - Edit iteration - - - MEN_EDIT_HYPO - Edit hypothesis - - - MEN_EDIT_ZONE - Edit zone - - - MEN_EDIT_BOUNDARY - Edit boundary - - - MEN_EDIT_MESS_FILE - Show file - - + + + @default + + HOM_MEN_HOMARD + HOMARD + + + HOM_MEN_NEW_CASE + New case + + + HOM_MEN_NEW_ITERATION + Next iteration + + + HOM_MEN_COMPUTE + Compute + + + HOM_MEN_EDIT_CASE + Edit the case + + + HOM_MEN_EDIT_ITERATION + Edit the iteration + + + HOM_MEN_EDIT_HYPO + Edit the hypothesis + + + HOM_MEN_EDIT_ZONE + Edit the zone + + + HOM_MEN_EDIT_BOUNDARY + Edit the boundary + + + HOM_MEN_EDIT_MESS_FILE + Show the file + + + HOM_TOP_HOMARD + HOMARD + + + HOM_TOP_NEW_CASE + New case + + + HOM_TOP_NEW_ITERATION + Next iteration + + + HOM_TOP_COMPUTE + Compute + + + HOM_TOP_EDIT_CASE + Edit the case + + + HOM_TOP_EDIT_ITERATION + Edit the iteration + + + HOM_TOP_EDIT_HYPO + Edit the hypothesis + + + HOM_TOP_EDIT_ZONE + Edit the zone + + + HOM_TOP_EDIT_BOUNDARY + Edit the boundary + + + HOM_TOP_EDIT_MESS_FILE + Show the file + + + HOM_STB_HOMARD + HOMARD + + + HOM_STB_NEW_CASE + New case + + + HOM_STB_NEW_ITERATION + Next iteration + + + HOM_STB_COMPUTE + Compute + + + HOM_STB_EDIT_CASE + Edit the case + + + HOM_STB_EDIT_ITERATION + Edit the iteration + + + HOM_STB_EDIT_HYPO + Edit the hypothesis + + + HOM_STB_EDIT_ZONE + Edit the zone + + + HOM_STB_EDIT_BOUNDARY + Edit the boundary + + + HOM_STB_EDIT_MESS_FILE + Show the file + + + HOM_WARNING + Warning + + + HOM_ERROR + Error + + + HOM_INACTIVE_BUTTON + Inactive button + + + HOM_SELECT_OBJECT_1 + Select an object. + + + HOM_SELECT_OBJECT_2 + Select only one object. + + + HOM_SELECT_OBJECT_3 + Select an object with type %1. + + + HOM_SELECT_FILE_1 + Select a file. + + + HOM_SELECT_FILE_2 + Select only one file. + + + HOM_MED_FILE_1 + This MED file cannot be read. + + + HOM_MED_FILE_2 + No mesh in this MED file. + + + HOM_MED_FILE_3 + More than one mesh in this MED file. + + + HOM_MED_FILE_4 + The mesh in this MED file cannot be read. + + + HOM_MED_FILE_5 + No field in this MED file. + + + HOM_MED_FILE_6 + The field(s) in this MED file cannot be read. + + + HOM_SELECT_STUDY + Select a study object with associated MED file \n or select a MED file. + + + HOM_CASE_NAME + The case must be named. + + + HOM_CASE_DIRECTORY_1 + A directory for the case must be selected. + + + HOM_CASE_DIRECTORY_2 + This directory is already used. + + + HOM_CASE_DIRECTORY_3 + A valid directory for the case must be selected. + + + HOM_CASE_MESH + The file of the initial mesh must be selected. + + + HOM_CASE_GROUP + The group "%1" cannot be given for more than 1 boundary. + + + HOM_CASE_EDIT_WINDOW_TITLE + Edition of a case + + + HOM_ITER_NAME + The iteration must be named. + + + HOM_ITER_STARTING_POINT + The previous iteration must be given. + + + HOM_ITER_MESH + Give a name for the final mesh. + + + HOM_ITER_HYPO + An hypothesis must be selected. + + + HOM_ITER_FIELD_FILE + With this hypothesis, a file for the field must be given. + + + HOM_ITER_STARTING_POINT_0 + Mesh + + + HOM_ITER_STARTING_POINT_1 + First iteration of the case + + + HOM_ITER_EDIT_WINDOW_TITLE + Edition of an iteration + + + HOM_HYPO_NAME + The hypothesis must be named. + + + HOM_HYPO_FIELD_FILE + A file for the field must be given. + + + HOM_HYPO_ZONE_1 + A zone must be selected. + + + HOM_HYPO_ZONE_2 + At least, one zone must be selected. + + + HOM_HYPO_NORM_L2 + L2 norm + + + HOM_HYPO_NORM_INF + Infinite norm + + + HOM_HYPO_NORM_ABS + Absolute + + + HOM_HYPO_NORM_REL + Relative + + + HOM_HYPO_COMP + At least, one component must be selected. + + + HOM_HYPO_EDIT_WINDOW_TITLE + Edition of an hypothesis + + + HOM_ZONE_NAME + The zone must be named. + + + HOM_ZONE_LIMIT + %1 maxi must be greater than %1 mini. + + + HOM_ZONE_EDIT_WINDOW_TITLE + Edition of a zone + + + HOM_BOUN_NAME + The boundary must be named. + + + HOM_BOUN_MESH + The file for the mesh of the boundary must be selected. + + + HOM_BOUN_CASE + The meshfile of the case is unknown. + + + HOM_BOUN_A_EDIT_WINDOW_TITLE + Edition of an analytical boundary + + + HOM_BOUN_D_EDIT_WINDOW_TITLE + Edition of a discrete boundary + + diff --git a/src/HOMARDGUI/HOMARD_msg_fr.po b/src/HOMARDGUI/HOMARD_msg_fr.po deleted file mode 100644 index 9023c6a0..00000000 --- a/src/HOMARDGUI/HOMARD_msg_fr.po +++ /dev/null @@ -1,31 +0,0 @@ -# This is a Qt message file in .po format. Each msgid starts with -# a scope. This scope should *NOT* be translated - eg. translating -# from French to English, "Foo::Bar" would be translated to "Pub", -# not "Foo::Pub". -msgid "" -msgstr "" -"Project-Id-Version: PROJECT VERSION\n" -"POT-Creation-Date: 2003-11-19 03:10:25 PM CET\n" -"PO-Revision-Date: YYYY-MM-DD\n" -"Last-Translator: FULLNAME \n" -"Content-Type: text/plain; charset=iso-8859-1\n" - -#: HOMARDGUI.cxx:76 -msgid "HOMARDGUI::BUT_OK" -msgstr "OK" - -#: HOMARDGUI.cxx:76 -msgid "HOMARDGUI::INF_HOMARD_BANNER" -msgstr "Information HOMARD" - -#: HOMARDGUI.cxx:76 -msgid "HOMARDGUI::INF_HOMARD_MENU" -msgstr "Ceci est un simple test" - -#: HOMARDGUI.cxx:57 -msgid "HOMARDGUI::QUE_HOMARD_LABEL" -msgstr "Import Prénom" - -#: HOMARDGUI.cxx:57 -msgid "HOMARDGUI::QUE_HOMARD_NAME" -msgstr "Entrez votre prénom, s'il vous plait" diff --git a/src/HOMARDGUI/HOMARD_msg_fr.ts b/src/HOMARDGUI/HOMARD_msg_fr.ts index 9a1a4271..5e0bbe15 100644 --- a/src/HOMARDGUI/HOMARD_msg_fr.ts +++ b/src/HOMARDGUI/HOMARD_msg_fr.ts @@ -1,65 +1,619 @@ + - - - - @default - - MEN_HOMARD - HOMARD - - - MEN_NEW_CASE - New case - - - MEN_NEW_ITERATION - New iteration - - - MEN_COMPUTE - Compute - - - MEN_EDIT_CASE - Edit case - - - MEN_EDIT_ITERATION - Edit iteration - - - MEN_EDIT_HYPO - Edit hypothesis - - - MEN_EDIT_ZONE - Edit zone - - - MEN_EDIT_BOUNDARY - Edit boundary - - + + + @default + + HOM_MEN_HOMARD + HOMARD + + + HOM_MEN_NEW_CASE + Nouveau cas + + + HOM_MEN_NEW_ITERATION + Nouvelle itération + + + HOM_MEN_COMPUTE + Calculer + + + HOM_MEN_EDIT_CASE + Editer le cas + + + HOM_MEN_EDIT_ITERATION + Editer l'itération + + + HOM_MEN_EDIT_HYPO + Editer l'hypothèse + + + HOM_MEN_EDIT_ZONE + Editer la zone + + + HOM_MEN_EDIT_BOUNDARY + Editer la frontière + + + HOM_MEN_EDIT_MESS_FILE + Afficher le fichier + + + HOM_TOP_HOMARD + HOMARD + + + HOM_TOP_NEW_CASE + Nouveau cas + + + HOM_TOP_NEW_ITERATION + Nouvelle itération + + + HOM_TOP_COMPUTE + Calculer + + + HOM_TOP_EDIT_CASE + Editer le cas + + + HOM_TOP_EDIT_ITERATION + Editer l'itération + + + HOM_TOP_EDIT_HYPO + Editer l'hypothèse + + + HOM_TOP_EDIT_ZONE + Editer la zone + + + HOM_TOP_EDIT_BOUNDARY + Editer la frontière + + + HOM_TOP_EDIT_MESS_FILE + Afficher le fichier + + + HOM_STB_HOMARD + HOMARD + + + HOM_STB_NEW_CASE + Nouveau cas + + + HOM_STB_NEW_ITERATION + Nouvelle itération + + + HOM_STB_COMPUTE + Calculer + + + HOM_STB_EDIT_CASE + Editer le cas + + + HOM_STB_EDIT_ITERATION + Editer l'itération + + + HOM_STB_EDIT_HYPO + Editer l'hypothèse + + + HOM_STB_EDIT_ZONE + Editer la zone + + + HOM_STB_EDIT_BOUNDARY + Editer la frontière + + + HOM_STB_EDIT_MESS_FILE + Afficher le fichier + + + HOM_WARNING + Avertissement + + + HOM_ERROR + Erreur + + + HOM_INACTIVE_BUTTON + Bouton inactif + + + OK + Appliquer et fermer + + + Apply + Appliquer + + + Cancel + Annuler + + + Help + Aide + + + New + Nouveau + + + Edit + Editer + + + Quit + Quitter + + + Name + Nom + + + Directory + Répertoire + + + Mesh + Maillage + + + Selection + Sélection + + + None + Aucun + + + All + Tout + + + HOM_SELECT_OBJECT_1 + Selectionner un objet. + + + HOM_SELECT_OBJECT_2 + Selectionner un seul objet. + + + HOM_SELECT_OBJECT_3 + Selectionner un objet de type %1. + + + HOM_SELECT_FILE_1 + Selectionner un fichier. + + + HOM_SELECT_FILE_2 + Selectionner un seul fichier. + + + HOM_MED_FILE_1 + Ce fichier MED est illisible. + + + HOM_MED_FILE_2 + Ce fichier MED ne contient aucun maillage. + + + HOM_MED_FILE_3 + Ce fichier MED contient plus d'un maillage. + + + HOM_MED_FILE_4 + Impossible de lire le maillage de ce fichier MED. + + + HOM_MED_FILE_5 + Ce fichier MED ne contient aucun champ. + + + HOM_MED_FILE_6 + Impossible de lire le(s) champ(s) de ce fichier MED. + + + HOM_SELECT_STUDY + Selectionner une étude avec un fichier MED associé\n ou sélectionner un fichier MED. + + + Create a case + Création d'un cas + + + HOM_CASE_NAME + Il faut donner un nom au cas. + + + HOM_CASE_DIRECTORY_1 + Il faut choisir un répertoire de travail pour le cas. + + + HOM_CASE_DIRECTORY_2 + Ce répertoire est déjà utilisé. + + + HOM_CASE_DIRECTORY_3 + Un répertoire valide doit être choisi. + + + HOM_CASE_MESH + Il faut choisir le maillage initial. + + + HOM_CASE_GROUP + Le groupe "%1" ne peut pas être attribué à plus d'une frontière. + + + HOM_CASE_EDIT_WINDOW_TITLE + Edition d'un cas + + + HOM_ITER_NAME + Il faut donner un nom à l'itération. + + + HOM_ITER_STARTING_POINT + Il faut désigner l'itération précédente. + + + HOM_ITER_MESH + Donner le nom du maillage final. + + + HOM_ITER_HYPO + Choisir une hypothèse. + + + HOM_ITER_FIELD_FILE + Avec cette hypothese, il faut fournir le fichier du champ. + + + HOM_ITER_STARTING_POINT_0 + Maillage + + + HOM_ITER_STARTING_POINT_1 + Itération initiale du cas + + + HOM_ITER_EDIT_WINDOW_TITLE + Edition d'une itération + + + Discrete boundary + Frontière discrète + + + Analytical boundary + Frontière analytique + + + Conformity type + Type de conformité + + + Conformal + Conforme + + + Non conformal + Non conforme + + + Non conformal option + Option de non conformité + + + Free + Libre + + + 1 hanging node per mesh + 1 noeud pendant par maille + + + 1 node per edge + 1 noeud pendant par arête + + + Create an iteration + Création d'une itération + + + Iteration Name + Nom de l'itération + + + Previous iteration + Itération précédente + + + Mesh n + Maillage n + + + Mesh n+1 + Maillage n+1 + + + Field information + Information sur les champs + + + Field file + Fichier des champs + + + No time step + Sans pas de temps + + + Last time step + Dernier pas de temps + + + Chosen time step + Pas de temps choisi + + + Time step + Pas de temps + + + Rank + Numéro d'ordre + + + Hypothesis + Hypothèse + + + Create an hypothesis + Création d'une hypothèse + + + HOM_HYPO_NAME + Il faut donner un nom à l'hypothèse. + + + HOM_HYPO_FIELD_FILE + Il faut fournir le fichier du champ. + + + HOM_HYPO_ZONE_1 + Choisir une zone. + + + HOM_HYPO_ZONE_2 + Il faut choisir au moins une zone. + + + HOM_HYPO_COMP + Il faut choisir au moins une composante. + + + HOM_HYPO_NORM_L2 + Norme L2 + + + HOM_HYPO_NORM_INF + Norme infinie + + + HOM_HYPO_NORM_ABS + Absolu + + + HOM_HYPO_NORM_REL + Relatif + + + HOM_HYPO_EDIT_WINDOW_TITLE + Edition d'une hypothèse + + + Type of adaptation + Type d'adaptation + + + Uniform + Uniforme + + + Driven by a field + Pilotage par un champ + + + With geometrical zones + Selon des zones géométriques + + + Uniform adaptation + Adaptation uniforme + + + Coarsening + Déraffinement + + + Refinement + Raffinement + + + File of the fields + Fichier des champs + + + Governing field for the adaptation + Champ pilotant l'adaptation + + + Field name + Nom du champ + + + Component + Composante + + + Refinement threshold + Seuil de raffinement + + + Coarsening threshold + Seuil de déraffinement + + + Percentage of meshes + Pourcentage de mailles + + + No refinement + Sans raffinement + + + No coarsening + Sans déraffinement + + + Zone management + Gestion des zones + + + Zone name + Nom de la zone + + + Field Interpolation + Interpolation des champs + + + Chosen + Choisi + + + Create a zone + Création d'une zone + + + HOM_ZONE_NAME + Il faut donner un nom à la zone. + + + HOM_ZONE_LIMIT + %1 maxi doit être plus grand que %1 mini. + + + HOM_ZONE_EDIT_WINDOW_TITLE + Edition d'une zone + + + Type of zone + Type de la zone + + + Coordinates + Coordonnées + + + Create an analytical boundary + Création d'une frontière analytique + + + Create a discrete boundary + Création d'une frontière discrète + + + Type of boundary + Type de la frontière + + + Coordinates of the cylindre + Coordonnées du cylindre + + + Coordinates of the sphere + Coordonnées de la sphère + + + Radius + Rayon + + + X axis + X axe + + + Y axis + Y axe + + + Z axis + Z axe + + + HOM_BOUN_NAME + Il faut donner un nom à la frontière. + + + HOM_BOUN_MESH + Il faut choisir le maillage qui contient la frontière. + + + HOM_BOUN_CASE + Le fichier du maillage du cas est inconnu. + + + HOM_BOUN_A_EDIT_WINDOW_TITLE + Edition d'une frontière analytique + + + HOM_BOUN_D_EDIT_WINDOW_TITLE + Edition d'une frontière discrète + + + Filtering with groups + Filtrage par les groupes + + + Selection of groups + Choix des groupes + + + Selected groups + Groupes choisis + + + Group + Groupe + + + Edit a file + Affichage d'un fichier + + + Print + Imprimer + + diff --git a/src/HOMARDGUI/HomardQtCommun.cxx b/src/HOMARDGUI/HomardQtCommun.cxx index 08ae65d5..79746df4 100644 --- a/src/HOMARDGUI/HomardQtCommun.cxx +++ b/src/HOMARDGUI/HomardQtCommun.cxx @@ -15,7 +15,7 @@ #include "SalomeApp_Tools.h" using namespace std; -extern "C" +extern "C" { #include } @@ -30,141 +30,145 @@ QString HOMARD_QT_COMMUN::SelectionArbreEtude(QString commentaire, int grave ) // Si grave = 0, ce n'est pas grave de ne rien trouver et pas de message // Si grave = 1, ce n'est pas grave de ne rien trouver mais on emet un message { - int nbSel = HOMARD_UTILS::IObjectCount() ; - if ( nbSel == 0 ) - { - if ( grave == 1 ) - { - QMessageBox::information( 0, "Bad selection", - QString("Select an object."), - QMessageBox::Ok + QMessageBox::Default ); - } - return QString(""); - } - if ( nbSel > 1 ) - { - QMessageBox::information( 0, "Bad selection", - QString("Select one object only."), - QMessageBox::Ok + QMessageBox::Default ); - return QString(""); + int nbSel = HOMARD_UTILS::IObjectCount() ; + if ( nbSel == 0 ) + { + if ( grave == 1 ) + { + QMessageBox::warning( 0, QObject::tr("HOM_WARNING"), + QObject::tr("HOM_SELECT_OBJECT_1") ); } - - Handle(SALOME_InteractiveObject) aIO = HOMARD_UTILS::firstIObject(); - if ( aIO->hasEntry() ) + return QString(""); + } + if ( nbSel > 1 ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_SELECT_OBJECT_2") ); + return QString(""); + } +// + Handle(SALOME_InteractiveObject) aIO = HOMARD_UTILS::firstIObject(); + if ( aIO->hasEntry() ) + { + _PTR(Study) aStudy = HOMARD_UTILS::GetActiveStudyDocument(); + _PTR(SObject) aSO ( aStudy->FindObjectID( aIO->getEntry() ) ); + _PTR(GenericAttribute) anAttr; + if (aSO->FindAttribute(anAttr, "AttributeComment") ) { - _PTR(Study) aStudy = HOMARD_UTILS::GetActiveStudyDocument(); - _PTR(SObject) aSO ( aStudy->FindObjectID( aIO->getEntry() ) ); - _PTR(GenericAttribute) anAttr; - if (aSO->FindAttribute(anAttr, "AttributeComment") ) + _PTR(AttributeComment) attributComment = anAttr; + QString aComment= QString(attributComment->Value().data()); + int iteration = aComment.lastIndexOf(commentaire); + if ( iteration !=0 ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_SELECT_OBJECT_3").arg(commentaire) ); + return QString(""); + } + if (aSO->FindAttribute(anAttr, "AttributeName") ) { - _PTR(AttributeComment) attributComment = anAttr; - QString aComment= QString(attributComment->Value().data()); - int iteration = aComment.lastIndexOf(commentaire); - if ( iteration !=0 ) - { - QString message=QString("Select an object : "); - message += commentaire; - QMessageBox::information( 0, "Bad selection", message, - QMessageBox::Ok + QMessageBox::Default ); - return QString(""); - } - if (aSO->FindAttribute(anAttr, "AttributeName") ) - { - _PTR(AttributeName) attributName = anAttr; - QString aName= QString(attributName->Value().data()); - return aName; - } + _PTR(AttributeName) attributName = anAttr; + QString aName= QString(attributName->Value().data()); + return aName; } } - return QString(""); + } +// + return QString(""); } // ======================================================================= QString HOMARD_QT_COMMUN::SelectionCasEtude() // ======================================================================= { - QString aName = QString(""); - int nbSel = HOMARD_UTILS::IObjectCount() ; - if ((nbSel > 1) or ( nbSel == 0 )) - { - QMessageBox::information( 0, "Bad selection", - QString("Select one object only"), - QMessageBox::Ok + QMessageBox::Default ); - return QString(""); + QString aName = QString(""); + int nbSel = HOMARD_UTILS::IObjectCount() ; + if ( nbSel == 0 ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_SELECT_OBJECT_1") ); + return QString(""); + } + if ( nbSel > 1 ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_SELECT_OBJECT_2") ); + return QString(""); + } + Handle(SALOME_InteractiveObject) aIO = HOMARD_UTILS::firstIObject(); + if ( aIO->hasEntry() ) + { + _PTR(Study) aStudy = HOMARD_UTILS::GetActiveStudyDocument(); + _PTR(SObject) aSO ( aStudy->FindObjectID( aIO->getEntry() ) ); + _PTR(SObject) aSObjCas = aSO->GetFather(); + _PTR(GenericAttribute) anAttr; + if (aSObjCas->FindAttribute(anAttr, "AttributeName") ) + { + _PTR(AttributeName) attributName = anAttr; + aName= QString(attributName->Value().data()); + } + return aName; } - Handle(SALOME_InteractiveObject) aIO = HOMARD_UTILS::firstIObject(); - if ( aIO->hasEntry() ) - { - _PTR(Study) aStudy = HOMARD_UTILS::GetActiveStudyDocument(); - _PTR(SObject) aSO ( aStudy->FindObjectID( aIO->getEntry() ) ); - _PTR(SObject) aSObjCas = aSO->GetFather(); - _PTR(GenericAttribute) anAttr; - if (aSObjCas->FindAttribute(anAttr, "AttributeName") ) - { - _PTR(AttributeName) attributName = anAttr; - aName= QString(attributName->Value().data()); - } - return aName; - } - return QString(""); + return QString(""); } // ======================================================================= QString HOMARD_QT_COMMUN::PushNomFichier(bool avertir) // ======================================================================= -// Gestion les boutons qui permettent de +// Gestion les boutons qui permettent de // 1) retourne le nom d'un fichier par une fenetre de dialogue si aucun // objet est selectionne dans l arbre d etude -// 2) retourne le nom du fichier asocie a l objet +// 2) retourne le nom du fichier asocie a l objet // selectionne dans l arbre d etude { - MESSAGE("HOMARD_QT_COMMUN::PushNomFichier"); - QString aFile=QString::null; - int nbSel = HOMARD_UTILS::IObjectCount() ; - if ( nbSel == 0 ) - { - aFile = QFileDialog::getOpenFileName(0,QString("File Selection"),QString("") ,QString("Med files (*.med);;all (*) ") ); - } - if (nbSel > 1) - { - QMessageBox::information( 0, "Bad selection", - QString("Select one file only"), - QMessageBox::Ok + QMessageBox::Default ); - } - if (nbSel == 1) - { - Handle(SALOME_InteractiveObject) aIO = HOMARD_UTILS::firstIObject(); - if ( aIO->hasEntry() ) - { - _PTR(Study) aStudy = HOMARD_UTILS::GetActiveStudyDocument(); - _PTR(SObject) aSO ( aStudy->FindObjectID( aIO->getEntry() ) ); - _PTR(GenericAttribute) anAttr; - _PTR(AttributeFileType) aFileType; - _PTR(AttributeExternalFileDef) aFileName; - if (aSO) { - if (aSO->FindAttribute(anAttr, "AttributeFileType") ) { - aFileType=anAttr; - QString fileType=QString(aFileType->Value().data()); - if ( fileType==QString("FICHIERMED")) { - if (aSO->FindAttribute(anAttr,"AttributeExternalFileDef")) { - aFileName=anAttr; - aFile= QString(aFileName->Value().data()); } } } } } - - if ( aFile==QString::null ) - { - if (avertir ) { - QMessageBox::information( 0, "Bad selection", - QString(" Select a study object with associated MED file \n or a MED file"), - QMessageBox::Ok + QMessageBox::Default ); + MESSAGE("HOMARD_QT_COMMUN::PushNomFichier"); + QString aFile=QString::null; + int nbSel = HOMARD_UTILS::IObjectCount() ; + if ( nbSel == 0 ) + { + aFile = QFileDialog::getOpenFileName(0,QString("File Selection"),QString("") ,QString("Med files (*.med);;all (*) ") ); + } + if (nbSel > 1) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_SELECT_FILE_2") ); + } + if (nbSel == 1) + { + Handle(SALOME_InteractiveObject) aIO = HOMARD_UTILS::firstIObject(); + if ( aIO->hasEntry() ) + { + _PTR(Study) aStudy = HOMARD_UTILS::GetActiveStudyDocument(); + _PTR(SObject) aSO ( aStudy->FindObjectID( aIO->getEntry() ) ); + _PTR(GenericAttribute) anAttr; + _PTR(AttributeFileType) aFileType; + _PTR(AttributeExternalFileDef) aFileName; + if (aSO) { + if (aSO->FindAttribute(anAttr, "AttributeFileType") ) { + aFileType=anAttr; + QString fileType=QString(aFileType->Value().data()); + if ( fileType==QString("FICHIERMED")) { + if (aSO->FindAttribute(anAttr,"AttributeExternalFileDef")) { + aFileName=anAttr; + aFile= QString(aFileName->Value().data()); } } - aFile = QFileDialog::getOpenFileName(); - if (!aFile.isEmpty()) - { - aFile=aFile; - } + } } - } - return aFile; + } + + if ( aFile==QString::null ) + { + if ( avertir ) { + QMessageBox::warning( 0, QObject::tr("HOM_WARNING"), + QObject::tr("HOM_SELECT_STUDY") ); + } + aFile = QFileDialog::getOpenFileName(); + if (!aFile.isEmpty()) + { + aFile=aFile; + } + } + } + return aFile; } @@ -174,33 +178,35 @@ int HOMARD_QT_COMMUN::OuvrirFichier(QString aFile) // ======================================================================= // renvoie le medId associe au fichier Med apres ouverture { - int MedIdt = MEDouvrir(const_cast(aFile.toStdString().c_str()),MED_LECTURE); - if (MedIdt <0) - { - QMessageBox::information( 0, "Bad selection", - QString("MED File is unreadable"), - QMessageBox::Ok + QMessageBox::Default ); - } - return MedIdt; + int MedIdt = MEDouvrir(const_cast(aFile.toStdString().c_str()),MED_LECTURE); + if (MedIdt <0) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_MED_FILE_1") ); + } + return MedIdt; } // ====================================================== QString HOMARD_QT_COMMUN::LireNomMaillage(QString aFile) // ======================================================== { - - int MedIdt = HOMARD_QT_COMMUN::OuvrirFichier(aFile); - int numberOfMeshes = MEDnMaa(MedIdt) ; - if (numberOfMeshes != 1 ) - { - QMessageBox::information( 0, "Bad selection", - QString("MED File contains more than one mesh"), - QMessageBox::Ok + QMessageBox::Default ); - } - - QString nomMaillage= HOMARD_QT_COMMUN::LireNomMaillage(MedIdt,1); - MEDfermer(MedIdt); - return nomMaillage; + int MedIdt = HOMARD_QT_COMMUN::OuvrirFichier(aFile); + int numberOfMeshes = MEDnMaa(MedIdt) ; + if (numberOfMeshes == 0 ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_MED_FILE_2") ); + } + if (numberOfMeshes > 1 ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_MED_FILE_3") ); + } + + QString nomMaillage= HOMARD_QT_COMMUN::LireNomMaillage(MedIdt,1); + MEDfermer(MedIdt); + return nomMaillage; } // ======================================================================= QString HOMARD_QT_COMMUN::LireNomMaillage(int MedIdt ,int MeshId) @@ -214,13 +220,12 @@ QString HOMARD_QT_COMMUN::LireNomMaillage(int MedIdt ,int MeshId) if ( MEDmaaInfo(MedIdt,MeshId,maa,&mdim,&type,desc) < 0 ) { - QMessageBox::information( 0, "Bad selection", - QString("Error : Mesh is unreadable"), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_MED_FILE_4") ); } else { - NomMaillage=QString(maa); + NomMaillage=QString(maa); } return NomMaillage; } @@ -243,7 +248,7 @@ std::list HOMARD_QT_COMMUN::GetListeChamps(QString aFile) SCRUTE(aFile.toStdString()); int MedIdt = HOMARD_QT_COMMUN::OuvrirFichier(aFile); if ( MedIdt < 0 ) { return ListeChamp; } - + // Le fichier Med est lisible // Lecture du maillage @@ -251,35 +256,25 @@ std::list HOMARD_QT_COMMUN::GetListeChamps(QString aFile) med_int ncha = MEDnChamp(MedIdt, 0) ; if (ncha < 1 ) { - QMessageBox::information( 0, "Bad selection", - QString(" Error : Fields are unreadable"), - QMessageBox::Ok + QMessageBox::Default ); - MEDfermer(MedIdt); - return ListeChamp; + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_MED_FILE_5") ); + MEDfermer(MedIdt); + return ListeChamp; } for (int i=0; i< ncha; i++) { - if ((ncomp = MEDnChamp(MedIdt,i+1)) < 0) - { - QMessageBox::information( 0, "Bad selection", - QString("Error : field's componants are unreadable"), - QMessageBox::Ok + QMessageBox::Default ); - MEDfermer(MedIdt); - return ListeChamp; - } - /* Lecture du type du champ, des noms des composantes et du nom de l'unite*/ - comp = (char*) malloc(ncomp*MED_TAILLE_PNOM+1); - unit = (char*) malloc(ncomp*MED_TAILLE_PNOM+1); - if ( MEDchampInfo(MedIdt,i+1,nomcha,&typcha,comp,unit,ncomp) < 0 ) - { - QMessageBox::information( 0, "Bad selection", - QString(" Error : Fields are unreadable"), - QMessageBox::Ok + QMessageBox::Default ); - MEDfermer(MedIdt); - return ListeChamp; - } + ncomp = MEDnChamp(MedIdt,i+1); + comp = (char*) malloc(ncomp*MED_TAILLE_PNOM+1); + unit = (char*) malloc(ncomp*MED_TAILLE_PNOM+1); + if ( MEDchampInfo(MedIdt,i+1,nomcha,&typcha,comp,unit,ncomp) < 0 ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_MED_FILE_6") ); + MEDfermer(MedIdt); + return ListeChamp; + } ListeChamp.push_back(QString(nomcha)); free(comp); @@ -305,49 +300,39 @@ std::list HOMARD_QT_COMMUN::GetListeComposants(QString aFile, QString a int MedIdt = HOMARD_QT_COMMUN::OuvrirFichier(aFile); if ( MedIdt < 0 ) { return ListeComposants; } - + // Lecture du nombre de champs med_int ncha = MEDnChamp(MedIdt, 0) ; if (ncha < 1 ) { - QMessageBox::information( 0, "Bad selection", - QString(" Error : Fields are unreadable"), - QMessageBox::Ok + QMessageBox::Default ); - MEDfermer(MedIdt); - return ListeComposants; + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_MED_FILE_5") ); + MEDfermer(MedIdt); + return ListeComposants; } for (int i=0; i< ncha; i++) { - if ((ncomp = MEDnChamp(MedIdt,i+1)) < 0) - { - QMessageBox::information( 0, "Bad selection", - QString("Error : field's componants are unreadable"), - QMessageBox::Ok + QMessageBox::Default ); - MEDfermer(MedIdt); - return ListeComposants; - } - /* Lecture du type du champ, des noms des composantes et du nom de l'unite*/ + ncomp = MEDnChamp(MedIdt,i+1); comp = (char*) malloc(ncomp*MED_TAILLE_PNOM+1); unit = (char*) malloc(ncomp*MED_TAILLE_PNOM+1); - if ( MEDchampInfo(MedIdt,i+1,nomcha,&typcha,comp,unit,ncomp) < 0 ) + if ( MEDchampInfo(MedIdt,i+1,nomcha,&typcha,comp,unit,ncomp) < 0 ) { - QMessageBox::information( 0, "Bad selection", - QString(" Error : Fields are unreadable"), - QMessageBox::Ok + QMessageBox::Default ); - MEDfermer(MedIdt); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_MED_FILE_6") ); + MEDfermer(MedIdt); return ListeComposants; } if ( QString(nomcha) != aChamp ) { - free(comp); + free(comp); free (unit); continue;} - for (int j = 0; j HOMARD_QT_COMMUN::GetListeComposants(QString aFile, QString a MEDfermer(MedIdt); return ListeComposants; } - -// ======================================================================= -void HOMARD_QT_COMMUN::Recopie(QString aDir, QString aFichier) -// ======================================================================= -{ - if (chdir(aDir.toLatin1()) != 0) - { - if (mkdir(aDir.toLatin1(), S_IRWXU|S_IRGRP|S_IXGRP) != 0) - { - QMessageBox::information( 0, "ERROR", - QString("Unable to create directory."), - QMessageBox::Ok + QMessageBox::Default ); - return; - //ASSERT("Pb a la creation de la directory" == 0); - } - if (chdir(aDir.toLatin1()) != 0) - { - QMessageBox::information( 0, "ERROR", - QString("Unable to access directory."), - QMessageBox::Ok + QMessageBox::Default ); - return; - //ASSERT("Pb pour acceder la directory" == 0); - } - } - QString copie = QString("cp ")+aFichier+QString(" ")+aDir; - system(copie.toLatin1()); -} - -// ======================================================================= -void HOMARD_QT_COMMUN::Creetmp() -// ======================================================================= -{ - QString aDir=QString("/tmp/Homard/"); - if (chdir(aDir.toLatin1()) != 0) - { - if (mkdir(aDir.toLatin1(), S_IRWXU|S_IRGRP|S_IXGRP) != 0) - { - QMessageBox::information( 0, "ERROR", - QString("Unable to create directory /tmp/Homard."), - QMessageBox::Ok + QMessageBox::Default ); - return; - } - if (chdir(aDir.toLatin1()) != 0) - { - QMessageBox::information( 0, "ERROR", - QString("Unable to access directory /tmp/Homard."), - QMessageBox::Ok + QMessageBox::Default ); - return; - } - } -} diff --git a/src/HOMARDGUI/HomardQtCommun.h b/src/HOMARDGUI/HomardQtCommun.h index a7538b99..490ebaa9 100644 --- a/src/HOMARDGUI/HomardQtCommun.h +++ b/src/HOMARDGUI/HomardQtCommun.h @@ -32,9 +32,6 @@ namespace HOMARD_QT_COMMUN std::list GetListeChamps(QString aFile); std::list GetListeComposants(QString aFile, QString aChamp); - void Recopie(QString aDir, QString aFichier); - void Creetmp(); - QString SelectionArbreEtude(QString commentaire, int grave ); QString SelectionCasEtude(); diff --git a/src/HOMARDGUI/Makefile.am b/src/HOMARDGUI/Makefile.am index e46c3acd..cab06942 100644 --- a/src/HOMARDGUI/Makefile.am +++ b/src/HOMARDGUI/Makefile.am @@ -19,11 +19,11 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -# -* Makefile *- -# Author : +# -* Makefile *- +# Author : # Modified by : Alexander BORODIN (OCN) - autotools usage # -# header files +# header files include $(top_srcdir)/adm_local/unix/make_common_starter.am @@ -131,6 +131,5 @@ libHOMARD_la_LDFLAGS = \ # resources files nodist_salomeres_DATA = \ - HOMARD_msg_en.qm -# HOMARD_msg_fr.qm -# HOMARD_icons.qm + HOMARD_msg_en.qm \ + HOMARD_msg_fr.qm diff --git a/src/HOMARDGUI/MonCreateBoundaryAn.cxx b/src/HOMARDGUI/MonCreateBoundaryAn.cxx index 08cd6478..a637685f 100644 --- a/src/HOMARDGUI/MonCreateBoundaryAn.cxx +++ b/src/HOMARDGUI/MonCreateBoundaryAn.cxx @@ -169,9 +169,8 @@ bool MonCreateBoundaryAn::PushOnApply() std::cerr << LEBoundaryName->text().trimmed().toStdString() << std::endl; if (LEBoundaryName->text().trimmed()=="") { - QMessageBox::information( 0, "Error", - "The boundary must be named.", - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_BOUN_NAME") ); return false; } @@ -236,14 +235,13 @@ bool MonCreateBoundaryAn:: CreateOrUpdateBoundaryAn() CORBA::string_dup(_aBoundaryAnName.toStdString().c_str()), \ CORBA::Long(_BoundaryType) ); _parent->addBoundaryAn(_aBoundaryAnName); - } - catch( SALOME::SALOME_Exception& S_ex ) - { - QMessageBox::information( 0, "Error", - QString(CORBA::string_dup(S_ex.details.text)), - QMessageBox::Ok + QMessageBox::Default ); - return false; - } + } + catch( SALOME::SALOME_Exception& S_ex ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QString(CORBA::string_dup(S_ex.details.text)) ); + return false; + } } // Mise en place des attributs aBoundaryAn->SetBoundaryType(_BoundaryType); diff --git a/src/HOMARDGUI/MonCreateBoundaryDi.cxx b/src/HOMARDGUI/MonCreateBoundaryDi.cxx index 2cd27abb..277216f5 100644 --- a/src/HOMARDGUI/MonCreateBoundaryDi.cxx +++ b/src/HOMARDGUI/MonCreateBoundaryDi.cxx @@ -60,9 +60,8 @@ bool MonCreateBoundaryDi::PushOnApply() QString aBoundaryName=LEBoundaryName->text().trimmed(); if (aBoundaryName=="") { - QMessageBox::information( 0, "Error", - "The boundary must be named.", - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_BOUN_NAME") ); return false; } @@ -70,9 +69,8 @@ bool MonCreateBoundaryDi::PushOnApply() QString aMeshFile=LEFileName->text().trimmed(); if (aMeshFile ==QString("")) { - QMessageBox::information( 0, "Error", - QString("The mesh of the boundary must be selected."), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_BOUN_MESH") ); return false; } @@ -80,9 +78,8 @@ bool MonCreateBoundaryDi::PushOnApply() QString aMeshName = HOMARD_QT_COMMUN::LireNomMaillage(aMeshFile); if (aMeshName == "" ) { - QMessageBox::information( 0, "Error", - QString("no mesh in mesh file"), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_MED_FILE_2") ); return false; } @@ -98,9 +95,8 @@ bool MonCreateBoundaryDi::PushOnApply() } catch( SALOME::SALOME_Exception& S_ex ) { - QMessageBox::information( 0, "Error", - QString(CORBA::string_dup(S_ex.details.text)), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QString(CORBA::string_dup(S_ex.details.text)) ); return false; } } @@ -183,16 +179,15 @@ void MonCreateBoundaryDi::setGroups (QStringList listGroup) void MonCreateBoundaryDi::SetFiltrage() // // ------------------------------------------------------------------------ { - if (!CBGroupe->isChecked()) return; - if (_aCaseName.toStdString().c_str() == QString()) { - QMessageBox::information( 0, "Error", - "Case MeshFile unknowned.", - QMessageBox::Ok + QMessageBox::Default ); - return; - } + if (!CBGroupe->isChecked()) return; + if (_aCaseName.toStdString().c_str() == QString()) { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_BOUN_CASE") ); + return; + } - MonCreateListGroup *aDlg = new MonCreateListGroup(NULL,this, TRUE, HOMARD::HOMARD_Gen::_duplicate(_myHomardGen), - _aCaseName, _listeGroupesBoundary) ; + MonCreateListGroup *aDlg = new MonCreateListGroup(NULL,this, TRUE, HOMARD::HOMARD_Gen::_duplicate(_myHomardGen), + _aCaseName, _listeGroupesBoundary) ; aDlg->show(); } diff --git a/src/HOMARDGUI/MonCreateCase.cxx b/src/HOMARDGUI/MonCreateCase.cxx index 71474db5..a3032711 100644 --- a/src/HOMARDGUI/MonCreateCase.cxx +++ b/src/HOMARDGUI/MonCreateCase.cxx @@ -90,54 +90,48 @@ void MonCreateCase::GetBoundarys() bool MonCreateCase::PushOnApply() // -------------------------------- { - MESSAGE("PushOnApply"); + MESSAGE("MonCreateCase::PushOnApply"); QString aCaseName=LECaseName->text().trimmed(); if ( aCaseName == "" ) { - QMessageBox::information( 0, "Error", - QString("The case must be named"), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_CASE_NAME") ); return false; } QString aDirName=LEDirName->text().trimmed(); if (aDirName == QString("")) { - QMessageBox::information( 0, "Error", - QString("A directory for the case must be selected."), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_CASE_DIRECTORY_1") ); return false; } if ((aDirName != _aDirName) and (_myHomardGen->VerifieDir( aDirName.toStdString().c_str()) == false)) { - QMessageBox::information( 0, "Error", - QString("This directory is already used"), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_CASE_DIRECTORY_2") ); return false; } if (chdir(aDirName.toStdString().c_str()) != 0) { - QMessageBox::information( 0, "Error", - QString("A valid directory for the case must be selected."), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_CASE_DIRECTORY_3") ); return false; } QString aFileName=LEFileName->text().trimmed(); if (aFileName ==QString("")) { - QMessageBox::information( 0, "Error", - QString("The initial mesh must be selected."), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_CASE_MESH") ); return false; } QString aMeshName = HOMARD_QT_COMMUN::LireNomMaillage(aFileName); if (aMeshName == "" ) { - QMessageBox::information( 0, "Error", - QString("no mesh in mesh file"), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_MED_FILE_2") ); return false; } @@ -161,9 +155,8 @@ bool MonCreateCase::PushOnApply() // MESSAGE("....... "<GetCas(_aCaseName.toStdString().c_str()); @@ -293,8 +285,10 @@ void MonCreateCase::SetDirName() void MonCreateCase::SetFileName() // ------------------------------------------------------------------------ { + QString fileName0 = LEFileName->text().trimmed(); QString fileName = HOMARD_QT_COMMUN::PushNomFichier(); - if (!(fileName.isEmpty())) LEFileName->setText(fileName); + if (fileName.isEmpty()) fileName = fileName0 ; + LEFileName->setText(fileName); } // ------------------------------------------------------------------------ void MonCreateCase::SetConforme() @@ -376,7 +370,7 @@ void MonCreateCase::PushBoundaryDiEdit() void MonCreateCase::SetBoundaryA() // ------------------------------------------------------------------------ { - MESSAGE("Debut de SetBoundaryA "); + MESSAGE("Debut de MonCreateCase::SetBoundaryA "); if (CBBoundaryA->isChecked()) { bool bOK = PushOnApply(); @@ -404,13 +398,13 @@ void MonCreateCase::SetBoundaryA() else { GBBoundaryA->setVisible(0); } adjustSize(); // - MESSAGE("Fin de SetBoundaryA "); +// MESSAGE("Fin de MonCreateCase::SetBoundaryA "); } // ------------------------------------------------------------------------ void MonCreateCase::addBoundaryAn(QString newBoundary) // ------------------------------------------------------------------------ { - MESSAGE("Debut de addBoundaryAn "); + MESSAGE("Debut de MonCreateCase::addBoundaryAn "); // Ajout d'une nouvelle colonne int nbcol = TWBoundary->columnCount(); MESSAGE("nbcol " << nbcol); @@ -432,7 +426,7 @@ void MonCreateCase::addBoundaryAn(QString newBoundary) } TWBoundary->resizeColumnToContents(nbcol-1); // TWBoundary->resizeRowsToContents(); - MESSAGE("Fin de addBoundaryAn "); +// MESSAGE("Fin de addBoundaryAn "); } // ------------------------------------------------------------------------ void MonCreateCase::PushBoundaryAnNew() diff --git a/src/HOMARDGUI/MonCreateHypothesis.cxx b/src/HOMARDGUI/MonCreateHypothesis.cxx index 2ad73d09..ac0a28d2 100644 --- a/src/HOMARDGUI/MonCreateHypothesis.cxx +++ b/src/HOMARDGUI/MonCreateHypothesis.cxx @@ -24,7 +24,7 @@ MonCreateHypothesis::MonCreateHypothesis(MonCreateIteration* parent, bool modal, : QDialog(0), Ui_CreateHypothesis(), _parent(parent), _aHypothesisName(aHypothesisName), - _aCaseName(caseName), _aFieldFile(aFieldFile), + _aCaseName(caseName), _aFieldFile(aFieldFile), _aFieldName(""), _aTypeAdap(-2), _aTypeRaff(1), _aTypeDera(0), _TypeThR(3), _ThreshR(0), @@ -97,9 +97,8 @@ bool MonCreateHypothesis::PushOnApply() if (LEHypothesisName->text().trimmed()=="") { - QMessageBox::information( 0, "Error", - "The hypothesis must be named.", - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_HYPO_NAME") ); return false; } @@ -117,9 +116,8 @@ bool MonCreateHypothesis::PushOnApply() } catch( SALOME::SALOME_Exception& S_ex ) { - QMessageBox::information( 0, "Error", - QString(CORBA::string_dup(S_ex.details.text)), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QString(CORBA::string_dup(S_ex.details.text)) ); return false; } } @@ -158,7 +156,7 @@ void MonCreateHypothesis::SetNewHypothesisName() { HOMARD::listeHypotheses_var MyHypos = _myHomardGen->GetAllHypotheses(); - int num = 0;// + int num = 0;// QString aHypothesisName=""; while (aHypothesisName=="" ) { @@ -196,9 +194,8 @@ void MonCreateHypothesis::SetChamp() { if (_aFieldFile == QString("")) { - QMessageBox::information( 0, "Error", - QString("Enter FieldFile please "), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_HYPO_FIELD_FILE") ); close(); if ( _parent ) { _parent->raise(); _parent->activateWindow(); }; return; @@ -239,7 +236,7 @@ void MonCreateHypothesis::SetZone() void MonCreateHypothesis::PushZoneNew() // ------------------------------------------------------------------------ { - MESSAGE("Debut de PushZoneNew") + MESSAGE("Debut de MonCreateHypothesis::PushZoneNew") MonCreateZone *aDlg = new MonCreateZone(this, TRUE, HOMARD::HOMARD_Gen::_duplicate(_myHomardGen), _aCaseName) ; aDlg->show(); } @@ -248,14 +245,13 @@ void MonCreateHypothesis::PushZoneNew() void MonCreateHypothesis::PushZoneEdit() // ------------------------------------------------------------------------ { - MESSAGE("Debut de PushZoneEdit") + MESSAGE("Debut de MonCreateHypothesis::PushZoneEdit") int colonne = TWZone->currentColumn(); QTableWidgetItem * monItem = TWZone->currentItem(); - if (colonne !=1 or monItem == NULL) + if (colonne !=1 or monItem == NULL) { - QMessageBox::information( 0, "Error", - "Please, Select a Zone", - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_HYPO_ZONE_1") ); return; } QString zoneName = monItem->text().trimmed(); @@ -266,10 +262,9 @@ void MonCreateHypothesis::PushZoneEdit() void MonCreateHypothesis::PushZoneDelete() // ------------------------------------------------------------------------ { - MESSAGE("Debut de PushZoneDelete") - QMessageBox::information( 0, "Error", - "Inactive button.", - QMessageBox::Ok + QMessageBox::Default ); + MESSAGE("Debut de MonCreateHypothesis::PushZoneDelete") + QMessageBox::warning( 0, QObject::tr("HOM_WARNING"), + QObject::tr("HOM_INACTIVE_BUTTON") ); return; } @@ -279,8 +274,8 @@ void MonCreateHypothesis::GetAllZones() // Recuperation de toutes les zones enregistrees dans l'arbre d'etude { HOMARD::listeZones_var mesZones = _myHomardGen->GetAllZones(); - int stop=TWZone->rowCount(); - for ( int row=0; row< stop; row++) + int nbrow=TWZone->rowCount(); + for ( int row=0; row< nbrow; row++) { TWZone->removeRow(row); } @@ -301,7 +296,7 @@ void MonCreateHypothesis::GetAllZones() TWZone->resizeRowsToContents(); TWZone->clearSelection(); } - + // ------------------------------------------------------------------------ void MonCreateHypothesis::addZone(QString newZone) // ------------------------------------------------------------------------ @@ -338,7 +333,7 @@ QStringList MonCreateHypothesis::GetListCompChecked() // ------------------------------------------------------------------------ // Retourne les composantes retenues { - MESSAGE( "Dans GetListCompChecked" ); + MESSAGE( "Dans MonCreateHypothesis::GetListCompChecked" ); QStringList ListeComposant ; ListeComposant.clear(); @@ -347,12 +342,12 @@ QStringList MonCreateHypothesis::GetListCompChecked() ListeComposant.insert(0, QString(TWCMP->item(row, 1)->text()) ) ; // Choix du texte des radio-boutons selon 1 ou plusieurs composantes if ( ListeComposant.count() < 2 ) - { RBL2->setText(QString("Absolute value")); - RBInf->setText(QString("Relative value")); + { RBL2->setText(QObject::tr("HOM_HYPO_NORM_ABS")); + RBInf->setText(QObject::tr("HOM_HYPO_NORM_REL")); } else - { RBL2->setText(QString("L2 norm")); - RBInf->setText(QString("Infinite Norm")); + { RBL2->setText(QObject::tr("HOM_HYPO_NORM_L2")); + RBInf->setText(QObject::tr("HOM_HYPO_NORM_INF")); } return ListeComposant ; // @@ -399,14 +394,16 @@ void MonCreateHypothesis::InitFields() void MonCreateHypothesis::SetFieldName() // ------------------------------------------- { + MESSAGE("MonCreateHypothesis::SetFieldName"); _aFieldName=CBFieldName->currentText(); if (QString(_aFieldFile) == QString("") or QString(_aFieldName) == QString("") ) { return; } - for ( int row=0; row < TWCMP->rowCount() ; row++) + int nbrow= TWCMP->rowCount() ; + for ( int row=0; row < nbrow ; row++) { TWCMP->removeRow(row); } - //TWCMP->setRowCount(0); + TWCMP->setRowCount(0); //TWCMP->resizeRowsToContents(); std::list maListe =HOMARD_QT_COMMUN::GetListeComposants(_aFieldFile, _aFieldName); @@ -426,12 +423,12 @@ void MonCreateHypothesis::SetFieldName() TWCMP->clearSelection(); // Choix du texte des radio-boutons selon 1 ou plusieurs composantes if ( TWCMP->rowCount() == 1 ) - { RBL2->setText(QString("Absolute value")); - RBInf->setText(QString("Relative value")); + { RBL2->setText(QObject::tr("HOM_HYPO_NORM_ABS")); + RBInf->setText(QObject::tr("HOM_HYPO_NORM_REL")); } else - { RBL2->setText(QString("L2 norm")); - RBInf->setText(QString("Infinite Norm")); + { RBL2->setText(QObject::tr("HOM_HYPO_NORM_L2")); + RBInf->setText(QObject::tr("HOM_HYPO_NORM_INF")); } // Par defaut, on propose la valeur absolue / norme L2 SetUCL2(); @@ -561,9 +558,8 @@ bool MonCreateHypothesis::VerifieZone() _aListeZone = GetZonesChecked() ; if (_aListeZone.count() == 0) { - QMessageBox::information( 0, "Error", - QString("At least, one zone must be given."), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_HYPO_ZONE_2") ); return false; } return true; @@ -576,9 +572,8 @@ bool MonCreateHypothesis::VerifieComposant() _aListeComposant = GetListCompChecked() ; if (_aListeComposant.count() == 0) { - QMessageBox::information( 0, "Error", - QString("At least, one composant must be given."), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_HYPO_COMP") ); return false; } return true; @@ -652,9 +647,8 @@ void MonCreateHypothesis::SetFieldAll() { if (_aFieldFile == QString("")) { - QMessageBox::information( 0, "Error", - QString("Enter FieldFile please "), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_HYPO_FIELD_FILE") ); close(); if ( _parent ) { _parent->raise(); _parent->activateWindow(); }; return; @@ -673,9 +667,8 @@ void MonCreateHypothesis::SetFieldChosen() { if (_aFieldFile == QString("")) { - QMessageBox::information( 0, "Error", - QString("Enter FieldFile please "), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_HYPO_FIELD_FILE") ); close(); if ( _parent ) { _parent->raise(); _parent->activateWindow(); }; return; @@ -688,9 +681,11 @@ void MonCreateHypothesis::SetFieldChosen() // Initialisation de la table TWField->clear(); - for ( int row=0; row< TWField->rowCount(); row++) + int nbrow=TWField->rowCount(); + for ( int row=0; row< nbrow; row++) + { TWField->removeRow(row); - + } TWField->setRowCount(0); std:: list::const_iterator it; int row=0; diff --git a/src/HOMARDGUI/MonCreateIteration.cxx b/src/HOMARDGUI/MonCreateIteration.cxx index ae49c2b2..31843423 100644 --- a/src/HOMARDGUI/MonCreateIteration.cxx +++ b/src/HOMARDGUI/MonCreateIteration.cxx @@ -14,7 +14,7 @@ using namespace std; // ----------------------------------------------------------------------------------------------------- -MonCreateIteration::MonCreateIteration(QWidget* parent, bool modal, +MonCreateIteration::MonCreateIteration(QWidget* parent, bool modal, HOMARD::HOMARD_Gen_var myHomardGen, QString IterParentName ): // ----------------------------------------------------------------------------------------------------- /* Constructs a MonCreateIteration @@ -35,9 +35,9 @@ MonCreateIteration::MonCreateIteration(QWidget* parent, bool modal, SetNewIterationName(); GetHypotheses(); - if (_IterParentName != QString("")) + if (_IterParentName != QString("")) { SetIterParentName(); } - else + else {setModal(false); /* permet selection de l iteration dans l arbre d etude */} SetTSNo(); } @@ -81,38 +81,34 @@ bool MonCreateIteration::PushOnApply() // ------------------------------------------------------------------------ // Appele lorsque l'un des boutons Ok ou Apply est presse { - MESSAGE("PushOnApply"); + MESSAGE("MonCreateIteration::PushOnApply"); // QString aIterationName = LEIterationName->text().trimmed(); if ( aIterationName == QString ("")) { - QMessageBox::information( 0, "Error", - QString(" Nommer l iteration "), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ITER_NAME") ); return false; } if ( _IterParentName == QString ("")) { - QMessageBox::information( 0, "Error", - QString(" Donner le point de depart "), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ITER_STARTING_POINT") ); return false; } QString aMeshName_np1=LEMeshName_np1->text().trimmed(); if (aMeshName_np1 == "" ) { - QMessageBox::information( 0, "Error", - QString(" Donner le nom du maillage final."), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ITER_MESH") ); return false; } QString monHypoName=CBHypothese->currentText(); if (monHypoName == "" ) { - QMessageBox::information( 0, "Error", - QString(" Choisir une hypothese "), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ITER_HYPO") ); return false; } HOMARD::HOMARD_Hypothesis_var _myHypothesis = _myHomardGen->GetHypothesis(monHypoName.toStdString().c_str()); @@ -120,9 +116,8 @@ bool MonCreateIteration::PushOnApply() int TypeAdap = ListTypes[0]; if ( TypeAdap == 1 and LEFieldFile->text().trimmed() == QString("") ) { - QMessageBox::information( 0, "Error", - QString("Avec cette hypothese, il faut fournir le fichier du champ."), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ITER_FIELD_FILE") ); return false; } @@ -141,11 +136,10 @@ bool MonCreateIteration::PushOnApply() CORBA::string_dup(_IterationName.toStdString().c_str()), CORBA::string_dup(_IterParentName.toStdString().c_str())); } - catch( SALOME::SALOME_Exception& S_ex ) + catch( SALOME::SALOME_Exception& S_ex ) { - QMessageBox::information( 0, "Error", - QString(CORBA::string_dup(S_ex.details.text)), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QString(CORBA::string_dup(S_ex.details.text)) ); return false; } } @@ -181,7 +175,7 @@ void MonCreateIteration::PushOnOK() void MonCreateIteration::PushOnHelp() // ------------------------------------------------------------------------ { - HOMARD_UTILS::PushOnHelp(QString("gui_create_iteration.html")); + HOMARD_UTILS::PushOnHelp(QString("gui_create_iteration.html")); } // ------------------------------------------------------------------------ @@ -199,7 +193,7 @@ void MonCreateIteration::SetIterParentName() LEMeshName_n->setText(MeshName); LEMeshName_n->setReadOnly(1); LEMeshName_np1->setText(MeshName); - + LEIterationParentName->setText(_IterParentName); } @@ -210,7 +204,7 @@ void MonCreateIteration::SetNewIterationName() // Recherche d'un nom par defaut qui n'existe pas encore HOMARD::listeIterations_var myIters=_myHomardGen->GetAllIterations(); - int num = 0;// + int num = 0;// QString aIterationName=""; while (aIterationName=="" ) { @@ -237,11 +231,10 @@ void MonCreateIteration::PushHypoEdit() if (CBHypothese->currentText() == QString("")) return; if (_IterParentName == QString("")) { - QMessageBox::information( 0, "Error", - QString("The previous iteration must be given."), - QMessageBox::Ok + QMessageBox::Default ); - raise(); - return; + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ITER_STARTING_POINT") ); + raise(); + return; } QString aFieldFile=LEFieldFile->text().trimmed(); MonEditHypothesis *HypoDlg = new MonEditHypothesis(this,TRUE, HOMARD::HOMARD_Gen::_duplicate(_myHomardGen),CBHypothese->currentText(), _CaseName, aFieldFile) ; @@ -252,28 +245,27 @@ void MonCreateIteration::PushHypoEdit() void MonCreateIteration::addHypothese(QString newHypothese) // ------------------------------------------------------------------------ { - CBHypothese->insertItem(0,newHypothese); - CBHypothese->setCurrentIndex(0); + CBHypothese->insertItem(0,newHypothese); + CBHypothese->setCurrentIndex(0); } // ------------------------------------------------------------------------ void MonCreateIteration::PushHypoNew() // ------------------------------------------------------------------------ { - if (_IterParentName == QString("")) - { - QMessageBox::information( 0, "Error", - QString("The previous iteration must be given."), - QMessageBox::Ok + QMessageBox::Default ); - raise(); - return; - } - if ( _CaseName == QString("")) - { - _CaseName = _myHomardGen->GetCaseName(CORBA::string_dup(_IterParentName.toStdString().c_str())); - } - QString aFieldFile=LEFieldFile->text().trimmed(); - MonCreateHypothesis *HypoDlg = new MonCreateHypothesis(this,TRUE,HOMARD::HOMARD_Gen::_duplicate(_myHomardGen),QString(""),_CaseName, aFieldFile) ; - HypoDlg->show(); + if (_IterParentName == QString("")) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ITER_STARTING_POINT") ); + raise(); + return; + } + if ( _CaseName == QString("")) + { + _CaseName = _myHomardGen->GetCaseName(CORBA::string_dup(_IterParentName.toStdString().c_str())); + } + QString aFieldFile=LEFieldFile->text().trimmed(); + MonCreateHypothesis *HypoDlg = new MonCreateHypothesis(this,TRUE,HOMARD::HOMARD_Gen::_duplicate(_myHomardGen),QString(""),_CaseName, aFieldFile) ; + HypoDlg->show(); } // ------------------------------------------------------------------------ diff --git a/src/HOMARDGUI/MonCreateListGroup.cxx b/src/HOMARDGUI/MonCreateListGroup.cxx index 8b9dab97..1875666e 100644 --- a/src/HOMARDGUI/MonCreateListGroup.cxx +++ b/src/HOMARDGUI/MonCreateListGroup.cxx @@ -19,8 +19,8 @@ using namespace std; #include // -------------------------------------------------------------------------------------------------------------- -MonCreateListGroup::MonCreateListGroup(MonCreateHypothesis* parentHyp, MonCreateBoundaryDi* parentBound, bool modal, - HOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName, QStringList listeGroupesHypo) : +MonCreateListGroup::MonCreateListGroup(MonCreateHypothesis* parentHyp, MonCreateBoundaryDi* parentBound, bool modal, + HOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName, QStringList listeGroupesHypo) : // -------------------------------------------------------------------------------------------------------------- // QDialog(0), Ui_CreateListGroup(), @@ -37,8 +37,8 @@ MonCreateListGroup::MonCreateListGroup(MonCreateHypothesis* parentHyp, MonCreate InitGroupes(); } // -------------------------------------------------------------------------------------------------------------- -MonCreateListGroup::MonCreateListGroup(MonCreateHypothesis* parentHyp, MonCreateBoundaryDi* parentBound, - HOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName, QStringList listeGroupesHypo) : +MonCreateListGroup::MonCreateListGroup(MonCreateHypothesis* parentHyp, MonCreateBoundaryDi* parentBound, + HOMARD::HOMARD_Gen_var myHomardGen, QString aCaseName, QStringList listeGroupesHypo) : // -------------------------------------------------------------------------------------------------------------- // QDialog(0), Ui_CreateListGroup(), @@ -103,7 +103,7 @@ void MonCreateListGroup::PushOnHelp() void MonCreateListGroup::InitGroupes() // ------------------------------------------------------------------------ { - MESSAGE("Debut de InitGroupes "); + MESSAGE("Debut de MonCreateListGroup::InitGroupes "); for ( int row=0; row< TWGroupe->rowCount(); row++) TWGroupe->removeRow(row); TWGroupe->setRowCount(0); @@ -126,6 +126,6 @@ void MonCreateListGroup::InitGroupes() TWGroupe->resizeColumnsToContents(); TWGroupe->resizeRowsToContents(); TWGroupe->clearSelection(); - MESSAGE("Fin de InitGroupes "); +// MESSAGE("Fin de MonCreateListGroup::InitGroupes "); } diff --git a/src/HOMARDGUI/MonCreateZone.cxx b/src/HOMARDGUI/MonCreateZone.cxx index 7e766f83..5070b4a8 100644 --- a/src/HOMARDGUI/MonCreateZone.cxx +++ b/src/HOMARDGUI/MonCreateZone.cxx @@ -234,35 +234,34 @@ bool MonCreateZone::PushOnApply() std::cerr << LEZoneName->text().trimmed().toStdString() << std::endl; if (LEZoneName->text().trimmed()=="") { - QMessageBox::information( 0, "Error", - "The zone must be named.", - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ZONE_NAME") ); return false; } switch (_ZoneType) { - case 2 : // il s agit d une boite - { - if ((_ZoneXmin != SpinBox_Xmini->value()) or (_ZoneXmax != SpinBox_Xmaxi->value()) or - (_ZoneYmin != SpinBox_Ymini->value()) or (_ZoneYmax != SpinBox_Ymaxi->value()) or - (_ZoneZmin != SpinBox_Zmini->value()) or (_ZoneZmax != SpinBox_Zmaxi->value()) ) - Chgt = true; - break; - } + case 2 : // il s agit d une boite + { + if ((_ZoneXmin != SpinBox_Xmini->value()) or (_ZoneXmax != SpinBox_Xmaxi->value()) or + (_ZoneYmin != SpinBox_Ymini->value()) or (_ZoneYmax != SpinBox_Ymaxi->value()) or + (_ZoneZmin != SpinBox_Zmini->value()) or (_ZoneZmax != SpinBox_Zmaxi->value()) ) + Chgt = true; + break; + } - case 4 : // il s agit d une sphere - { - if ((_ZoneXcentre != SpinBox_Xcentre->value()) or (_ZoneYcentre != SpinBox_Ycentre->value()) - or (_ZoneZcentre != SpinBox_Zcentre->value()) or (_ZoneRayon != SpinBox_Rayon->value())) - Chgt = true; - break; - } + case 4 : // il s agit d une sphere + { + if ((_ZoneXcentre != SpinBox_Xcentre->value()) or (_ZoneYcentre != SpinBox_Ycentre->value()) + or (_ZoneZcentre != SpinBox_Zcentre->value()) or (_ZoneRayon != SpinBox_Rayon->value())) + Chgt = true; + break; + } } - _ZoneXmin= SpinBox_Xmini->value(); _ZoneXmax= SpinBox_Xmaxi->value(); - _ZoneYmin= SpinBox_Ymini->value(); _ZoneYmax= SpinBox_Ymaxi->value(); - _ZoneZmin= SpinBox_Zmini->value(); _ZoneZmax= SpinBox_Zmaxi->value(); + _ZoneXmin= SpinBox_Xmini->value(); _ZoneXmax= SpinBox_Xmaxi->value(); + _ZoneYmin= SpinBox_Ymini->value(); _ZoneYmax= SpinBox_Ymaxi->value(); + _ZoneZmin= SpinBox_Zmini->value(); _ZoneZmax= SpinBox_Zmaxi->value(); _ZoneXcentre=SpinBox_Xcentre->value();_ZoneYcentre=SpinBox_Ycentre->value(); _ZoneZcentre=SpinBox_Zcentre->value();_ZoneRayon=SpinBox_Rayon->value(); @@ -270,21 +269,18 @@ bool MonCreateZone::PushOnApply() if( _ZoneType == 2 ) { if ((_ZoneXmin>= _ZoneXmax) and (_Xincr > 0)) { - QMessageBox::information( 0, "Error", - QString("X maxi must be greater than X mini."), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ZONE_LIMIT").arg("X") ); return false; } if ((_ZoneYmin>= _ZoneYmax) and (_Yincr > 0)) { - QMessageBox::information( 0, "Error", - QString("Y maxi must be greater than Y mini."), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ZONE_LIMIT").arg("Y") ); return false; } if ((_ZoneZmin>= _ZoneZmax) and (_Zincr > 0)) { - QMessageBox::information( 0, "Error", - QString("Z maxi must be greater than Z mini."), - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_ZONE_LIMIT").arg("Z") ); return false; } } @@ -308,14 +304,13 @@ bool MonCreateZone:: CreateOrUpdateZone() CORBA::string_dup(_aZoneName.toStdString().c_str()), \ CORBA::Long(_ZoneType) ); _parent->addZone(_aZoneName); - } - catch( SALOME::SALOME_Exception& S_ex ) - { - QMessageBox::information( 0, "Error", - QString(CORBA::string_dup(S_ex.details.text)), - QMessageBox::Ok + QMessageBox::Default ); - return false; - } + } + catch( SALOME::SALOME_Exception& S_ex ) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QString(CORBA::string_dup(S_ex.details.text)) ); + return false; + } } // Mise en place des attributs aZone->SetZoneType(_ZoneType); @@ -347,19 +342,19 @@ void MonCreateZone::SetNewZoneName() HOMARD::listeZones_var MyZones = _myHomardGen->GetAllZones(); int num = 0; QString aZoneName=""; - while (aZoneName=="" ) + while (aZoneName=="" ) { aZoneName.setNum(num+1) ; aZoneName.insert(0, QString("Zone_")) ; - for ( int i=0; ilength(); i++) + for ( int i=0; ilength(); i++) { - if ( aZoneName == QString(MyZones[i])) + if ( aZoneName == QString(MyZones[i])) { num=num+1; aZoneName=""; break; - } - } + } + } } LEZoneName->clear() ; LEZoneName->insert(aZoneName); @@ -405,7 +400,7 @@ void MonCreateZone::SetSphere() if ( _Zincr > 0 ) { SpinBox_Zcentre->setValue(_Zcentre); } - SpinBox_Rayon->setValue(_Rayon); + SpinBox_Rayon->setValue(_Rayon); } diff --git a/src/HOMARDGUI/MonEditBoundaryAn.cxx b/src/HOMARDGUI/MonEditBoundaryAn.cxx index 50794ca9..3e7511a3 100644 --- a/src/HOMARDGUI/MonEditBoundaryAn.cxx +++ b/src/HOMARDGUI/MonEditBoundaryAn.cxx @@ -18,7 +18,7 @@ MonEditBoundaryAn::MonEditBoundaryAn( MonCreateCase* parent, bool modal, MonCreateBoundaryAn(parent, myHomardGen, caseName) { MESSAGE("Debut de MonEditBoundaryAn pour " << zoneName.toStdString().c_str()); - setWindowTitle("Edit BoundaryAn"); + setWindowTitle(QObject::tr("HOM_BOUN_A_EDIT_WINDOW_TITLE")); _aBoundaryAnName=zoneName; aBoundaryAn = _myHomardGen->GetBoundary(_aBoundaryAnName.toStdString().c_str()); InitValEdit(); diff --git a/src/HOMARDGUI/MonEditBoundaryDi.cxx b/src/HOMARDGUI/MonEditBoundaryDi.cxx index cae08250..49ceddd4 100644 --- a/src/HOMARDGUI/MonEditBoundaryDi.cxx +++ b/src/HOMARDGUI/MonEditBoundaryDi.cxx @@ -22,7 +22,7 @@ MonEditBoundaryDi::MonEditBoundaryDi( MonCreateCase* parent, bool modal, MonCreateBoundaryDi(parent, modal, myHomardGen, caseName, BoundaryName) { MESSAGE("Debut de Boundary pour " << BoundaryName.toStdString().c_str()); - setWindowTitle("Edit BoundaryDi"); + setWindowTitle(QObject::tr("HOM_BOUN_D_EDIT_WINDOW_TITLE")); try { _aBoundary=_myHomardGen->GetBoundary(CORBA::string_dup(_aBoundaryName.toStdString().c_str())); @@ -31,10 +31,9 @@ MonEditBoundaryDi::MonEditBoundaryDi( MonCreateCase* parent, bool modal, } catch( SALOME::SALOME_Exception& S_ex ) { - QMessageBox::information( 0, "Error", - QString(CORBA::string_dup(S_ex.details.text)), - QMessageBox::Ok + QMessageBox::Default ); - return; + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QString(CORBA::string_dup(S_ex.details.text)) ); + return; } HOMARD::ListGroupType_var maListe = _aBoundary->GetGroups(); @@ -71,19 +70,18 @@ bool MonEditBoundaryDi::PushOnApply() void MonEditBoundaryDi::SetFiltrage() // // ------------------------------------------------------------------------ { - if (!CBGroupe->isChecked()) return; - if (_aCaseName.toStdString().c_str() == QString()) - { - QMessageBox::information( 0, "Error", - "Case MeshFile unknowned.", - QMessageBox::Ok + QMessageBox::Default ); - return; - } - HOMARD::HOMARD_Cas_var monCas= _myHomardGen->GetCas(_aCaseName.toStdString().c_str()); - HOMARD::ListGroupType_var _listeGroupesCas = monCas->GetGroups(); + if (!CBGroupe->isChecked()) return; + if (_aCaseName.toStdString().c_str() == QString()) + { + QMessageBox::critical( 0, QObject::tr("HOM_ERROR"), + QObject::tr("HOM_BOUN_CASE") ); + return; + } + HOMARD::HOMARD_Cas_var monCas= _myHomardGen->GetCas(_aCaseName.toStdString().c_str()); + HOMARD::ListGroupType_var _listeGroupesCas = monCas->GetGroups(); - MonEditListGroup *aDlg = new MonEditListGroup(NULL,this, TRUE, HOMARD::HOMARD_Gen::_duplicate(_myHomardGen), - _aCaseName, _listeGroupesBoundary) ; - aDlg->show(); + MonEditListGroup *aDlg = new MonEditListGroup(NULL,this, TRUE, HOMARD::HOMARD_Gen::_duplicate(_myHomardGen), + _aCaseName, _listeGroupesBoundary) ; + aDlg->show(); } diff --git a/src/HOMARDGUI/MonEditCase.cxx b/src/HOMARDGUI/MonEditCase.cxx index 111f271b..6fdebc01 100644 --- a/src/HOMARDGUI/MonEditCase.cxx +++ b/src/HOMARDGUI/MonEditCase.cxx @@ -2,8 +2,6 @@ using namespace std; #include "MonEditCase.h" -#include - #include "SalomeApp_Tools.h" #include "HOMARDGUI_Utils.h" #include "HomardQtCommun.h" @@ -21,7 +19,7 @@ MonEditCase::MonEditCase ( QWidget* parent, bool modal, MonCreateCase(parent, modal, myHomardGen) { MESSAGE("Debut de MonEditCase" << CaseName.toStdString().c_str()); - setWindowTitle("Edit case"); + setWindowTitle(QObject::tr("HOM_CASE_EDIT_WINDOW_TITLE")); _aCaseName = CaseName; aCase = _myHomardGen->GetCas(_aCaseName.toStdString().c_str()); InitValEdit(); @@ -37,7 +35,7 @@ MonEditCase::~MonEditCase() void MonEditCase::InitValEdit() // ------------------------------ { - MESSAGE("Debut de InitValEdit"); + MESSAGE("Debut de MonEditCase::InitValEdit"); LECaseName->setText(_aCaseName); LECaseName->setReadOnly(true); diff --git a/src/HOMARDGUI/MonEditFile.cxx b/src/HOMARDGUI/MonEditFile.cxx index 5d09d71c..91bbbd61 100644 --- a/src/HOMARDGUI/MonEditFile.cxx +++ b/src/HOMARDGUI/MonEditFile.cxx @@ -83,9 +83,8 @@ void MonEditFile::PushOnPrint() // ------------------------------------------------------------------------ { MESSAGE("Debut de MonEditFile::PushOnPrint") - QMessageBox::information( 0, "Error", - "Inactive button.", - QMessageBox::Ok + QMessageBox::Default ); + QMessageBox::warning( 0, QObject::tr("HOM_WARNING"), + QObject::tr("HOM_INACTIVE_BUTTON") ); return; } diff --git a/src/HOMARDGUI/MonEditHypothesis.cxx b/src/HOMARDGUI/MonEditHypothesis.cxx index c7f33432..5aa8bbce 100644 --- a/src/HOMARDGUI/MonEditHypothesis.cxx +++ b/src/HOMARDGUI/MonEditHypothesis.cxx @@ -23,7 +23,7 @@ MonEditHypothesis::MonEditHypothesis( MonCreateIteration* parent, bool modal, MonCreateHypothesis(parent, modal,myHomardGen, aHypothesisName, caseName, aFieldFile) { MESSAGE("Hypothese " << aHypothesisName.toStdString().c_str()); - setWindowTitle("Edit Hypothesis"); + setWindowTitle(QObject::tr("HOM_HYPO_EDIT_WINDOW_TITLE")); _aHypothesis = _myHomardGen->GetHypothesis(_aHypothesisName.toStdString().c_str()); if (caseName == QString("") ){ _aCaseName = _aHypothesis->GetCaseCreation();} InitValEdit(); @@ -243,12 +243,12 @@ void MonEditHypothesis::InitAdaptChamps() } // Le choix de la prise en compte des composantes if ( TWCMP->rowCount() == 1 ) - { RBL2->setText(QString("Absolute value")); - RBInf->setText(QString("Relative value")); + { RBL2->setText(QObject::tr("HOM_HYPO_NORM_ABS")); + RBInf->setText(QObject::tr("HOM_HYPO_NORM_REL")); } else - { RBL2->setText(QString("L2 norm")); - RBInf->setText(QString("Infinite Norm")); + { RBL2->setText(QObject::tr("HOM_HYPO_NORM_L2")); + RBInf->setText(QObject::tr("HOM_HYPO_NORM_INF")); } if ( _UsCmpI == 0 ) { diff --git a/src/HOMARDGUI/MonEditIteration.cxx b/src/HOMARDGUI/MonEditIteration.cxx index 4363da12..fadef9ba 100644 --- a/src/HOMARDGUI/MonEditIteration.cxx +++ b/src/HOMARDGUI/MonEditIteration.cxx @@ -22,7 +22,7 @@ MonEditIteration::MonEditIteration ( QWidget* parent, bool modal, _rank(0), _step(0), _IterationName(""), _FieldFile(""),_aTypeAdap() { MESSAGE("Debut de MonEditIteration" << IterName.toStdString().c_str()); - setWindowTitle("Edit iteration"); + setWindowTitle(QObject::tr("HOM_ITER_EDIT_WINDOW_TITLE")); _IterationName = IterName; aIter = _myHomardGen->GetIteration(_IterationName.toStdString().c_str()); @@ -53,12 +53,12 @@ void MonEditIteration::InitValEdit0() // Affichage bloque du nom du maillage de l'iteration courante QString MeshName = aIter->GetMeshName(); - Mesh_n->setText(QString("Mesh name")); + Mesh_n->setText(QObject::tr("HOM_ITER_STARTING_POINT_0")); LEMeshName_n->setText(MeshName); LEMeshName_n->setReadOnly(1); // Message general - Mesh_np1->setText(QString("First iteration of the case.")); + Mesh_np1->setText(QObject::tr("HOM_ITER_STARTING_POINT_1")); LEMeshName_np1->setVisible(0); // // Invisibilite des hypotheses et des champs @@ -150,7 +150,7 @@ bool MonEditIteration::PushOnApply() if ( _aTypeAdap == 1) { // Pour du raffinement selon un champ, les instants ont-ils change ? - if ( (_FieldFile != LEFieldFile->text().trimmed()) or + if ( (_FieldFile != LEFieldFile->text().trimmed()) or ( _rank != SpinBox_Rank->value()) or ( _step != SpinBox_TimeStep->value())) { diff --git a/src/HOMARDGUI/MonEditListGroup.cxx b/src/HOMARDGUI/MonEditListGroup.cxx index 40ee236b..ecd635e8 100644 --- a/src/HOMARDGUI/MonEditListGroup.cxx +++ b/src/HOMARDGUI/MonEditListGroup.cxx @@ -4,17 +4,17 @@ using namespace std; #include //--------------------------------------------------------------------- -MonEditListGroup::MonEditListGroup( MonCreateHypothesis* parentHyp, - MonCreateBoundaryDi* parentBound, - bool modal, - HOMARD::HOMARD_Gen_var myHomardGen, - QString aCaseName, +MonEditListGroup::MonEditListGroup( MonCreateHypothesis* parentHyp, + MonCreateBoundaryDi* parentBound, + bool modal, + HOMARD::HOMARD_Gen_var myHomardGen, + QString aCaseName, QStringList listeGroupesHypo): //--------------------------------------------------------------------- MonCreateListGroup(parentHyp,parentBound,myHomardGen,aCaseName,listeGroupesHypo) { MESSAGE("Debut de MonEditListGroup"); - setWindowTitle("Edit ListGroup"); + setWindowTitle(QObject::tr("HOM_GROU_EDIT_WINDOW_TITLE")); setModal(true); InitGroupes(); } diff --git a/src/HOMARDGUI/MonEditZone.cxx b/src/HOMARDGUI/MonEditZone.cxx index 50226e8c..7be92406 100644 --- a/src/HOMARDGUI/MonEditZone.cxx +++ b/src/HOMARDGUI/MonEditZone.cxx @@ -18,7 +18,7 @@ MonEditZone::MonEditZone( MonCreateHypothesis* parent, bool modal, MonCreateZone(parent, myHomardGen, caseName) { MESSAGE("Debut de MonEditZone pour " << zoneName.toStdString().c_str()); - setWindowTitle("Edit Zone"); + setWindowTitle(QObject::tr("HOM_ZONE_EDIT_WINDOW_TITLE")); _aZoneName=zoneName; aZone = _myHomardGen->GetZone(_aZoneName.toStdString().c_str()); InitValEdit(); @@ -153,7 +153,7 @@ void MonEditZone::SetSphere() bool MonEditZone::CreateOrUpdateZone() //---------------------------------------------------- // Pas de Creation de la zone -// Mise a jour des attributs de la Zone +// Mise a jour des attributs de la Zone { try @@ -165,7 +165,7 @@ bool MonEditZone::CreateOrUpdateZone() HOMARD_UTILS::updateObjBrowser(); } catch( const SALOME::SALOME_Exception& S_ex ) { - SalomeApp_Tools::QtCatchCorbaException( S_ex ); + SalomeApp_Tools::QtCatchCorbaException( S_ex ); return false; } return true; diff --git a/src/HOMARDGUI/MonHomardDlg.cxx b/src/HOMARDGUI/MonHomardDlg.cxx deleted file mode 100644 index a79e1376..00000000 --- a/src/HOMARDGUI/MonHomardDlg.cxx +++ /dev/null @@ -1,331 +0,0 @@ -#include "MonHomardDlg.h" -#include "HomardConfigFile.hxx" -#include "HomardQtCommun.h" - -#include - -#include -#include -#include - -#include "HOMARDGUI_Utils.h" - -#include -#include "utilities.h" - -#define MIN_LISTBOX_WIDTH 150 -#define MIN_LISTBOX_HEIGHT 100 - -int MonHomardDlg::RootInfo = 100; - -//-------------------------------------------------------------------------------------------------------------------- -MonHomardDlg::MonHomardDlg( QWidget * parent, bool modal, HOMARD::HOMARD_Gen_ptr myHomardGen): - QWidget(0), - Ui_HomardDlg(), - bHisto(true),bBilan(true), bNomFichier(false), bNomMaillage(false), - _aFile(QString::null), _aMesh (QString::null) -//-------------------------------------------------------------------------------------------------------------------- -{ - setupUi(this); - setModal(true); - _myHomardGen=HOMARD::HOMARD_Gen::_duplicate(myHomardGen); - - _monCas = new HomardConfigFile(); - _monCas->initVal(string("Interpe3"),string("non")); - _monCas->initVal(string("Qualite5"),string("oui")); - _monCas->initVal(string("Nb_Enti7"),string("oui")); - _monCas->initVal(string("Connex11"),string("oui")); - _monCas->initVal(string("Taille13"),string("oui")); - _monCas->setBilan(true); - - initConnect(); - -} - -//----------------------------- -MonHomardDlg::~MonHomardDlg() -//----------------------------- -{ - // no need to delete child widgets, Qt does it all for us -} - -//----------------------------- -void MonHomardDlg::initConnect() -//----------------------------- -{ - connect( lancement, SIGNAL( pressed() ), this, SLOT( Lancement() ) ); - connect( terminer, SIGNAL( pressed() ), this, SLOT( close() ) ); - connect( ListeMeshName, SIGNAL( activated(int) ), this, SLOT( SetMaillage() ) ); - connect( NomFichier, SIGNAL( returnPressed() ), this, SLOT( SetNomFichier() ) ); - connect( PushFichier, SIGNAL( clicked() ), this, SLOT( PushNomFichier() ) ); - connect( Connexite, SIGNAL( stateChanged(int) ), this, SLOT( SetConnexite() ) ); - connect( Inter, SIGNAL( stateChanged(int) ), this, SLOT( SetInter() ) ); - connect( NbEntites, SIGNAL( stateChanged(int) ), this, SLOT( SetNbEntites() ) ); - connect( Histo, SIGNAL( stateChanged(int) ), this, SLOT( SetHisto() ) ); - connect( Qualite, SIGNAL( stateChanged(int) ), this, SLOT( SetQualite() ) ); - connect( Volumes, SIGNAL( stateChanged(int) ), this, SLOT( SetVolumes() ) ); - connect( Bilan, SIGNAL( stateChanged(int) ), this, SLOT( SetBilans() ) ); -} - -//----------------------------- -void MonHomardDlg::Lancement() -//----------------------------- -{ - if( ( bNomFichier==false) || (bNomMaillage ==false)) - { - QMessageBox::information( 0, "Mauvaise Selection", - QString(" Selectionner un Fichier et un Maillage SVP "), - QMessageBox::Ok + QMessageBox::Default ); - return; - } - - bool ok; - ok=_monCas->initVal(string("ModeHOMA"),string("2")); - ok=_monCas->initVal(string("ListeStd"),string(_aMesh.toStdString())+string(".info")); - ok=_monCas->initVal(string("CCAssoci"),string("MED")); - ok=_monCas->initVal(string("CCSolN__"),string(_aFile.toStdString())); - ok=_monCas->initVal(string("CCMaiN__"),string(_aFile.toStdString())); - ok=_monCas->initVal(string("CCNoMN__"),string(_aMesh.toStdString())); - ok=_monCas->initVal(string("PPBasFic"),string(_aMesh.toStdString())); - ok=_monCas->initVal(string("EcriFiHO"),string("non")); - - ok = _monCas->createFile(); - if ( ok == false) - { - QMessageBox::information( 0, "Mauvaise Selection", - QString("Probleme � la cr�ation du fichier Homard "), - QMessageBox::Ok + QMessageBox::Default ); - return; - } - - string fileDir=string(_monCas->getMyDir().c_str()); - char * dirchar; char * execchar; - string dir; string executable; - string result=string(_aMesh.toStdString())+string(".info"); - - if ( !(dirchar = getenv("HOMARD_REP_EXE")) ) - { dir=string("/local/logiciels/Homard"); } - else - { dir=string(dirchar); } - - if ( !(execchar = getenv("HOMARD_EXE")) ) - { executable =string("HOMARD"); } - else - { executable =string(execchar); } - - string commande = dir+"/"+executable; - string info = ";more *.info"; - string ou=string("cd ") + string(fileDir); - string tout=ou +string("; xterm -sb -hold -e \" ") + commande + info + string ("\""); - system(tout.c_str()); - int MonCasRoot = MonHomardDlg::RootInfo; - int TagInfo = 0; - MonHomardDlg::RootInfo = MonHomardDlg::RootInfo+1; - HOMARD_UTILS::AddNewRoot(MonCasRoot,QString(_aMesh)); - - if (bBilan == true) - { - QStringList Lesfichiers=HOMARD_UTILS::ChercheDansDir(fileDir.c_str(),QString("info"),-1); - QString FileComment=QString("HomardOuputInfo"); - for ( QStringList::Iterator it = Lesfichiers.begin(); it != Lesfichiers.end(); ++it ) - { - HOMARD_UTILS::RangeSousTag(MonCasRoot,(*it),TagInfo,FileComment,fileDir.c_str()); - TagInfo ++; - } - } - if (bHisto == true) - { - QStringList Lesfichiers=HOMARD_UTILS::ChercheDansDir(fileDir.c_str(),QString("qual"),-1); - QString FileComment=QString("HomardOuputQual"); - for ( QStringList::Iterator it = Lesfichiers.begin(); it != Lesfichiers.end(); ++it ) - { - HOMARD_UTILS::RangeSousTag(MonCasRoot,(*it),TagInfo,FileComment,fileDir.c_str()); - TagInfo ++; - } - } - HOMARD_UTILS::updateObjBrowser(); - close(); - -} - -//----------------------------- -void MonHomardDlg::SetBilans() -//----------------------------- -{ - if (Bilan->isChecked()) - { - _monCas->setBilan(true); - bBilan=true; - } - else - { - _monCas->setBilan(false); - bBilan=false; - } -} - -//----------------------------- -void MonHomardDlg::SetConnexite() -//----------------------------- -{ - bool ok; - if (Connexite->isChecked()) - { - ok=_monCas->initVal(string("Connex11"),string("oui")); - } - else - { - ok=_monCas->initVal(string("Connex11"),string("non")); - } - if ( ok ==false) - { - QMessageBox::information( 0, "Mauvaise Selection", - QString("Mauvaise valeur pour ce mot clef"), - QMessageBox::Ok + QMessageBox::Default ); - } -} - -//----------------------------- -void MonHomardDlg::SetInter() -//----------------------------- -{ - bool ok; - if (Inter->isChecked()) - { - ok=_monCas->initVal(string("Interpe3"),string("oui")); - } - else - { - ok=_monCas->initVal(string("Interpe3"),string("non")); - } - if ( ok ==false) - { - QMessageBox::information( 0, "Mauvaise Selection", - QString("Mauvaise valeur pour ce mot clef"), - QMessageBox::Ok + QMessageBox::Default ); - } -} - -//----------------------------- -void MonHomardDlg::SetNbEntites() -//----------------------------- -{ - bool ok; - if (NbEntites->isChecked()) - { - ok=_monCas->initVal(string("Nb_Enti7"),string("oui")); - } - else - { - ok=_monCas->initVal(string("Nb_Enti7"),string("non")); - } - if ( ok ==false) - { - QMessageBox::information( 0, "Mauvaise Selection", - QString("Mauvaise valeur pour ce mot clef"), - QMessageBox::Ok + QMessageBox::Default ); - } -} - -//----------------------------- -void MonHomardDlg::SetHisto() -//----------------------------- -{ - if (Histo->isChecked()) - { - bHisto=true; - } - else - { - bHisto=false; - } -} - -//----------------------------- -void MonHomardDlg::SetQualite() -//----------------------------- -{ - bool ok; - if (Qualite->isChecked()) - { - ok=_monCas->initVal(string("Qualite5"),string("oui")); - } - else - { - ok=_monCas->initVal(string("Qualite5"),string("non")); - } - if ( ok ==false) - { - QMessageBox::information( 0, "Mauvaise Selection", - QString("Mauvaise valeur pour ce mot clef"), - QMessageBox::Ok + QMessageBox::Default ); - } -} - -//----------------------------- -void MonHomardDlg::SetVolumes() -//----------------------------- -{ - bool ok; - if (Volumes->isChecked()) - { - ok=_monCas->initVal(string("Taille13"),string("oui")); - } - else - { - ok=_monCas->initVal(string("Taille13"),string("non")); - } - if ( ok ==false) - { - QMessageBox::information( 0, "Mauvaise Selection", - QString("Mauvaise valeur pour ce mot clef"), - QMessageBox::Ok + QMessageBox::Default ); - } - -} - -//--------------------------------- -void MonHomardDlg::PushNomFichier() -//--------------------------------- -{ - MESSAGE("Debut de PushNomFichier"); - bNomFichier=false; - _aFile=HOMARD_QT_COMMUN::PushNomFichier(); - if ( _aFile != QString::null) - { - NomFichier->setText(_aFile); - bNomFichier=true; - this->SetNomFichier(); - } -} - -//----------------------------------- -void MonHomardDlg::SetNomFichier() -//----------------------------------- -/* Ce slot est appele quand on entre le nom du fichier */ -{ - MESSAGE("Debut de SetNomFichier"); - _aFile=NomFichier->text(); - bNomFichier=true; - if ( HOMARD_QT_COMMUN::SetListeMaillages(_aFile,ListeMeshName)) - { - if (ListeMeshName->count() == 1) this->SetMaillage(); - } - else - { - bNomFichier=false; - _aFile=QString::null; - NomFichier->setText(_aFile); - } -} - - -//----------------------------------- -void MonHomardDlg::SetMaillage() -//----------------------------------- -{ - MESSAGE("Debut de SetMaillage"); - bNomMaillage = true; - _aMesh=ListeMeshName->currentText(); -} - diff --git a/src/HOMARDGUI/MonHomardDlg.h b/src/HOMARDGUI/MonHomardDlg.h deleted file mode 100644 index 2b044cf6..00000000 --- a/src/HOMARDGUI/MonHomardDlg.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef MONHOMARDDLG_H -#define MONHOMARDDLG_H - -#include "utilities.h" -#include "HomardDlg.h" -#include -#include -#include "SALOME_Selection.h" - -#include - -#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes) -#include CORBA_CLIENT_HEADER(HOMARD_Gen) - - -class HomardConfigFile; -class MonHomardDlg : public QWidget,public Ui_HomardDlg -{ - Q_OBJECT - -public: - MonHomardDlg( QWidget* parent, bool modal, HOMARD::HOMARD_Gen_ptr myHomardGen ); - ~MonHomardDlg(); - - virtual void initConnect(); - -public slots: - virtual void SetNomFichier(); - virtual void PushNomFichier(); - virtual void SetMaillage(); - virtual void SetNbEntites(); - virtual void Lancement(); - virtual void SetInter(); - virtual void SetBilans(); - virtual void SetConnexite(); - virtual void SetHisto(); - virtual void SetQualite(); - virtual void SetVolumes(); - -protected : - bool bHisto, bBilan; - bool bNomFichier, bNomMaillage; - - HOMARD::HOMARD_Gen_ptr _myHomardGen; - - HomardConfigFile* _monCas; - - QString _aFile; - QString _aMesh; - -private: - static int RootInfo; -}; - -#endif // MONHOMARDDLG_H