Salome HOME
Changements de noms HOMARD ==> ADAPT
[modules/smesh.git] / src / ADAPTGUI / ADAPTGUI.h
1 // Copyright (C) 2011-2020  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 //  ADAPTGUI : HOMARD component GUI implemetation
21 //
22
23 #ifndef _ADAPTGUI_H_
24 #define _ADAPTGUI_H_
25
26 #include "HOMARDGUI_Exports.hxx"
27
28 #include <SalomeApp_Module.h>
29 #include "SalomeApp_Study.h"
30
31 #include <SALOMEconfig.h>
32 #include <SALOME_LifeCycleCORBA.hxx>
33 #include CORBA_CLIENT_HEADER(ADAPT_Gen)
34 #include CORBA_CLIENT_HEADER(HOMARD_Cas)
35 #include CORBA_CLIENT_HEADER(HOMARD_Hypothesis)
36
37 #include <QString>
38
39 class SalomeApp_Application;
40
41 class HOMARD_EXPORT ADAPTGUI: public SalomeApp_Module
42 {
43   Q_OBJECT
44
45 public:
46    ADAPTGUI(const QString&);
47   ~ADAPTGUI();
48
49
50
51   virtual bool OnGUIEvent (int theCommandID);
52   void    initialize( CAM_Application* );
53   QString engineIOR() const;
54   void    windows( QMap<int, int>& ) const;
55
56   static ADAPT::ADAPT_Gen_var InitHOMARDGen(SalomeApp_Application* );
57
58
59 public slots:
60     bool    deactivateModule( SUIT_Study* );
61     bool    activateModule( SUIT_Study* );
62     static void setOrb();
63
64 private slots:
65     void OnGUIEvent();
66     void EditAsciiFile();
67     void LanceCalcul0();
68     void LanceCalcul1();
69     void IterInfo();
70     void NextIter();
71     void MeshPublish0();
72     void MeshPublish1();
73     void YACSCreate();
74     void YACSWrite();
75     void Edit();
76     void Delete();
77
78 public:
79    virtual void  contextMenuPopup( const QString&, QMenu*, QString& );
80
81
82 private:
83    void createHOMARDAction( const int id, const QString& po_id, const QString& icon_id = QString(""),
84                             const int key = 0, const bool toggle = false );
85    void createActions();
86    void createMenus();
87    void recupPreferences();
88    void createPopupMenus();
89    _PTR(SObject)  chercheMonObjet();
90
91    virtual void createPreferences();
92    ADAPT::ADAPT_Gen_var myComponentHomard;
93
94    int anId;
95    QString _ObjectName;
96    QString _LanguageShort ;
97    int _PublisMeshIN ;
98    int _PublisMeshOUT ;
99    int _YACSMaxIter ;
100    int _YACSMaxNode ;
101    int _YACSMaxElem ;
102    int _YACSTypeTest ;
103 };
104
105 #endif