1 // Copyright (C) 2011-2012 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.
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 HOMARD_H_UTILS
21 #define HOMARD_H_UTILS
24 #include <SALOMEconfig.h>
27 #include CORBA_CLIENT_HEADER(HOMARD_Cas)
28 #include CORBA_CLIENT_HEADER(HOMARD_Gen)
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>
39 class SUIT_ViewWindow;
42 class SUIT_ResourceMgr;
46 class SALOMEDSClient_Study;
47 class SALOMEDSClient_SObject;
49 class SalomeApp_Study;
50 class SalomeApp_Module;
51 class LightApp_SelectionMgr;
53 namespace HOMARD_UTILS {
56 GetCStudy(const SalomeApp_Study* theStudy);
57 SUIT_Study* GetActiveStudy();
58 _PTR(Study) GetActiveStudyDocument();
60 void updateObjBrowser();
62 const SALOME_ListIO& selectedIO(); // Function returns a list of SALOME_InteractiveObject's from
63 // selection manager in GUI
65 int IObjectCount() ; // Function returns the number of selected objects
67 Handle(SALOME_InteractiveObject) firstIObject() ;
68 // Function returns the first selected object in the list
69 // of selected objects
71 Handle(SALOME_InteractiveObject) lastIObject() ;
72 // Function returns the last selected object in the list
73 // of selected objects
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 isFileMess(_PTR(SObject) MonObj);
83 bool isFileSummary(_PTR(SObject) MonObj);
84 bool isObject(_PTR(SObject) MonObj, QString TypeObject, int option );
86 void PushOnHelp(QString monFichierAide);
88 extern SALOME_ListIO mySelected;
91 #endif // ifndef HOMARD_H_UTILS