1 // SMESH SMESHGUI : GUI for SMESH component
3 // Copyright (C) 2003 CEA
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License.
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 // File : SMESHGUI_HypothesesUtils.h
22 // Author : Julia DOROVSKIKH, Open CASCADE S.A.S.
25 #ifndef SMESHGUI_HYPOTHESESUTILS_H
26 #define SMESHGUI_HYPOTHESESUTILS_H
29 #include "SMESH_SMESHGUI.hxx"
33 #include <QStringList>
35 // SALOME GUI includes
36 #include <SALOME_InteractiveObject.hxx>
38 // SALOME KERNEL includes
39 #include <SALOMEDSClient_definitions.hxx>
42 #include <SALOMEconfig.h>
43 #include CORBA_SERVER_HEADER(SMESH_Mesh)
44 #include CORBA_SERVER_HEADER(SMESH_Hypothesis)
51 class SMESHGUI_GenericHypothesisCreator;
52 class SALOMEDSClient_SObject;
53 class algo_error_array;
58 void InitAvailableHypotheses();
61 QStringList GetAvailableHypotheses( const bool,
66 QStringList GetHypothesesSets();
69 HypothesesSet* GetHypothesesSet( const QString& );
72 HypothesisData* GetHypothesisData( const QString& );
75 bool IsAvailableHypothesis( const HypothesisData*,
80 bool IsCompatibleAlgorithm( const HypothesisData*,
81 const HypothesisData* );
84 SMESHGUI_GenericHypothesisCreator* GetHypothesisCreator( const QString& );
87 SMESH::SMESH_Hypothesis_ptr CreateHypothesis( const QString&,
92 bool AddHypothesisOnMesh( SMESH::SMESH_Mesh_ptr, SMESH::SMESH_Hypothesis_ptr );
95 bool AddHypothesisOnSubMesh( SMESH::SMESH_subMesh_ptr, SMESH::SMESH_Hypothesis_ptr );
98 bool RemoveHypothesisOrAlgorithmOnMesh( const Handle(SALOME_InteractiveObject)& );
101 bool RemoveHypothesisOrAlgorithmOnMesh( _PTR(SObject),
102 SMESH::SMESH_Hypothesis_ptr );
104 typedef std::vector<_PTR(SObject)> SObjectList;
105 SObjectList GetMeshesUsingAlgoOrHypothesis( SMESH::SMESH_Hypothesis_ptr );
108 QString GetMessageOnAlgoStateErrors( const algo_error_array& );
111 #endif // SMESHGUI_HYPOTHESESUTILS_H