Salome HOME
IPAL21120 SIGSEGV on Meshing attached Compound with Automatic Hexadralization
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MakeNodeAtPointDlg.h
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 //  This library is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU Lesser General Public
8 //  License as published by the Free Software Foundation; either
9 //  version 2.1 of the License.
10 //
11 //  This library is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 //  Lesser General Public License for more details.
15 //
16 //  You should have received a copy of the GNU Lesser General Public
17 //  License along with this library; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  File   : SMESHGUI_MakeNodeAtPointDlg.h
23 //  Author : Edward AGAPOV
24 //  Module : SMESH
25 //
26 #ifndef SMESHGUI_MakeNodeAtPointDlg_H
27 #define SMESHGUI_MakeNodeAtPointDlg_H
28
29 #include "SMESHGUI_Dialog.h"
30 #include "SMESHGUI_SelectionOp.h"
31
32 #include "VTKViewer.h"
33
34 class QFrame;
35 class QLineEdit;
36 class QPushButton;
37 class LightApp_SelectionMgr;
38 class SVTK_ViewWindow;
39 class QButtonGroup;
40 class SMESHGUI;
41 class QCheckBox;
42 class QRadioButton;
43 class SMESHGUI_SpinBox;
44 class SALOME_Actor;
45 class SMESHGUI_MeshEditPreview;
46 class SMESHGUI_MakeNodeAtPointDlg;
47
48 /*!
49  * \brief Operation to make a mesh pass through a point
50  */
51 class SMESHGUI_MakeNodeAtPointOp: public SMESHGUI_SelectionOp
52 {
53   Q_OBJECT
54
55 public:
56   SMESHGUI_MakeNodeAtPointOp();
57   virtual ~SMESHGUI_MakeNodeAtPointOp();
58
59   virtual LightApp_Dialog*       dlg() const;  
60
61 protected:
62
63   virtual void                   startOperation();
64   virtual void                   stopOperation();
65
66   virtual void                   activateSelection();
67
68   bool                           isValid();
69
70 protected slots:
71   virtual bool                   onApply();
72
73 private slots:
74
75   void                           onSelectionDone();
76   void                           redisplayPreview();
77
78 private:
79
80   SMESHGUI_MakeNodeAtPointDlg*  myDlg;
81
82   SUIT_SelectionFilter*         myFilter;
83   int                           myMeshOldDisplayMode;
84   SMESHGUI_MeshEditPreview*     mySimulation;
85   SMESH_Actor*                  myMeshActor;
86   bool                          myNoPreview;
87
88 };
89
90 /*!
91  * \brief Dialog to make a mesh pass through a point
92  */
93
94 class SMESHGUI_MakeNodeAtPointDlg : public SMESHGUI_Dialog
95 {
96   Q_OBJECT
97
98 public:
99                                  SMESHGUI_MakeNodeAtPointDlg();
100
101 private:
102
103   QFrame*                        createMainFrame   (QWidget*);
104
105   QPushButton*                 myCoordBtn;
106   SMESHGUI_SpinBox             *myX, *myY, *myZ;
107   QRadioButton                 *myMoveRBtn, *myCreateRBtn;
108   QGroupBox*                   myNodeToMoveGrp;
109   QPushButton*                 myIdBtn;
110   QLineEdit*                   myId;
111   QCheckBox*                   myAutoSearchChkBox;
112   QCheckBox*                   myPreviewChkBox;
113
114   QString                      myHelpFileName;
115
116   friend class SMESHGUI_MakeNodeAtPointOp;
117
118 private slots:
119
120   void                           ButtonToggled (bool);
121 };
122
123 #endif