"Add quadratic element" dialog implementation.

This commit is contained in:
mzn 2006-02-06 14:20:43 +00:00
parent 086e73ab75
commit 8da18973e6
15 changed files with 1396 additions and 3 deletions

View File

@ -131,7 +131,14 @@ mesh_pattern.png \
pattern_sample_2d.png \
pattern_sample_3D.png \
mesh_add.png \
mesh_remove.png
mesh_remove.png \
mesh_quad_edge.png \
mesh_quad_triangle.png \
mesh_quad_quadrangle.png \
mesh_quad_tetrahedron.png \
mesh_quad_pyramid.png \
mesh_quad_pentahedron.png \
mesh_quad_hexahedron.png
BIN_SCRIPT= \
VERSION

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

View File

@ -108,7 +108,8 @@ LIB_SRC = SMESHGUI.cxx \
SMESHGUI_MeshDlg.cxx \
SMESHGUI_MeshOp.cxx \
SMESHGUI_Displayer.cxx \
SMESHGUI_Hypotheses.cxx
SMESHGUI_Hypotheses.cxx \
SMESHGUI_AddQuadraticElementDlg.cxx
LIB_MOC = \
SMESHGUI.h \
@ -155,7 +156,8 @@ LIB_MOC = \
SMESHGUI_Dialog.h \
SMESHGUI_MeshDlg.h \
SMESHGUI_MeshOp.h \
SMESHGUI_Hypotheses.h
SMESHGUI_Hypotheses.h \
SMESHGUI_AddQuadraticElementDlg.h
LIB_CLIENT_IDL = SALOME_Exception.idl \

View File

