Salome HOME
Introduction de la doculmentation en anglais - phase 3
[modules/homard.git] / src / HOMARDGUI / HOMARDGUI_Utils.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 #ifndef HOMARD_H_UTILS
21 #define HOMARD_H_UTILS
22
23
24 #include <SALOMEconfig.h>
25
26 #include <CORBA.h>
27 #include CORBA_CLIENT_HEADER(HOMARD_Cas)
28 #include CORBA_CLIENT_HEADER(HOMARD_Gen)
29
30 #include "SALOMEDSClient_definitions.hxx"
31 #include "SALOME_InteractiveObject.hxx"
32 #include "LightApp_DataOwner.h"
33 #include "SalomeApp_Application.h"
34 #include <SALOME_ListIO.hxx>
35
36 class QString;
37 class QStringList;
38
39 class SUIT_ViewWindow;
40 class SUIT_Desktop;
41 class SUIT_Study;
42 class SUIT_ResourceMgr;
43
44 class CAM_Module;
45
46 class SALOMEDSClient_Study;
47 class SALOMEDSClient_SObject;
48
49 class SalomeApp_Study;
50 class SalomeApp_Module;
51 class LightApp_SelectionMgr;
52
53 namespace HOMARD_UTILS {
54
55   _PTR(Study)
56   GetCStudy(const SalomeApp_Study* theStudy);
57   SUIT_Study* GetActiveStudy();
58   _PTR(Study) GetActiveStudyDocument();
59
60   void updateObjBrowser();
61
62   const SALOME_ListIO& selectedIO();    // Function returns a list of SALOME_InteractiveObject's from
63                                         // selection manager in GUI
64
65   int   IObjectCount() ;                // Function returns the number of selected objects
66
67   Handle(SALOME_InteractiveObject) firstIObject() ;
68                                         // Function returns the first selected object in the list
69                                         // of selected objects
70
71   Handle(SALOME_InteractiveObject) lastIObject() ;
72                                       // Function returns the last selected object in the list
73                                        // of selected objects
74
75   bool isXmgrace(_PTR(SObject)  MonObj);
76   bool isBoundaryAn(_PTR(SObject)  MonObj);
77   bool isBoundaryDi(_PTR(SObject)  MonObj);
78   bool isZone(_PTR(SObject)  MonObj);
79   bool isHypo(_PTR(SObject)  MonObj);
80   bool isIter(_PTR(SObject)  MonObj);
81   bool isCase(_PTR(SObject)  MonObj);
82   bool isFilelog(_PTR(SObject)  MonObj);
83   bool isFileSummary(_PTR(SObject)  MonObj);
84   bool isObject(_PTR(SObject)  MonObj, QString TypeObject, int option );
85
86   void PushOnHelp(QString monFichierAide, QString leContexte);
87
88   extern SALOME_ListIO mySelected;
89 }
90
91 #endif // ifndef HOMARD_H_UTILS