Salome HOME
Introduction of informations on the meshes
[modules/homard.git] / src / HOMARDGUI / HOMARDGUI.h
1 // Copyright (C) 2011-2012  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 //  HOMARDGUI : HOMARD component GUI implemetation
21 //
22
23 #ifndef _HOMARDGUI_H_
24 #define _HOMARDGUI_H_
25
26 #include <SalomeApp_Module.h>
27 #include "SalomeApp_Study.h"
28
29 #include <SALOMEconfig.h>
30 #include <SALOME_LifeCycleCORBA.hxx>
31 #include CORBA_CLIENT_HEADER(HOMARD_Gen)
32 #include CORBA_CLIENT_HEADER(HOMARD_Cas)
33 #include CORBA_CLIENT_HEADER(HOMARD_Hypothesis)
34
35 #include <QtCore/QString>
36
37 class SalomeApp_Application;
38
39 class HOMARDGUI: public SalomeApp_Module
40 {
41   Q_OBJECT
42
43 public:
44    HOMARDGUI(const QString&);
45   ~HOMARDGUI();
46
47
48
49   virtual bool OnGUIEvent (int theCommandID);
50   void    initialize( CAM_Application* );
51   QString engineIOR() const;
52   void    windows( QMap<int, int>& ) const;
53
54   static HOMARD::HOMARD_Gen_var InitHOMARDGen(SalomeApp_Application* );
55
56
57 public slots:
58     bool    deactivateModule( SUIT_Study* );
59     bool    activateModule( SUIT_Study* );
60     static void setOrb();
61
62 private slots:
63     void OnGUIEvent();
64     void EditAsciiFile();
65     void LanceCalcul();
66     void IterInfo();
67     void NextIter();
68     void Edit();
69     void Delete();
70     void XmGraceFichier();
71
72 public:
73    virtual void  contextMenuPopup( const QString&, QMenu*, QString& );
74
75
76 private:
77    void createHOMARDAction( const int id, const QString& po_id, const QString& icon_id = QString(""),
78                             const int key = 0, const bool toggle = false );
79    void createActions();
80    void createMenus();
81    void createPopupMenus();
82    _PTR(SObject)  chercheMonObjet();
83
84    virtual void createPreferences();
85    HOMARD::HOMARD_Gen_var myComponentHomard;
86    SALOMEDS::Study_var       myStudy;
87
88    int anId;
89    QString _ObjectName;
90 };
91
92 #endif