1 // Copyright (C) 2011-2021 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef SMESH_HOMARD_H_UTILS
21 #define SMESH_HOMARD_H_UTILS
23 #include "SMESH_SMESHGUI.hxx"
25 #include <SALOMEconfig.h>
27 #include <omniORB4/CORBA.h>
28 //#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes)
29 #include CORBA_CLIENT_HEADER(SMESH_Homard)
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 //#include <SALOME_Selection.h>
37 #include <SalomeApp_Module.h>
49 class SUIT_ViewWindow;
52 class SUIT_ResourceMgr;
56 class SALOMEDSClient_Study;
57 class SALOMEDSClient_SObject;
59 class SalomeApp_Study;
60 class SalomeApp_Module;
61 class LightApp_SelectionMgr;
63 namespace SMESH_HOMARD_UTILS {
65 SMESHGUI_EXPORT SUIT_Study* GetActiveStudy();
66 SMESHGUI_EXPORT _PTR(Study) getStudy();
68 SMESHGUI_EXPORT void updateObjBrowser();
70 // Function returns a list of SALOME_InteractiveObject's from
71 // selection manager in GUI
72 SMESHGUI_EXPORT const SALOME_ListIO& selectedIO();
74 // Function returns the number of selected objects
75 SMESHGUI_EXPORT int IObjectCount();
77 // Function returns the first selected object in the list
78 // of selected objects
79 SMESHGUI_EXPORT Handle(SALOME_InteractiveObject) firstIObject() ;
81 // Function returns the last selected object in the list
82 // of selected objects
83 SMESHGUI_EXPORT Handle(SALOME_InteractiveObject) lastIObject() ;
85 SMESHGUI_EXPORT bool isBoundaryCAO(_PTR(SObject) MonObj);
86 SMESHGUI_EXPORT bool isBoundaryAn(_PTR(SObject) MonObj);
87 SMESHGUI_EXPORT bool isBoundaryDi(_PTR(SObject) MonObj);
88 SMESHGUI_EXPORT bool isCase(_PTR(SObject) MonObj);
89 SMESHGUI_EXPORT bool isHypo(_PTR(SObject) MonObj);
90 SMESHGUI_EXPORT bool isIter(_PTR(SObject) MonObj);
91 SMESHGUI_EXPORT bool isFileType(_PTR(SObject) MonObj, QString TypeFile);
92 SMESHGUI_EXPORT bool isObject(_PTR(SObject) MonObj, QString TypeObject, int option );
94 extern SALOME_ListIO mySelected;
97 namespace SMESH_HOMARD_QT_COMMUN
99 SMESHGUI_EXPORT QString PushNomFichier(bool avertir, QString TypeFichier="");
100 SMESHGUI_EXPORT QString LireNomMaillage(QString aFile);
101 SMESHGUI_EXPORT QString LireNomMaillage2(med_idt Medidt,int MeshId);
103 SMESHGUI_EXPORT med_idt OuvrirFichier(QString aFile);
105 SMESHGUI_EXPORT std::list<QString> GetListeChamps(QString aFile);
106 SMESHGUI_EXPORT std::list<QString> GetListeComposants(QString aFile, QString aChamp);
108 SMESHGUI_EXPORT QString SelectionArbreEtude(QString commentaire, int grave );
109 SMESHGUI_EXPORT QString SelectionCasEtude();
112 #endif // ifndef SMESH_HOMARD_H_UTILS