1 // Copyright (C) 2011-2013 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 #include "MonEditYACS.h"
24 #include "SalomeApp_Tools.h"
25 #include "HOMARDGUI_Utils.h"
26 #include "HomardQtCommun.h"
27 #include <utilities.h>
30 // -------------------------------------------------------------
31 /* Constructs a MonEditYACS
32 herite de MonCreateYACS
34 // -------------------------------------------------------------
35 MonEditYACS::MonEditYACS ( QWidget* parent, bool modal,
36 HOMARD::HOMARD_Gen_var myHomardGen,
38 MonCreateYACS(parent, modal, myHomardGen, Name)
40 MESSAGE("Debut de MonEditYACS" << Name.toStdString().c_str());
41 setWindowTitle(QObject::tr("HOM_YACS_EDIT_WINDOW_TITLE"));
43 aYACS = myHomardGen->GetYACS(_Name.toStdString().c_str());
46 // ------------------------------
47 MonEditYACS::~MonEditYACS()
48 // ------------------------------
51 // ------------------------------
52 void MonEditYACS::InitValEdit()
53 // ------------------------------
55 MESSAGE("InitValEdit");
56 LEName->setText(_Name);
57 LEName->setReadOnly(true);
59 QString aCaseName = aYACS->GetCaseName();
60 LECaseName->setText(aCaseName);
61 LECaseName->setReadOnly(true);
62 PushDir->setVisible(0);
64 QString aScriptFile = aYACS->GetScriptFile();
65 LEScriptFile->setText(aScriptFile);
66 LEScriptFile->setReadOnly(true);
67 PushDir->setVisible(0);
69 QString aDirName = aYACS->GetDirName();
70 LEDirName->setText(aDirName);
71 LEDirName->setReadOnly(true);
72 PushDir->setVisible(0);
74 QString aMeshFile = aYACS->GetMeshFile();
75 LEMeshFile->setText(aMeshFile);
76 LEMeshFile->setReadOnly(true);
77 PushDir->setVisible(0);
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);
88 // -------------------------------------
89 bool MonEditYACS::PushOnApply()
90 // -------------------------------------