1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
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 isBoundaryDi(_PTR(SObject) MonObj);
77 bool isZone(_PTR(SObject) MonObj);
78 bool isHypo(_PTR(SObject) MonObj);
79 bool isIter(_PTR(SObject) MonObj);
80 bool isCase(_PTR(SObject) MonObj);
81 bool isFileMess(_PTR(SObject) MonObj);
82 bool isFileSummary(_PTR(SObject) MonObj);
83 bool isObject(_PTR(SObject) MonObj, QString TypeObject, int option );
85 QString ChercheFileDansSelection();
86 QStringList ChercheDansDir (QString direct, QString base, int numIter);
87 void RangeSousTag (int Tag,QString FileName, int TagFichier, QString Comment,QString FileDir);
89 void PushOnHelp(QString monFichierAide);
91 QString Transforme(int num);
93 void AddNewRoot(int Tag, QString Racine);
94 extern SALOME_ListIO mySelected;
97 #endif // ifndef HOMARD_H_UTILS