25 #ifndef SMESHGUI_MESHINFO_H
26 #define SMESHGUI_MESHINFO_H
31 #ifndef DISABLE_PLOT2DVIEWER
32 #include <Plot2d_Histogram.h>
42 #include <QTreeWidget>
45 #include <SALOMEconfig.h>
46 #include CORBA_SERVER_HEADER(SMESH_Mesh)
47 #include CORBA_SERVER_HEADER(SMESH_Group)
48 #include CORBA_SERVER_HEADER(SMESH_Filter)
50 #include <SALOME_InteractiveObject.hxx>
51 #include <SALOME_GenericObj_wrap.hxx>
53 class QAbstractButton;
56 class QContextMenuEvent;
81 iElementsStart = iNodesEnd,
110 iElementsEnd = i3DEnd
128 void showInfo( SMESH::SMESH_IDSource_ptr );
130 void saveInfo( QTextStream &out );
133 enum { Bold = 0x01, Italic = 0x02 };
135 QLabel* createField();
137 void setFontAttributes(
QWidget*,
int,
bool =
true );
138 void setFieldsVisible(
int,
int,
bool );
157 void showInfo(
long,
bool );
158 void showInfo( QSet<long>,
bool );
160 virtual void saveInfo( QTextStream &out ) = 0;
168 XYZ() { myX = myY = myZ = 0.0; }
169 XYZ(
double x,
double y,
double z) { myX = x; myY = y; myZ = z; }
170 void add(
double x,
double y,
double z ) { myX += x; myY += y; myZ += z; }
171 void divide(
double a ) {
if ( a != 0.) { myX /= a; myY /= a; myZ /= a; } }
172 double x()
const {
return myX; }
173 double y()
const {
return myY; }
174 double z()
const {
return myZ; }
175 operator gp_XYZ()
const {
return gp_XYZ( myX, myY, myZ ); }
181 bool isElements()
const;
183 virtual void information(
const QList<long>& ) = 0;
184 virtual void clearInternal();
192 void itemInfo(
int );
193 void itemInfo(
const QString& );
198 void updateControls();
231 enum { Bold = 0x01, All = 0x80 };
238 void contextMenuEvent( QContextMenuEvent* e );
240 void nodeInfo(
const SMDS_MeshNode*,
int,
int, QTreeWidgetItem* );
244 void itemDoubleClicked( QTreeWidgetItem*,
int );
245 void saveExpanded( QTreeWidgetItem* );
248 QTreeWidgetItem* createItem( QTreeWidgetItem* = 0,
int = 0 );
249 QString expandedResource( QTreeWidgetItem* );
276 enum { Bold = 0x01, All = 0x80 };
282 void showInfo( SMESH::SMESH_IDSource_ptr );
284 void saveInfo( QTextStream &out );
287 void changeLoadToCompute();
288 void showPreviousGroups();
289 void showNextGroups();
290 void showPreviousSubMeshes();
291 void showNextSubMeshes();
294 QTreeWidgetItem* createItem( QTreeWidgetItem* = 0,
int = 0 );
295 void meshInfo( SMESH::SMESH_Mesh_ptr, QTreeWidgetItem* );
296 void subMeshInfo( SMESH::SMESH_subMesh_ptr, QTreeWidgetItem* );
297 void groupInfo( SMESH::SMESH_GroupBase_ptr, QTreeWidgetItem* );
300 void showSubMeshes();
316 void showInfo( SMESH::SMESH_IDSource_ptr );
317 void saveInfo( QTextStream &out );
321 QLabel* createField();
323 void setFontAttributes(
QWidget* );
324 void clearInternal();
325 #ifndef DISABLE_PLOT2DVIEWER
326 Plot2d_Histogram* getHistogram( SMESH::NumericalFunctor_ptr functor );
328 void computeNb(
int ft,
int iBut,
int iWdg );
331 void computeAspectRatio();
332 void computeAspectRatio3D();
333 void computeFreeNodesInfo();
334 void computeNodesNbConnInfo();
335 void computeDoubleNodesInfo();
336 void computeDoubleEdgesInfo();
337 void computeDoubleFacesInfo();
338 void computeOverConstrainedFacesInfo();
339 void computeDoubleVolumesInfo();
340 void computeOverConstrainedVolumesInfo();
341 void setTolerance(
const double theTolerance );
345 typedef SALOME::GenericObj_wrap< SMESH::Predicate >
TPredicate;
346 typedef SALOME::GenericObj_wrap< SMESH::NumericalFunctor >
TNumFunctor;
377 void showInfo(
const Handle(SALOME_InteractiveObject)& );
381 void keyPressEvent( QKeyEvent* );
382 void enterEvent( QEvent* );
386 void updateSelection();
392 void idPreviewChange(
bool);
393 void showItemInfo(
int );
394 void showItemInfo(
const QString& );
408 Handle(SALOME_InteractiveObject) myIO;
419 void showInfo(
const Handle(SALOME_InteractiveObject)& );
426 void updateSelection();
434 #endif // SMESHGUI_MESHINFO_H