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