27 #ifndef BLSURFPLUGINGUI_HypothesisCreator_H
28 #define BLSURFPLUGINGUI_HypothesisCreator_H
31 #ifdef _POSIX_C_SOURCE
32 #undef _POSIX_C_SOURCE
40 #if defined BLSURFPLUGIN_GUI_EXPORTS || defined BLSURFPluginGUI_EXPORTS
41 #define BLSURFPLUGIN_GUI_EXPORT __declspec( dllexport )
43 #define BLSURFPLUGIN_GUI_EXPORT __declspec( dllimport )
46 #define BLSURFPLUGIN_GUI_EXPORT
53 #include <Standard_math.hxx>
59 #include <QItemDelegate>
61 #include <SMESHGUI_Hypotheses.h>
62 #include "StdMeshersGUI_ObjectReferenceParamWdg.h"
63 #include <SALOMEconfig.h>
68 #include <TopAbs_ShapeEnum.hxx>
69 #include <GeomSelectionTools.h>
70 #include <GEOM_Client.hxx>
71 #include CORBA_SERVER_HEADER(BLSURFPlugin_Algorithm)
85 class QTreeWidgetItem;
86 class QTableWidgetItem;
93 class SMESHGUI_SpinBox;
94 class SMESH_NumberFilter;
95 class LightApp_SelectionMgr;
98 class StdMeshersGUI_SubShapeSelectorWdg;
124 TAttractor(
const char* theAttEntry,
double theStartSize,
double theInfDist,
double theConstDist)
169 bool myAnisotropic, myOptimiseTinyEdges,
myRemoveTinyEdges, myForceBadElementRemoval, myCorrectSurfaceIntersection;
170 double myAnisotropicRatio, myTinyEdgeLength,
myTinyEdgeOptimisLength, myBadElementAspectRatio, myCorrectSurfaceIntersectionMaxCost;
172 bool myAllowQuadrangles,
mySmpsurface,mySmpedge,mySmppoint,myEnforcedVertex,myInternalEnforcedVerticesAllFaces;
198 virtual bool checkParams(QString& msg)
const;
199 virtual QString helpPage()
const;
202 virtual QFrame* buildFrame ();
203 virtual void retrieveParams()
const;
204 virtual QString storeParams ()
const;
206 virtual QString caption()
const;
207 virtual QPixmap icon()
const;
208 virtual QString type()
const;
211 void onStateChange();
214 void onChangeOptionName(
int,
int );
216 void onMapGeomContentModified();
217 void onSmpItemClicked( QTreeWidgetItem *,
int );
218 void onTabChanged(
int);
219 void onAttractorClicked(
int);
220 void onConstSizeClicked(
int);
224 void onSetSizeMap(QTreeWidgetItem *,
int);
226 QTreeWidgetItem* addEnforcedFace(std::string theFaceEntry, std::string theFaceName);
227 void addEnforcedVertex(
double x=0,
double y=0,
double z=0,
228 std::string vertexName =
"",
229 std::string geomEntry =
"",
230 std::string groupName =
"");
231 void onAddEnforcedVertices();
232 void onRemoveEnforcedVertex();
233 void synchronizeCoords();
234 void updateEnforcedVertexValues(QTreeWidgetItem* ,
int );
235 void onSelectEnforcedVertex();
236 void clearEnforcedVertexWidgets();
237 void onInternalVerticesClicked(
int);
239 void onPeriodicityByVerticesChecked(
bool);
240 void onAddPeriodicity();
241 void onRemovePeriodicity();
242 void onPeriodicityTreeClicked(QTreeWidgetItem*,
int);
243 void onPeriodicityContentModified();
245 void onHyPatchFaceSelection(
bool);
246 void onHyPatchGroupSelection(
bool);
247 void onHyPatchSelectionChanged();
249 void onHyPatchRemove();
255 bool sizeMapsValidation();
256 bool sizeMapValidationFromRow(
int,
bool displayError =
true);
257 bool sizeMapValidationFromEntry(QString,
bool displayError =
true);
258 GeomSelectionTools* getGeomSelectionTool()
const;
259 GEOM::GEOM_Gen_var getGeomEngine();
260 bool insertElement( GEOM::GEOM_Object_var,
bool modify =
false );
261 bool insertAttractor(GEOM::GEOM_Object_var, GEOM::GEOM_Object_var,
bool modify =
false);
262 int findRowFromEntry(QString entry);
263 CORBA::Object_var entryToObject(QString entry);
264 static LightApp_SelectionMgr* selectionMgr();
265 void avoidSimultaneousSelection(ListOfWidgets &myCustomWidgets)
const;
266 void AddPreCadSequenceToVector(
BlsurfHypothesisData& h_data, BLSURFPlugin::TPeriodicityList_var preCadFacePeriodicityVector,
bool onFace)
const;
267 void addHyPatchToTable(
const QString& tags);
268 bool hasGeom()
const;
398 const QModelIndex &index)
const;
402 const QModelIndex &index)
const;
405 const QModelIndex &index)
const;
407 bool vertexExists(QAbstractItemModel *model,
const QModelIndex &index, QString value)
const;
410 #endif // BLSURFPLUGINGUI_HypothesisCreator_H