1 // Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // SMESH SMESHGUI : GUI for SMESH component
21 // File : SMESHGUI_OffsetDlg.h
23 #ifndef SMESHGUI_OffsetDLG_H
24 #define SMESHGUI_OffsetDLG_H
27 #include "SMESH_SMESHGUI.hxx"
28 #include "SMESHGUI_PreviewDlg.h"
31 #include <SALOMEconfig.h>
32 #include CORBA_SERVER_HEADER(SMESH_Mesh)
42 class SMESHGUI_IdValidator;
43 class SMESHGUI_SpinBox;
44 class SMESHGUI_FilterDlg;
47 class LightApp_SelectionMgr;
48 class SMESH_LogicalFilter;
50 //=================================================================================
51 // class : SMESHGUI_OffsetDlg
53 //=================================================================================
54 class SMESHGUI_EXPORT SMESHGUI_OffsetDlg : public SMESHGUI_MultiPreviewDlg
59 SMESHGUI_OffsetDlg( SMESHGUI* );
60 ~SMESHGUI_OffsetDlg();
63 void Init( bool = true );
64 void enterEvent( QEvent* ); /* mouse enter the QWidget */
65 void keyPressEvent( QKeyEvent* );
66 int GetConstructorId();
67 void setNewMeshName();
70 void getOffset( SMESH::PointStruct& thePoint,
71 SMESH::double_array_var& theOffsetFact);
73 SMESHGUI_IdValidator* myIdValidator;
74 LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
76 int myNbOkElements; /* to check when elements are defined */
78 SVTK_Selector* mySelector;
80 QWidget* myEditCurrentArgument;
84 SMESH_LogicalFilter* myMeshOrSubMeshOrGroupFilter;
86 QList<SMESH::SMESH_IDSource_var> myObjects;
87 QList<QString> myObjectsNames;
88 QList<SMESH::SMESH_Mesh_var> myMeshes;
91 QGroupBox* ConstructorsBox;
92 QGroupBox* GroupButtons;
93 QPushButton* buttonOk;
94 QPushButton* buttonCancel;
95 QPushButton* buttonApply;
96 QPushButton* buttonHelp;
97 QGroupBox* GroupArguments;
98 QLabel* TextLabelElements;
99 //QPushButton* SelectElementsButton;
100 QLineEdit* LineEditElements;
101 QCheckBox* CheckBoxMesh;
102 SMESHGUI_SpinBox* SpinBox;
103 QGroupBox* ActionBox;
104 QButtonGroup* ActionGroup;
105 QCheckBox* MakeGroupsCheck;
106 QLineEdit* LineEditNewMesh;
108 QString myHelpFileName;
110 QPushButton* myFilterBtn;
111 SMESHGUI_FilterDlg* myFilterDlg;
115 virtual void onDisplaySimulation( bool );
116 virtual void reject();
117 void onFilterAccepted();
123 void SelectionIntoArgument();
124 void DeactivateActiveDialog();
125 void ActivateThisDialog();
126 void onTextChange( const QString& );
127 void onSelectMesh( bool );
128 void onActionClicked( int );
134 #endif // SMESHGUI_OffsetDLG_H