Salome HOME
5da7f3ad0e319059dd4ff82dc89ca6ef93c5a4d3
[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 // File   : SMESHGUI_MakeNodeAtPointDlg.h
21 // Author : Edward AGAPOV, Open CASCADE S.A.S.
22 //
23
24 #ifndef SMESHGUI_MAKENODEATPOINTDLG_H
25 #define SMESHGUI_MAKENODEATPOINTDLG_H
26
27 // SMESH includes
28 #include "SMESH_SMESHGUI.hxx"
29
30 #include "SMESHGUI_Dialog.h"
31 #include "SMESHGUI_SelectionOp.h"
32
33 class QGroupBox;
34 class QLineEdit;
35 class QPushButton;
36 class QCheckBox;
37 class QRadioButton;
38 class SMESHGUI_SpinBox;
39 class SMESHGUI_MeshEditPreview;
40 class SMESHGUI_MakeNodeAtPointDlg;
41
42 /*!
43  * \brief Operation to make a mesh pass through a point
44  */
45 class SMESHGUI_EXPORT SMESHGUI_MakeNodeAtPointOp: public SMESHGUI_SelectionOp
46 {
47   Q_OBJECT
48
49 public:
50   SMESHGUI_MakeNodeAtPointOp();
51   virtual ~SMESHGUI_MakeNodeAtPointOp();
52
53   virtual LightApp_Dialog*       dlg() const;  
54
55 protected:
56
57   virtual void                   startOperation();
58   virtual void                   stopOperation();
59
60   virtual void                   activateSelection();
61
62   bool                           isValid();
63
64 protected slots:
65   virtual bool                   onApply();
66
67 private slots:
68   void                           onSelectionDone();
69   void                           redisplayPreview();
70
71 private:
72   SMESHGUI_MakeNodeAtPointDlg*  myDlg;
73
74   SUIT_SelectionFilter*         myFilter;
75   int                           myMeshOldDisplayMode;
76   SMESHGUI_MeshEditPreview*     mySimulation;
77   SMESH_Actor*                  myMeshActor;
78   bool                          myNoPreview;
79 };
80
81 /*!
82  * \brief Dialog to make a mesh pass through a point
83  */
84
85 class SMESHGUI_EXPORT SMESHGUI_MakeNodeAtPointDlg : public SMESHGUI_Dialog
86 {
87   Q_OBJECT
88
89 public:
90   SMESHGUI_MakeNodeAtPointDlg();
91
92 private:
93   QWidget*                      createMainFrame( QWidget* );
94
95   QPushButton*                  myCoordBtn;
96   SMESHGUI_SpinBox*             myX;
97   SMESHGUI_SpinBox*             myY;
98   SMESHGUI_SpinBox*             myZ;
99   QRadioButton*                 myMoveRBtn;
100   QRadioButton*                 myCreateRBtn;
101   QGroupBox*                    myNodeToMoveGrp;
102   QPushButton*                  myIdBtn;
103   QLineEdit*                    myId;
104   QCheckBox*                    myAutoSearchChkBox;
105   QCheckBox*                    myPreviewChkBox;
106
107   QString                       myHelpFileName;
108
109   friend class SMESHGUI_MakeNodeAtPointOp;
110
111 private slots:
112   void                          ButtonToggled( bool );
113 };
114
115 #endif // SMESHGUI_MAKENODEATPOINTDLG_H