Version: 9.16.0
SMESHGUI_ComputeDlg.h
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
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, or (at your option) any later version.
7//
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.
12//
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
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20// File : SMESHGUI_ComputeDlg.h
21// Author : Edward AGAPOV, Open CASCADE S.A.S.
22//
23#ifndef SMESHGUI_COMPUTEDLG_H
24#define SMESHGUI_COMPUTEDLG_H
25
26// SMESH includes
27#include "SMESH_SMESHGUI.hxx"
28
29#include "SMESHGUI_Dialog.h"
30#include "SMESHGUI_Operation.h"
31
32// SALOME GUI includes
33#include <SALOME_InteractiveObject.hxx>
34
35// Qt includes
36#include <QMap>
37#include <QList>
38#include <QPointer>
39#include <QGroupBox>
40#include <QThread>
41
42// IDL includes
43#include <SALOMEconfig.h>
44#include CORBA_SERVER_HEADER(SMESH_Gen)
45#include CORBA_SERVER_HEADER(SMESH_Mesh)
46
47class QFrame;
48class QPushButton;
49class QTableWidget;
50class QLabel;
51class QtxComboBox;
52class QProgressBar;
57
58namespace SMESH
59{
60 class TShapeDisplayer;
61}
62
67{
68 Q_OBJECT
69
70public:
73
74 SMESH::SMESH_Mesh_ptr getMesh();
75 virtual LightApp_Dialog* dlg() const;
76
77protected:
78 virtual void startOperation();
79 virtual void stopOperation();
80
81 SMESHGUI_ComputeDlg* computeDlg() const;
82 void computeMesh();
83 void showComputeResult( const bool,
84 const bool,
85 SMESH::compute_error_array_var&,
86 const bool,
87 const QString& );
88 SMESHGUI_ComputeDlg* evaluateDlg() const;
89 void evaluateMesh();
90 void showEvaluateResult(const SMESH::smIdType_array& theRes,
91 const bool,
92 const bool,
93 SMESH::compute_error_array_var&,
94 const bool,
95 const QString&);
96
97 virtual bool isValid( SUIT_Operation* theOp ) const;
98 void logMeshSize();
99
100protected slots:
101 virtual bool onApply();
102 void onPreviewShape();
103 void onPublishShape();
104 void onShowBadMesh();
105 void onGroupOfBadMesh();
106 void currentCellChanged();
107
108private:
109 QTableWidget* table();
110
111private:
112 QPointer<SMESHGUI_ComputeDlg> myCompDlg;
113
114protected:
115 SMESH::SMESH_Mesh_var myMesh;
116 GEOM::GEOM_Object_var myMainShape;
117 GEOM::GEOM_Object_var myCurShape;
120 Handle(SALOME_InteractiveObject) myIObject;
121};
122
127{
128 Q_OBJECT
129
130public:
132 virtual ~SMESHGUI_ComputeOp();
133
134 virtual LightApp_Dialog* dlg() const;
135
136protected:
137 virtual void startOperation();
138
139protected slots:
140};
141
143
148{
149 Q_OBJECT
150
151public:
153 virtual ~SMESHGUI_PrecomputeOp();
154
155 virtual LightApp_Dialog* dlg() const;
156
160 static void getAssignedAlgos(_PTR(SObject) theMesh,
161 QMap<int,int>& theModeMap);
162
163protected:
164 virtual void startOperation();
165 virtual void stopOperation();
166 virtual void resumeOperation();
167
168 virtual void initDialog();
169
170protected slots:
171 virtual void onCancel();
172
173private slots:
174 void onPreview();
175 void onCompute();
176
177private:
179 QMap< int, int > myMapShapeId;
180 QPointer<LightApp_Dialog> myActiveDlg;
181 QPointer<SMESHGUI_PrecomputeDlg> myDlg;
184 typedef QList<int> TListOfInt;
185 typedef QList<TListOfInt> TListOfListOfInt;
188};
189
194{
195 Q_OBJECT
196
197public:
199 virtual ~SMESHGUI_EvaluateOp();
200
201 virtual LightApp_Dialog* dlg() const;
202
203protected:
204 virtual void startOperation();
205
206protected slots:
207};
208
213{
214 Q_OBJECT
215
216public:
218
219protected:
220 virtual void startOperation();
221};
222
228{
229 Q_OBJECT
230
231public:
233 virtual ~SMESHGUI_ComputeDlg();
234
235protected:
236 QFrame* createMainFrame( QWidget*, bool );
237
245 QPushButton* myShowBtn;
246 QPushButton* myPublishBtn;
247 QPushButton* myBadMeshBtn;
249
252
256};
257
259
265{
266 Q_OBJECT
267
268public:
270 virtual ~SMESHGUI_PrecomputeDlg();
271
272 void setPreviewModes( const QList<int>& );
273 int getPreviewMode() const;
274
275 SMESHGUI_MeshOrderBox* getMeshOrderBox() const;
276
277signals:
278 void preview();
279
280private:
282 QPushButton* myPreviewBtn;
283 QtxComboBox* myPreviewMode;
284};
285
291{
292 Q_OBJECT
293
294public:
295 SMESHGUI_ComputeDlg_QThread(SMESH::SMESH_Gen_var gen,
296 SMESH::SMESH_Mesh_var mesh,
297 GEOM::GEOM_Object_var mainShape);
298 bool result();
299 void cancel();
300 SMESH::SMESH_Mesh_var& getMesh() { return myMesh; }
301
302protected:
303 void run();
304
305private:
306 SMESH::SMESH_Gen_var myGen;
307 SMESH::SMESH_Mesh_var myMesh;
308 GEOM::GEOM_Object_var myMainShape;
310};
311
317{
318 Q_OBJECT
319
320public:
322 SMESH::SMESH_Gen_var gen,
323 SMESH::SMESH_Mesh_var mesh,
324 GEOM::GEOM_Object_var mainShape);
325 bool result();
326
327protected:
328 void timerEvent(QTimerEvent *timer);
329 void closeEvent(QCloseEvent *event);
330
331private slots:
332 void onCancel();
333
334private:
336 QPushButton * cancelButton;
340 QProgressBar* progressBar;
341};
342
343#endif // SMESHGUI_COMPUTEDLG_H
static SMESHDS_Mesh * getMesh(SMESH::SMESH_IDSource_ptr theSource)
Definition: SMESH_Measurements_i.cxx:146
#define SMESHGUI_EXPORT
Definition: SMESH_SMESHGUI.hxx:36
Base operation to compute a mesh and show computation errors.
Definition: SMESHGUI_ComputeDlg.h:67
SMESHGUI_MeshEditPreview * myBadMeshDisplayer
Definition: SMESHGUI_ComputeDlg.h:119
SMESH::TShapeDisplayer * myTShapeDisplayer
Definition: SMESHGUI_ComputeDlg.h:118
QPointer< SMESHGUI_ComputeDlg > myCompDlg
Definition: SMESHGUI_ComputeDlg.h:112
GEOM::GEOM_Object_var myCurShape
Definition: SMESHGUI_ComputeDlg.h:117
SMESH::SMESH_Mesh_var myMesh
Definition: SMESHGUI_ComputeDlg.h:115
Handle(SALOME_InteractiveObject) myIObject
GEOM::GEOM_Object_var myMainShape
Definition: SMESHGUI_ComputeDlg.h:116
Dialog to display Cancel button.
Definition: SMESHGUI_ComputeDlg.h:317
QLabel * nbNodesLabel
Definition: SMESHGUI_ComputeDlg.h:337
QLabel * nbElemsLabel
Definition: SMESHGUI_ComputeDlg.h:338
QProgressBar * progressBar
Definition: SMESHGUI_ComputeDlg.h:340
SMESHGUI_ComputeDlg_QThread qthread
Definition: SMESHGUI_ComputeDlg.h:335
QPushButton * cancelButton
Definition: SMESHGUI_ComputeDlg.h:336
QLabel * freeRAMLabel
Definition: SMESHGUI_ComputeDlg.h:339
Thread to launch computation.
Definition: SMESHGUI_ComputeDlg.h:291
GEOM::GEOM_Object_var myMainShape
Definition: SMESHGUI_ComputeDlg.h:308
SMESH::SMESH_Gen_var myGen
Definition: SMESHGUI_ComputeDlg.h:306
bool myResult
Definition: SMESHGUI_ComputeDlg.h:309
SMESH::SMESH_Mesh_var myMesh
Definition: SMESHGUI_ComputeDlg.h:307
SMESH::SMESH_Mesh_var & getMesh()
Definition: SMESHGUI_ComputeDlg.h:300
Dialog to compute a mesh and show computation errors.
Definition: SMESHGUI_ComputeDlg.h:228
QPushButton * myBadMeshToGroupBtn
Definition: SMESHGUI_ComputeDlg.h:248
QPushButton * myPublishBtn
Definition: SMESHGUI_ComputeDlg.h:246
QLabel * myHypErrorLabel
Definition: SMESHGUI_ComputeDlg.h:242
QLabel * myWarningLabel
Definition: SMESHGUI_ComputeDlg.h:243
SMESHGUI_MeshInfosBox * myFullInfo
Definition: SMESHGUI_ComputeDlg.h:251
QGroupBox * myMemoryLackGroup
Definition: SMESHGUI_ComputeDlg.h:239
QTableWidget * myTable
Definition: SMESHGUI_ComputeDlg.h:244
QPushButton * myShowBtn
Definition: SMESHGUI_ComputeDlg.h:245
QGroupBox * myHypErrorGroup
Definition: SMESHGUI_ComputeDlg.h:241
QPushButton * myBadMeshBtn
Definition: SMESHGUI_ComputeDlg.h:247
SMESHGUI_MeshInfosBox * myBriefInfo
Definition: SMESHGUI_ComputeDlg.h:250
QGroupBox * myCompErrorGroup
Definition: SMESHGUI_ComputeDlg.h:240
QLabel * myMeshName
Definition: SMESHGUI_ComputeDlg.h:238
Operation to compute a mesh and show computation errors.
Definition: SMESHGUI_ComputeDlg.h:127
Definition: SMESHGUI_Dialog.h:44
Operation to evaluate a mesh and show result.
Definition: SMESHGUI_ComputeDlg.h:194
Displayer of the mesh edition preview.
Definition: SMESHGUI_MeshEditPreview.h:47
Box showing mesh info.
Definition: SMESHGUI_MeshInfosBox.h:43
Reusable widget that shows and allows modify meshing order.
Definition: SMESHGUI_MeshOrderDlg.h:49
Operator to check and modify mesh computation submesh priority (order)
Definition: SMESHGUI_MeshOrderOp.h:42
Definition: SMESHGUI_Operation.h:47
virtual void initDialog()
sets the dialog widgets to state just after operation start
Definition: SMESHGUI_Operation.cxx:208
virtual bool isValid(SUIT_Operation *) const
Verifies whether given operator is valid for this one.
Definition: SMESHGUI_Operation.cxx:242
virtual void startOperation()
Definition: SMESHGUI_Operation.cxx:79
virtual void onCancel()
Definition: SMESHGUI_Operation.cxx:175
virtual bool onApply()
Definition: SMESHGUI_Operation.cxx:166
Dialog to preview and compute a mesh and show computation errors.
Definition: SMESHGUI_ComputeDlg.h:265
QtxComboBox * myPreviewMode
Definition: SMESHGUI_ComputeDlg.h:283
QPushButton * myPreviewBtn
Definition: SMESHGUI_ComputeDlg.h:282
SMESHGUI_MeshOrderBox * myOrderBox
Definition: SMESHGUI_ComputeDlg.h:281
Operation to preview and compute a mesh and show computation errors.
Definition: SMESHGUI_ComputeDlg.h:148
SMESHGUI_MeshOrderMgr * myOrderMgr
Definition: SMESHGUI_ComputeDlg.h:187
QPointer< SMESHGUI_PrecomputeDlg > myDlg
Definition: SMESHGUI_ComputeDlg.h:181
QMap< int, int > myMapShapeId
private fields
Definition: SMESHGUI_ComputeDlg.h:179
TListOfListOfInt myPrevOrder
Definition: SMESHGUI_ComputeDlg.h:186
QPointer< LightApp_Dialog > myActiveDlg
Definition: SMESHGUI_ComputeDlg.h:180
QList< TListOfInt > TListOfListOfInt
Definition: SMESHGUI_ComputeDlg.h:185
QList< int > TListOfInt
fields for mesh order
Definition: SMESHGUI_ComputeDlg.h:184
SMESHGUI_MeshEditPreview * myPreviewDisplayer
Definition: SMESHGUI_ComputeDlg.h:182
Operation to show meshing errors.
Definition: SMESHGUI_ComputeDlg.h:213
Class showing shapes without publishing.
Definition: SMESHGUI_ComputeDlg.cxx:146
Definition: SMESH_ControlsClassifier.cxx:39
_PTR(SObject) getSubShapeSO(int subShapeID
Return SO of a sub-shape.
Definition: SMESHGUI_Utils.cxx:122
sequence< smIdType > smIdType_array
Definition: SMESH_Mesh.idl:45