1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // SMESH SMESHGUI : GUI for SMESH component
23 // File : SMESHGUI_MergeNodesDlg.h
24 // Author : Michael ZORIN
28 #ifndef DIALOGBOX_MERGENODES_H
29 #define DIALOGBOX_MERGENODES_H
31 #include "SMESH_SMESHGUI.hxx"
33 #include "LightApp_SelectionMgr.h"
34 //#include "SMESH_TypeFilter.hxx"
35 #include "SUIT_SelectionFilter.h"
52 class SMESHGUI_SpinBox;
54 class SVTK_ViewWindow;
59 #include <SALOMEconfig.h>
60 #include CORBA_SERVER_HEADER(SMESH_MeshEditor)
63 //=================================================================================
64 // class : SMESHGUI_MergeNodesDlg
66 //=================================================================================
67 class SMESHGUI_EXPORT SMESHGUI_MergeNodesDlg : public QDialog
72 SMESHGUI_MergeNodesDlg( SMESHGUI*,
76 ~SMESHGUI_MergeNodesDlg();
80 void closeEvent( QCloseEvent* e );
81 void enterEvent ( QEvent * ); /* mouse enter the QWidget */
82 void hideEvent ( QHideEvent * ); /* ESC key */
83 void keyPressEvent( QKeyEvent* e );
84 void onEditNodesGroup();
86 SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
87 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
88 SVTK_Selector* mySelector;
90 QWidget* myEditCurrentArgument;
92 SMESH::SMESH_Mesh_var myMesh;
93 SMESH::SMESH_IDSource_var mySubMeshOrGroup;
95 //Handle(SMESH_TypeFilter) myMeshOrSubMeshFilter;
96 SUIT_SelectionFilter* myMeshOrSubMeshOrGroupFilter;
98 QButtonGroup* GroupConstructors;
99 QRadioButton* RadioButton1;
100 QGroupBox* GroupButtons;
101 QPushButton* buttonOk;
102 QPushButton* buttonCancel;
103 QPushButton* buttonApply;
104 QPushButton* buttonHelp;
105 QGroupBox* GroupMesh;
106 QGroupBox* GroupCoincident;
107 QGroupBox* GroupEdit;
108 QLabel* TextLabelName;
109 QLabel* TextLabelTolerance;
110 QLineEdit* LineEditMesh;
111 QPushButton* SelectMeshButton;
112 QPushButton* DetectButton;
113 QPushButton* AddButton;
114 QPushButton* RemoveButton;
115 QCheckBox* SelectAllCB;
116 QListView* ListCoincident;
118 SMESHGUI_SpinBox* SpinBoxTolerance;
120 QString myHelpFileName;
125 void ClickOnCancel();
128 void updateControls();
130 void onSelectNodesGroup();
131 void onSelectAll(bool isToggled);
132 void onSelectNodesFromGroup();
135 void SetEditCurrentArgument();
136 void SelectionIntoArgument() ;
137 void DeactivateActiveDialog() ;
138 void ActivateThisDialog() ;
141 QGridLayout* SMESHGUI_MergeNodesDlgLayout;
142 QGridLayout* GroupConstructorsLayout;
143 QGridLayout* GroupButtonsLayout;
144 QGridLayout* GroupMeshLayout;
145 QGridLayout* GroupCoincidentLayout;
146 QGridLayout* GroupEditLayout;
149 #endif // DIALOGBOX_MERGENODES_H