@ -40,6 +40,7 @@
#include "SMESHGUI_Hypotheses.h"
#include "SMESHGUI_MoveNodesDlg.h"
#include "SMESHGUI_AddMeshElementDlg.h"
#include "SMESHGUI_AddQuadraticElementDlg.h"
#include "SMESHGUI_EditHypothesesDlg.h"
#include "SMESHGUI_CreateHypothesesDlg.h"
#include "SMESHGUI_FilterDlg.h"
@ -1852,6 +1853,46 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
}
break;
}
case 4034: // QUADRATIC EDGE
case 4035: // QUADRATIC TRIANGLE
case 4036: // QUADRATIC QUADRANGLE
case 4037: // QUADRATIC TETRAHEDRON
case 4038: // QUADRATIC PYRAMID
case 4039: // QUADRATIC PENTAHEDRON
case 4040: // QUADRATIC HEXAHEDRON
{
if(checkLock(aStudy)) break;
if ( vtkwnd ) {
EmitSignalDeactivateDialog();
int type;
switch (theCommandID) {
case 4034:
type = QUAD_EDGE; break;
case 4035:
type = QUAD_TRIANGLE; break;
case 4036:
type = QUAD_QUADRANGLE; break;
case 4037:
type = QUAD_TETRAHEDRON; break;
case 4038:
type = QUAD_PYRAMID; break;
case 4039:
type = QUAD_PENTAHEDRON; break;
case 4040:
type = QUAD_HEXAHEDRON;
break;
default:;
}
new SMESHGUI_AddQuadraticElementDlg( this, type );
}
else {
SUIT_MessageBox::warn1(SMESHGUI::desktop(),
tr("SMESH_WRN_WARNING"), tr("SMESH_WRN_VIEWER_VTK"),
tr("SMESH_BUT_OK"));
}
break;
}
case 4041: // REMOVES NODES
{
if(checkLock(aStudy)) break;
@ -2306,6 +2347,13 @@ void SMESHGUI::initialize( CAM_Application* app )
createSMESHAction( 301, "DISPLAY" );
createSMESHAction( 302, "DISPLAY_ONLY" );
createSMESHAction( 4033, "POLYHEDRON", "ICON_DLG_POLYHEDRON" );
createSMESHAction( 4034, "QUADRATIC_EDGE", "ICON_DLG_QUADRATIC_EDGE" );
createSMESHAction( 4035, "QUADRATIC_TRIANGLE", "ICON_DLG_QUADRATIC_TRIANGLE" );
createSMESHAction( 4036, "QUADRATIC_QUADRANGLE", "ICON_DLG_QUADRATIC_QUADRANGLE" );
createSMESHAction( 4037, "QUADRATIC_TETRAHEDRON", "ICON_DLG_QUADRATIC_TETRAHEDRON" );
createSMESHAction( 4038, "QUADRATIC_PYRAMID", "ICON_DLG_QUADRATIC_PYRAMID" );
createSMESHAction( 4039, "QUADRATIC_PENTAHEDRON", "ICON_DLG_QUADRATIC_PENTAHEDRON" );
createSMESHAction( 4040, "QUADRATIC_HEXAHEDRON", "ICON_DLG_QUADRATIC_HEXAHEDRON" );
// ----- create menu --------------
int fileId = createMenu( tr( "MEN_FILE" ), -1, 1 ),
@ -2385,6 +2433,14 @@ void SMESHGUI::initialize( CAM_Application* app )
createMenu( 4031, addId, -1 );
createMenu( 4032, addId, -1 );
createMenu( 4033, addId, -1 );
createMenu( separator(), addId, -1 );
createMenu( 4034, addId, -1 );
createMenu( 4035, addId, -1 );
createMenu( 4036, addId, -1 );
createMenu( 4037, addId, -1 );
createMenu( 4038, addId, -1 );
createMenu( 4039, addId, -1 );
createMenu( 4040, addId, -1 );
createMenu( 4041, removeId, -1 );
createMenu( 4042, removeId, -1 );
@ -2461,6 +2517,14 @@ void SMESHGUI::initialize( CAM_Application* app )
createTool( 4032, addRemTb );
createTool( 4033, addRemTb );
createTool( separator(), addRemTb );
createTool( 4034, addRemTb );
createTool( 4035, addRemTb );
createTool( 4036, addRemTb );
createTool( 4037, addRemTb );
createTool( 4038, addRemTb );
createTool( 4039, addRemTb );
createTool( 4040, addRemTb );
createTool( separator(), addRemTb );
createTool( 4041, addRemTb );
createTool( 4042, addRemTb );
createTool( separator(), addRemTb );

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,109 @@
#ifndef DIALOGBOX_ADD_QUADRATIC_ELEMENT_H
#define DIALOGBOX_ADD_QUADRATIC_ELEMENT_H
#include "LightApp_SelectionMgr.h"
// QT Includes
#include <qdialog.h>
#include <qtable.h>
class QButtonGroup;
class QGroupBox;
class QLineEdit;
class QPushButton;
class QRadioButton;
class QCheckBox;
class QTable;
class SMESHGUI;
class SMESH_Actor;
class SVTK_Selector;
namespace SMESH{
struct TElementSimulation;
}
// IDL Headers
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SMESH_Mesh)
enum { QUAD_EDGE, QUAD_TRIANGLE, QUAD_QUADRANGLE, QUAD_TETRAHEDRON, QUAD_PYRAMID, QUAD_PENTAHEDRON, QUAD_HEXAHEDRON };
//=================================================================================
// class : SMESHGUI_AddQuadraticElementDlg
// purpose :
//=================================================================================
class SMESHGUI_AddQuadraticElementDlg : public QDialog
{
Q_OBJECT
public:
SMESHGUI_AddQuadraticElementDlg( SMESHGUI* theModule,
const int theType,
const char* = 0,
bool modal = FALSE, WFlags fl = 0 );
~SMESHGUI_AddQuadraticElementDlg();
private:
void Init ();
void closeEvent (QCloseEvent*);
void hideEvent (QHideEvent*); /* ESC key */
void enterEvent (QEvent*); /* mouse enter the QWidget */
void displaySimulation();
void UpdateTable( bool theConersValidity = true );
bool IsValid();
SMESHGUI* mySMESHGUI; /* Current SMESHGUI object */
LightApp_SelectionMgr* mySelectionMgr; /* User shape selection */
int myNbCorners; /* The required number of corners */
bool myBusy;
SVTK_Selector* mySelector;
SMESH::SMESH_Mesh_var myMesh;
SMESH_Actor* myActor;
SMESH::TElementSimulation* mySimulation;
int myType;
bool myIsEditCorners;
QButtonGroup* GroupConstructors;
QRadioButton* myRadioButton1;
QGroupBox* GroupArguments;
QLineEdit* myCornerNodes;
QPushButton* mySelectButton;
QTable* myTable;
QCheckBox* myReverseCB;
QGroupBox* GroupButtons;
QPushButton* buttonOk;
QPushButton* buttonCancel;
QPushButton* buttonApply;
private slots:
void onTextChange(const QString&);
void onCellTextChange(int, int);
void onReverse( int );
void onCellDoubleClicked(int, int, int, const QPoint&);
void ClickOnOk();
void ClickOnCancel();
void ClickOnApply();
void SetEditCorners() ;
void SelectionIntoArgument() ;
void DeactivateActiveDialog() ;
void ActivateThisDialog() ;
};
class SMESHGUI_IdEditItem: public QTableItem
{
public:
SMESHGUI_IdEditItem(QTable* table, EditType et, const QString& text ):
QTableItem(table, et, text) {};
~SMESHGUI_IdEditItem() {};
QWidget* createEditor() const;
};
#endif // DIALOGBOX_ADD_QUADRATIC_ELEMENT_H

