PAL13190 (EDF159 SMESH: in Merge Nodes and Merge Elements, visualisze nodes or meshes twice):

move MergeNodes dialog here and reconstruct it;
	add the additional GUI controls;
	add mechanism of numbering of the selected mesh nodes and elements.
This commit is contained in:
akl 2007-03-23 14:38:37 +00:00
parent 57fb474675
commit 0bef4d9457
2 changed files with 973 additions and 133 deletions

File diff suppressed because it is too large Load Diff

View File

@ -18,8 +18,8 @@
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
// //
#ifndef DIALOGBOX_GETMESH_H #ifndef SMESHGUI_EditMeshDlg_H
#define DIALOGBOX_GETMESH_H #define SMESHGUI_EditMeshDlg_H
#include "LightApp_SelectionMgr.h" #include "LightApp_SelectionMgr.h"
#include "SUIT_SelectionFilter.h" #include "SUIT_SelectionFilter.h"
@ -28,6 +28,7 @@
#include <qdialog.h> #include <qdialog.h>
// Open CASCADE Includes // Open CASCADE Includes
#include <gp_XYZ.hxx>
class QGridLayout; class QGridLayout;
class QButtonGroup; class QButtonGroup;
@ -36,11 +37,22 @@ class QLabel;
class QLineEdit; class QLineEdit;
class QPushButton; class QPushButton;
class QRadioButton; class QRadioButton;
class QCheckBox;
class QListBox;
class SMESHGUI; class SMESHGUI;
class SMESHGUI_SpinBox;
class SMESH_Actor;
class SALOME_Actor;
class SVTK_ViewWindow;
class SVTK_Selector;
namespace SMESH{
struct TIdPreview;
}
// IDL Headers // IDL Headers
#include <SALOMEconfig.h> #include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SMESH_Mesh) #include CORBA_SERVER_HEADER(SMESH_MeshEditor)
//================================================================================= //=================================================================================
// class : SMESHGUI_EditMeshDlg // class : SMESHGUI_EditMeshDlg
@ -52,8 +64,6 @@ class SMESHGUI_EditMeshDlg : public QDialog
public: public:
SMESHGUI_EditMeshDlg (SMESHGUI * theModule, SMESHGUI_EditMeshDlg (SMESHGUI * theModule,
const char* title,
const char* icon,
int theAction); int theAction);
~SMESHGUI_EditMeshDlg(); ~SMESHGUI_EditMeshDlg();
@ -63,47 +73,89 @@ class SMESHGUI_EditMeshDlg : public QDialog
void enterEvent (QEvent*); /* mouse enter the QWidget */ void enterEvent (QEvent*); /* mouse enter the QWidget */
void hideEvent (QHideEvent*); /* ESC key */ void hideEvent (QHideEvent*); /* ESC key */
void keyPressEvent(QKeyEvent*); void keyPressEvent(QKeyEvent*);
void onEditGroup();
void FindGravityCenter(TColStd_MapOfInteger & ElemsIdMap,
list< gp_XYZ > & GrCentersXYZ);
// add the centers of gravity of ElemsIdMap elements to the GrCentersXYZ list
private: private:
SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */ SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */ LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
SVTK_Selector* mySelector;
SMESH::SMESH_Mesh_var myMesh; QWidget* myEditCurrentArgument;
SUIT_SelectionFilter* myMeshFilter;
SMESH::SMESH_Mesh_var myMesh;
SMESH::SMESH_IDSource_var mySubMeshOrGroup;
SMESH_Actor* myActor;
SUIT_SelectionFilter* myMeshOrSubMeshOrGroupFilter;
SMESH::TIdPreview* myIdPreview;
int myAction; int myAction;
bool myIsBusy;
// Widgets // Widgets
QButtonGroup* GroupConstructors; QButtonGroup* GroupConstructors;
QRadioButton* Constructor1; QRadioButton* RadioButton;
QGroupBox* GroupButtons; QGroupBox* GroupButtons;
QPushButton* buttonOk; QPushButton* buttonOk;
QPushButton* buttonCancel; QPushButton* buttonCancel;
QPushButton* buttonApply; QPushButton* buttonApply;
QPushButton* buttonHelp; QPushButton* buttonHelp;
QGroupBox* GroupMesh; QGroupBox* GroupMesh;
QLabel* TextLabelMesh; QLabel* TextLabelName;
QPushButton* SelectButton; QPushButton* SelectMeshButton;
QLineEdit* LineEditMesh; QLineEdit* LineEditMesh;
QGroupBox* GroupCoincident;
QLabel* TextLabelTolerance;
SMESHGUI_SpinBox* SpinBoxTolerance;
QPushButton* DetectButton;
QListBox* ListCoincident;
QPushButton* AddGroupButton;
QPushButton* RemoveGroupButton;
QCheckBox* SelectAllCB;
QGroupBox* GroupEdit;
QListBox* ListEdit;
QPushButton* AddElemButton;
QPushButton* RemoveElemButton;
QPushButton* SetFirstButton;
//protected: //protected:
QGridLayout* DlgLayout; QGridLayout* DlgLayout;
QGridLayout* GroupConstructorsLayout; QGridLayout* GroupConstructorsLayout;
QGridLayout* GroupButtonsLayout; QGridLayout* GroupButtonsLayout;
QGridLayout* GroupMeshLayout; QGridLayout* GroupMeshLayout;
QGridLayout* GroupCoincidentLayout;
QGridLayout* GroupEditLayout;
QString myHelpFileName; QString myHelpFileName;
private slots: private slots:
void ClickOnOk(); void ClickOnOk();
void ClickOnCancel(); void ClickOnCancel();
void ClickOnApply(); bool ClickOnApply();
void ClickOnHelp(); void ClickOnHelp();
void SelectionIntoArgument(); void updateControls();
void DeactivateActiveDialog(); void onDetect();
void ActivateThisDialog(); void onAddGroup();
void onRemoveGroup();
void onSelectGroup();
void onSelectAll(bool isToggled);
void onSelectElementFromGroup();
void onAddElement();
void onRemoveElement();
void onSetFirst();
void SetEditCurrentArgument();
void SelectionIntoArgument() ;
void DeactivateActiveDialog() ;
void ActivateThisDialog() ;
}; };
#endif // DIALOGBOX_GETMESH_H #endif // SMESHGUI_EditMeshDlg_H