]> SALOME platform Git repositories - modules/homard.git/blob - src/HOMARDGUI/MonEditYACS.cxx
Salome HOME
Schémas YACS - suite
[modules/homard.git] / src / HOMARDGUI / MonEditYACS.cxx
1 // Copyright (C) 2011-2013  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 using namespace std;
21
22 #include "MonEditYACS.h"
23
24 #include "SalomeApp_Tools.h"
25 #include "HOMARDGUI_Utils.h"
26 #include "HomardQtCommun.h"
27 #include <utilities.h>
28
29
30 // -------------------------------------------------------------
31 /* Constructs a MonEditYACS
32     herite de MonCreateYACS
33 */
34 // -------------------------------------------------------------
35 MonEditYACS::MonEditYACS ( QWidget* parent, bool modal,
36                            HOMARD::HOMARD_Gen_var myHomardGen,
37                            QString Name ):
38    MonCreateYACS(parent, modal, myHomardGen, Name)
39 {
40     MESSAGE("Debut de MonEditYACS" << Name.toStdString().c_str());
41     setWindowTitle(QObject::tr("HOM_YACS_EDIT_WINDOW_TITLE"));
42     _Name = Name;
43     aYACS = myHomardGen->GetYACS(_Name.toStdString().c_str());
44     InitValEdit();
45 }
46 // ------------------------------
47 MonEditYACS::~MonEditYACS()
48 // ------------------------------
49 {
50 }
51 // ------------------------------
52 void MonEditYACS::InitValEdit()
53 // ------------------------------
54 {
55   MESSAGE("InitValEdit");
56   LEName->setText(_Name);
57   LEName->setReadOnly(true);
58
59   QString aCaseName = aYACS->GetCaseName();
60   LECaseName->setText(aCaseName);
61   LECaseName->setReadOnly(true);
62   PushDir->setVisible(0);
63
64   QString aScriptFile = aYACS->GetScriptFile();
65   LEScriptFile->setText(aScriptFile);
66   LEScriptFile->setReadOnly(true);
67   PushDir->setVisible(0);
68
69   QString aDirName = aYACS->GetDirName();
70   LEDirName->setText(aDirName);
71   LEDirName->setReadOnly(true);
72   PushDir->setVisible(0);
73
74   QString aMeshFile = aYACS->GetMeshFile();
75   LEMeshFile->setText(aMeshFile);
76   LEMeshFile->setReadOnly(true);
77   PushDir->setVisible(0);
78
79   int Type=aYACS->GetType();
80   if(Type==1) { RBStatic->setChecked(true); }
81   else        { RBTransient->setChecked(true); };
82   RBStatic->setEnabled(false);
83   RBTransient->setEnabled(false);
84 //
85   adjustSize();
86 }
87
88 // -------------------------------------
89 bool MonEditYACS::PushOnApply()
90 // -------------------------------------
91 {
92   return true ;
93 };