View File

@ -155,7 +155,33 @@ msgstr "mesh_tetra.png"
msgid "ICON_DLG_HEXAS"
msgstr "mesh_hexa.png"
#Quadratic Edge
msgid "ICON_DLG_QUADRATIC_EDGE"
msgstr "mesh_quad_edge.png"
#Quadratic Triangle
msgid "ICON_DLG_QUADRATIC_TRIANGLE"
msgstr "mesh_quad_triangle.png"
#Quadratic Quadrangle
msgid "ICON_DLG_QUADRATIC_QUADRANGLE"
msgstr "mesh_quad_quadrangle.png"
#Quadratic Tetrahedron
msgid "ICON_DLG_QUADRATIC_TETRAHEDRON"
msgstr "mesh_quad_tetrahedron.png"
#Quadratic Pyramid
msgid "ICON_DLG_QUADRATIC_PYRAMID"
msgstr "mesh_quad_pyramid.png"
#Quadratic Pentahedron
msgid "ICON_DLG_QUADRATIC_PENTAHEDRON"
msgstr "mesh_quad_pentahedron.png"
#Quadratic Hexahedron
msgid "ICON_DLG_QUADRATIC_HEXAHEDRON"
msgstr "mesh_quad_hexahedron.png"
#-----------------------------------------------------------
# ObjectBrowser
#-----------------------------------------------------------

View File

@ -170,6 +170,35 @@ msgstr "mesh_hexa.png"
#Polyhedre
msgid "ICON_DLG_POLYHEDRON"
msgstr "mesh_polyhedron.png"
#Quadratic Edge
msgid "ICON_DLG_QUADRATIC_EDGE"
msgstr "mesh_quad_edge.png"
#Quadratic Triangle
msgid "ICON_DLG_QUADRATIC_TRIANGLE"
msgstr "mesh_quad_triangle.png"
#Quadratic Quadrangle
msgid "ICON_DLG_QUADRATIC_QUADRANGLE"
msgstr "mesh_quad_quadrangle.png"
#Quadratic Tetrahedron
msgid "ICON_DLG_QUADRATIC_TETRAHEDRON"
msgstr "mesh_quad_tetrahedron.png"
#Quadratic Pyramid
msgid "ICON_DLG_QUADRATIC_PYRAMID"
msgstr "mesh_quad_pyramid.png"
#Quadratic Pentahedron
msgid "ICON_DLG_QUADRATIC_PENTAHEDRON"
msgstr "mesh_quad_pentahedron.png"
#Quadratic Hexahedron
msgid "ICON_DLG_QUADRATIC_HEXAHEDRON"
msgstr "mesh_quad_hexahedron.png"
#-----------------------------------------------------------
# ObjectBrowser
#-----------------------------------------------------------

View File

