0020749: EDF 1291 SMESH : Create 2D Mesh from 3D improvement

rename SMESHGUI_CopyMeshDlg to SMESHGUI_Make2DFrom3DDlg
This commit is contained in:
eap 2010-10-20 14:21:31 +00:00
parent cf145e36af
commit b1346c0048
3 changed files with 29 additions and 29 deletions

View File

@ -51,11 +51,11 @@
#define MARGIN 11 #define MARGIN 11
/*! /*!
\class SMESHGUI_CopyMeshDlg \class SMESHGUI_Make2DFrom3DDlg
\brief Copy Mesh dialog box \brief Copy Mesh dialog box
*/ */
SMESHGUI_CopyMeshDlg::SMESHGUI_CopyMeshDlg( QWidget* parent ) SMESHGUI_Make2DFrom3DDlg::SMESHGUI_Make2DFrom3DDlg( QWidget* parent )
: SMESHGUI_Dialog( parent, false, true, OK | Apply | Close | Help ) : SMESHGUI_Dialog( parent, false, true, OK | Apply | Close | Help )
{ {
// title // title
@ -120,11 +120,11 @@ SMESHGUI_CopyMeshDlg::SMESHGUI_CopyMeshDlg( QWidget* parent )
onGroupChecked(); onGroupChecked();
} }
SMESHGUI_CopyMeshDlg::~SMESHGUI_CopyMeshDlg() SMESHGUI_Make2DFrom3DDlg::~SMESHGUI_Make2DFrom3DDlg()
{ {
} }
SMESH::Bnd_Dimension SMESHGUI_CopyMeshDlg::mode() const SMESH::Bnd_Dimension SMESHGUI_Make2DFrom3DDlg::mode() const
{ {
if ( my2dFrom3dRB->isChecked() ) if ( my2dFrom3dRB->isChecked() )
return SMESH::BND_2DFROM3D; return SMESH::BND_2DFROM3D;
@ -134,54 +134,54 @@ SMESH::Bnd_Dimension SMESHGUI_CopyMeshDlg::mode() const
return SMESH::BND_1DFROM3D; return SMESH::BND_1DFROM3D;
} }
bool SMESHGUI_CopyMeshDlg::needNewMesh() const bool SMESHGUI_Make2DFrom3DDlg::needNewMesh() const
{ {
return myNewMeshRB->isChecked(); return myNewMeshRB->isChecked();
} }
QString SMESHGUI_CopyMeshDlg::getNewMeshName() const QString SMESHGUI_Make2DFrom3DDlg::getNewMeshName() const
{ {
return myMeshName->text().trimmed(); return myMeshName->text().trimmed();
} }
void SMESHGUI_CopyMeshDlg::setNewMeshName( const QString& name ) void SMESHGUI_Make2DFrom3DDlg::setNewMeshName( const QString& name )
{ {
myMeshName->setText( name ); myMeshName->setText( name );
} }
bool SMESHGUI_CopyMeshDlg::needGroup() const bool SMESHGUI_Make2DFrom3DDlg::needGroup() const
{ {
return myGroupCheck->isChecked(); return myGroupCheck->isChecked();
} }
QString SMESHGUI_CopyMeshDlg::getGroupName() const QString SMESHGUI_Make2DFrom3DDlg::getGroupName() const
{ {
return myGroupName->text().trimmed(); return myGroupName->text().trimmed();
} }
void SMESHGUI_CopyMeshDlg::setGroupName( const QString& name ) void SMESHGUI_Make2DFrom3DDlg::setGroupName( const QString& name )
{ {
myGroupName->setText( name ); myGroupName->setText( name );
} }
bool SMESHGUI_CopyMeshDlg::copySource() const bool SMESHGUI_Make2DFrom3DDlg::copySource() const
{ {
return myCopyCheck->isChecked(); return myCopyCheck->isChecked();
} }
bool SMESHGUI_CopyMeshDlg::copyMissingOnly() const bool SMESHGUI_Make2DFrom3DDlg::copyMissingOnly() const
{ {
return myMissingCheck->isChecked(); return myMissingCheck->isChecked();
} }
void SMESHGUI_CopyMeshDlg::onTargetChanged() void SMESHGUI_Make2DFrom3DDlg::onTargetChanged()
{ {
myMeshName->setEnabled( myNewMeshRB->isChecked() ); myMeshName->setEnabled( myNewMeshRB->isChecked() );
myCopyCheck->setEnabled( myNewMeshRB->isChecked() ); myCopyCheck->setEnabled( myNewMeshRB->isChecked() );
myMissingCheck->setEnabled( myNewMeshRB->isChecked() ); myMissingCheck->setEnabled( myNewMeshRB->isChecked() );
} }
void SMESHGUI_CopyMeshDlg::onGroupChecked() void SMESHGUI_Make2DFrom3DDlg::onGroupChecked()
{ {
myGroupName->setEnabled( myGroupCheck->isChecked() ); myGroupName->setEnabled( myGroupCheck->isChecked() );
} }
@ -210,15 +210,15 @@ LightApp_Dialog* SMESHGUI_Make2DFrom3DOp::dlg() const
void SMESHGUI_Make2DFrom3DOp::startOperation() void SMESHGUI_Make2DFrom3DOp::startOperation()
{ {
if( !myDlg ) if( !myDlg )
myDlg = new SMESHGUI_CopyMeshDlg( desktop() ); myDlg = new SMESHGUI_Make2DFrom3DDlg( desktop() );
mySrc = SMESH::SMESH_IDSource::_nil(); mySrc = SMESH::SMESH_IDSource::_nil();
myHelpFileName = "copy_mesh_page.html"; myHelpFileName = "make_2dmesh_from_3d_page.html";
SMESHGUI_SelectionOp::startOperation(); SMESHGUI_SelectionOp::startOperation();
myDlg->activateObject( SMESHGUI_CopyMeshDlg::Mesh ); myDlg->activateObject( SMESHGUI_Make2DFrom3DDlg::Mesh );
myDlg->setNewMeshName( SMESH::UniqueName( "Mesh_1" ) ); myDlg->setNewMeshName( SMESH::UniqueName( "Mesh_1" ) );
myDlg->setGroupName( SMESH::UniqueName( "Group" ) ); myDlg->setGroupName( SMESH::UniqueName( "Group" ) );
myDlg->show(); myDlg->show();
@ -251,7 +251,7 @@ void SMESHGUI_Make2DFrom3DOp::selectionDone()
SUIT_SelectionFilter* SMESHGUI_Make2DFrom3DOp::createFilter( const int theId ) const SUIT_SelectionFilter* SMESHGUI_Make2DFrom3DOp::createFilter( const int theId ) const
{ {
SUIT_SelectionFilter* f = 0; SUIT_SelectionFilter* f = 0;
if ( theId == SMESHGUI_CopyMeshDlg::Mesh ) { if ( theId == SMESHGUI_Make2DFrom3DDlg::Mesh ) {
QList<SUIT_SelectionFilter*> filters; QList<SUIT_SelectionFilter*> filters;
filters.append( new SMESH_TypeFilter( MESHorSUBMESH ) ); filters.append( new SMESH_TypeFilter( MESHorSUBMESH ) );
filters.append( new SMESH_TypeFilter( GROUP ) ); filters.append( new SMESH_TypeFilter( GROUP ) );
@ -265,7 +265,7 @@ bool SMESHGUI_Make2DFrom3DOp::isValid( QString& msg ) const
if ( !dlg() ) return false; if ( !dlg() ) return false;
// check if any source data is selected // check if any source data is selected
QString entry = myDlg->selectedObject( SMESHGUI_CopyMeshDlg::Mesh ); QString entry = myDlg->selectedObject( SMESHGUI_Make2DFrom3DDlg::Mesh );
SMESH::SMESH_IDSource_var obj; SMESH::SMESH_IDSource_var obj;
_PTR(SObject) sobj = SMESHGUI::activeStudy()->studyDS()->FindObjectID( entry.toLatin1().constData() ); _PTR(SObject) sobj = SMESHGUI::activeStudy()->studyDS()->FindObjectID( entry.toLatin1().constData() );
if ( sobj ) if ( sobj )
@ -317,7 +317,7 @@ bool SMESHGUI_Make2DFrom3DOp::compute2DMesh()
bool ok = false; bool ok = false;
try { try {
QString entry = myDlg->selectedObject( SMESHGUI_CopyMeshDlg::Mesh ); QString entry = myDlg->selectedObject( SMESHGUI_Make2DFrom3DDlg::Mesh );
_PTR(SObject) sobj = SMESHGUI::activeStudy()->studyDS()->FindObjectID( entry.toLatin1().constData() ); _PTR(SObject) sobj = SMESHGUI::activeStudy()->studyDS()->FindObjectID( entry.toLatin1().constData() );
SMESH::SMESH_IDSource_var obj = SMESH::SObjectToInterface<SMESH::SMESH_IDSource>( sobj ); SMESH::SMESH_IDSource_var obj = SMESH::SObjectToInterface<SMESH::SMESH_IDSource>( sobj );

View File

@ -38,15 +38,15 @@ class QRadioButton;
* \brief Dialog to show result mesh statistic * \brief Dialog to show result mesh statistic
*/ */
class SMESHGUI_EXPORT SMESHGUI_CopyMeshDlg : public SMESHGUI_Dialog class SMESHGUI_EXPORT SMESHGUI_Make2DFrom3DDlg : public SMESHGUI_Dialog
{ {
Q_OBJECT Q_OBJECT
public: public:
enum { Mesh }; enum { Mesh };
SMESHGUI_CopyMeshDlg( QWidget* ); SMESHGUI_Make2DFrom3DDlg( QWidget* );
virtual ~SMESHGUI_CopyMeshDlg(); virtual ~SMESHGUI_Make2DFrom3DDlg();
SMESH::Bnd_Dimension mode() const; SMESH::Bnd_Dimension mode() const;
@ -106,7 +106,7 @@ private:
private: private:
SMESH::SMESH_IDSource_var mySrc; SMESH::SMESH_IDSource_var mySrc;
QPointer<SMESHGUI_CopyMeshDlg> myDlg; QPointer<SMESHGUI_Make2DFrom3DDlg> myDlg;
}; };
#endif // SMESHGUI_Make2DFrom3DOp_H #endif // SMESHGUI_Make2DFrom3DOp_H

View File

@ -181,7 +181,7 @@
</message> </message>
<message> <message>
<source>MEN_2D_FROM_3D</source> <source>MEN_2D_FROM_3D</source>
<translation>Create 2D mesh from 3D</translation> <translation>Create boundary elements</translation>
</message> </message>
<message> <message>
<source>MEN_MESH_ORDER</source> <source>MEN_MESH_ORDER</source>
@ -2180,7 +2180,7 @@ Please check preferences of Mesh module.
</message> </message>
<message> <message>
<source>STB_2D_FROM_3D</source> <source>STB_2D_FROM_3D</source>
<translation>Create 2D mesh from 3D</translation> <translation>Create boundary elements</translation>
</message> </message>
<message> <message>
<source>STB_MESH_ORDER</source> <source>STB_MESH_ORDER</source>
@ -2700,7 +2700,7 @@ Please check preferences of Mesh module.
</message> </message>
<message> <message>
<source>TOP_2D_FROM_3D</source> <source>TOP_2D_FROM_3D</source>
<translation>Create 2D mesh from 3D</translation> <translation>Create boundary elements</translation>
</message> </message>
<message> <message>
<source>TOP_MESH_ORDER</source> <source>TOP_MESH_ORDER</source>
@ -3645,7 +3645,7 @@ Please specify it and try again</translation>
<name>SMESHGUI_Make2DFrom3DDlg</name> <name>SMESHGUI_Make2DFrom3DDlg</name>
<message> <message>
<source>CAPTION</source> <source>CAPTION</source>
<translation>Create 2D mesh from 3D</translation> <translation>Create boundary elements</translation>
</message> </message>
</context> </context>
<context> <context>
@ -5273,7 +5273,7 @@ It is impossible to read point coordinates from file</translation>
</message> </message>
</context> </context>
<context> <context>
<name>SMESHGUI_CopyMeshDlg</name> <name>SMESHGUI_Make2DFrom3DDlg</name>
<message> <message>
<source>CAPTION</source> <source>CAPTION</source>
<translation>Create boundary elements</translation> <translation>Create boundary elements</translation>