Salome HOME
Merge branch 'V9_9_BR'
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_RemoveNodeReconnectionDlg.h
1 // Copyright (C) 2007-2022  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, or (at your option) any later version.
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
23 // File   : SMESHGUI_RemoveNodeReconnectionDlg.h
24 // Author : Edward AGAPOV, Open CASCADE S.A.S.
25 //
26 #ifndef __SMESHGUI_RemoveNodeReconnection_HXX__
27 #define __SMESHGUI_RemoveNodeReconnection_HXX__
28
29 #include "SMESHGUI_Dialog.h"
30 #include "SMESHGUI_SelectionOp.h"
31
32 class QButtonGroup;
33 class QCheckBox;
34 class QGroupBox;
35 class QLineEdit;
36 class QPushButton;
37 class QRadioButton;
38 class SMESHGUI_SpinBox;
39 class SMESHGUI_MeshEditPreview;
40 class SMESHGUI_RemoveNodeReconnectionDlg;
41
42 /*!
43  * \brief Remove a node with elements re-connection
44  */
45 class SMESHGUI_EXPORT SMESHGUI_RemoveNodeReconnectionOp: public SMESHGUI_SelectionOp
46 {
47   Q_OBJECT
48
49 public:
50   SMESHGUI_RemoveNodeReconnectionOp();
51   virtual ~SMESHGUI_RemoveNodeReconnectionOp();
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( QString& );
63
64 protected slots:
65   virtual bool                   onApply();
66
67 private slots:
68   void                           onSelectionDone();
69   void                           redisplayPreview();
70   void                           onTextChange( const QString& );
71   void                           onOpenView();
72   void                           onCloseView();
73
74 private:
75
76   SMESHGUI_RemoveNodeReconnectionDlg*  myDlg;
77
78   SUIT_SelectionFilter*         myFilter;
79   SMESHGUI*                     mySMESHGUI;
80   SMESHGUI_MeshEditPreview*     mySimulation;
81   SMESH_Actor*                  myMeshActor;
82   bool                          myNoPreview;
83 };
84
85 /*!
86  * \brief Dialog to make a mesh pass through a point
87  */
88
89 class SMESHGUI_EXPORT SMESHGUI_RemoveNodeReconnectionDlg : public SMESHGUI_Dialog
90 {
91   Q_OBJECT
92
93 public:
94   SMESHGUI_RemoveNodeReconnectionDlg();
95
96 private:
97   QWidget*                      createMainFrame( QWidget* );
98
99   QWidget*                      myMainFrame;
100   QGroupBox*                    myNodeToMoveGrp;
101   QLineEdit*                    myId;
102   QCheckBox*                    myPreviewChkBox;
103
104   QString                       myHelpFileName;
105
106   friend class SMESHGUI_RemoveNodeReconnectionOp;
107
108 };
109
110 #endif // SMESHGUI_RemoveNodeReconnectionDLG_H