@ -1782,6 +1782,80 @@ msgstr "Polygon"
msgid "SMESH_ADD_POLYGON"
msgstr "Add polygon"
msgid "SMESH_ADD_QUADRATIC_EDGE_TITLE"
msgstr "Add Quadratic Edge"
msgid "SMESH_ADD_QUADRATIC_TRIANGLE_TITLE"
msgstr "Add Quadratic Triangle"
msgid "SMESH_ADD_QUADRATIC_QUADRANGLE_TITLE"
msgstr "Add Quadratic Quadrangle"
msgid "SMESH_ADD_QUADRATIC_TETRAHEDRON_TITLE"
msgstr "Add Quadratic Tetrahedron"
msgid "SMESH_ADD_QUADRATIC_PYRAMID_TITLE"
msgstr "Add Quadratic Pyramid"
msgid "SMESH_ADD_QUADRATIC_PENTAHEDRON_TITLE"
msgstr "Add Quadratic Pentahedron"
msgid "SMESH_ADD_QUADRATIC_HEXAHEDRON_TITLE"
msgstr "Add Quadratic Hexahedron"
msgid "SMESH_QUADRATIC_EDGE"
msgstr "Quadratic Edge"
msgid "SMESH_QUADRATIC_TRIANGLE"
msgstr "Quadratic Triangle"
msgid "SMESH_QUADRATIC_QUADRANGLE"
msgstr "Quadratic Quadrangle"
msgid "SMESH_QUADRATIC_TETRAHEDRON"
msgstr "Quadratic Tetrahedron"
msgid "SMESH_QUADRATIC_PYRAMID"
msgstr "Quadratic Pyramid"
msgid "SMESH_QUADRATIC_PENTAHEDRON"
msgstr "Quadratic Pentahedron"
msgid "SMESH_QUADRATIC_HEXAHEDRON"
msgstr "Quadratic Hexahedron"
msgid "SMESHGUI_AddQuadraticElementDlg::SMESH_CORNER_NODES"
msgstr "Corner Nodes:"
msgid "SMESHGUI_AddQuadraticElementDlg::SMESH_ADD_QUADRATIC_EDGE"
msgstr "Add Quadratic Edge"
msgid "SMESHGUI_AddQuadraticElementDlg::SMESH_ADD_QUADRATIC_TRIANGLE"
msgstr "Add Quadratic Triangle"
msgid "SMESHGUI_AddQuadraticElementDlg::SMESH_ADD_QUADRATIC_QUADRANGLE"
msgstr "Add Quadratic Quadrangle"
msgid "SMESHGUI_AddQuadraticElementDlg::SMESH_ADD_QUADRATIC_TETRAHEDRON"
msgstr "Add Quadratic Tetrahedron"
msgid "SMESHGUI_AddQuadraticElementDlg::SMESH_ADD_QUADRATIC_PYRAMID"
msgstr "Add Quadratic PYRAMID"
msgid "SMESHGUI_AddQuadraticElementDlg::SMESH_ADD_QUADRATIC_PENTAHEDRON"
msgstr "Add Quadratic Pentahedron"
msgid "SMESHGUI_AddQuadraticElementDlg::SMESH_ADD_QUADRATIC_HEXAHEDRON"
msgstr "Add Quadratic Hexahedron"
msgid "SMESHGUI_AddQuadraticElementDlg::SMESH_FIRST"
msgstr "First"
msgid "SMESHGUI_AddQuadraticElementDlg::SMESH_MIDDLE"
msgstr "Middle"
msgid "SMESHGUI_AddQuadraticElementDlg::SMESH_LAST"
msgstr "Last"
#----------------------------------------------------
msgid "SMESHGUI_CreatePatternDlg::CAPTION"
@ -1996,6 +2070,27 @@ msgstr "Polygon"
msgid "MEN_POLYHEDRON"
msgstr "Polyhedron"
msgid "MEN_QUADRATIC_EDGE"
msgstr "Quadratic Edge"
msgid "MEN_QUADRATIC_TRIANGLE"
msgstr "Quadratic Triangle"
msgid "MEN_QUADRATIC_QUADRANGLE"
msgstr "Quadratic Quadrangle"
msgid "MEN_QUADRATIC_TETRAHEDRON"
msgstr "Quadratic Tetrahedron"
msgid "MEN_QUADRATIC_PYRAMID"
msgstr "Quadratic Pyramid"
msgid "MEN_QUADRATIC_PENTAHEDRON"
msgstr "Quadratic Pentahedron"
msgid "MEN_QUADRATIC_HEXAHEDRON"
msgstr "Quadratic Hexahedron"
msgid "MEN_NODES"
msgstr "Nodes"
@ -2325,6 +2420,27 @@ msgstr "Polygon"
msgid "TOP_POLYHEDRON"
msgstr "Polyhedron"
msgid "TOP_QUADRATIC_EDGE"
msgstr "Quadratic Edge"
msgid "TOP_QUADRATIC_TRIANGLE"
msgstr "Quadratic Triangle"
msgid "TOP_QUADRATIC_QUADRANGLE"
msgstr "Quadratic Quadrangle"
msgid "TOP_QUADRATIC_TETRAHEDRON"
msgstr "Quadratic Tetrahedron"
msgid "TOP_QUADRATIC_PYRAMID"
msgstr "Quadratic Pyramid"
msgid "TOP_QUADRATIC_PENTAHEDRON"
msgstr "Quadratic Pentahedron"
msgid "TOP_QUADRATIC_HEXAHEDRON"
msgstr "Quadratic Hexahedron"
msgid "TOP_NODES"
msgstr "Nodes"
@ -2605,6 +2721,27 @@ msgstr "Polygon"
msgid "STB_POLYHEDRON"
msgstr "Polyhedron"
msgid "STB_QUADRATIC_EDGE"
msgstr "Quadratic Edge"
msgid "STB_QUADRATIC_TRIANGLE"
msgstr "Quadratic Triangle"
msgid "STB_QUADRATIC_QUADRANGLE"
msgstr "Quadratic Quadrangle"
msgid "STB_QUADRATIC_TETRAHEDRON"
msgstr "Quadratic Tetrahedron"
msgid "STB_QUADRATIC_PYRAMID"
msgstr "Quadratic Pyramid"
msgid "STB_QUADRATIC_PENTAHEDRON"
msgstr "Quadratic Pentahedron"
msgid "STB_QUADRATIC_HEXAHEDRON"
msgstr "Quadratic Hexahedron"
msgid "STB_NODES"
msgstr "Nodes"