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