Salome HOME
Porting HOMARD SALOME module on WIN32 platform.
[modules/homard.git] / src / HOMARDGUI / HOMARDGUI.h
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 //  HOMARDGUI : HOMARD component GUI implemetation
21 //
22
23 #ifndef _HOMARDGUI_H_
24 #define _HOMARDGUI_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(HOMARD_Gen)
34 #include CORBA_CLIENT_HEADER(HOMARD_Cas)
35 #include CORBA_CLIENT_HEADER(HOMARD_Hypothesis)
36
37 #include <QtCore/QString>
38
39 class SalomeApp_Application;
40
41 class HOMARD_EXPORT HOMARDGUI: public SalomeApp_Module
42 {
43   Q_OBJECT
44
45 public:
46    HOMARDGUI(const QString&);
47   ~HOMARDGUI();
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 HOMARD::HOMARD_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 LanceCalcul();
68     void IterInfo();
69     void NextIter();
70     void YACSCreate();
71     void YACSWrite();
72     void Edit();
73     void Delete();
74
75 public:
76    virtual void  contextMenuPopup( const QString&, QMenu*, QString& );
77
78
79 private:
80    void createHOMARDAction( const int id, const QString& po_id, const QString& icon_id = QString(""),
81                             const int key = 0, const bool toggle = false );
82    void createActions();
83    void createMenus();
84    void createPopupMenus();
85    _PTR(SObject)  chercheMonObjet();
86
87    virtual void createPreferences();
88    HOMARD::HOMARD_Gen_var myComponentHomard;
89    SALOMEDS::Study_var       myStudy;
90
91    int anId;
92    QString _ObjectName;
93    QString _LanguageShort ;
94 };
95
96 #endif