mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
0020749: EDF 1291 SMESH : Create 2D Mesh from 3D improvement
rename SMESHGUI_CopyMeshDlg to SMESHGUI_Make2DFrom3DDlg
This commit is contained in:
parent
cf145e36af
commit
b1346c0048
@ -51,11 +51,11 @@
|
||||
#define MARGIN 11
|
||||
|
||||
/*!
|
||||
\class SMESHGUI_CopyMeshDlg
|
||||
\class SMESHGUI_Make2DFrom3DDlg
|
||||
\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 )
|
||||
{
|
||||
// title
|
||||
@ -120,11 +120,11 @@ SMESHGUI_CopyMeshDlg::SMESHGUI_CopyMeshDlg( QWidget* parent )
|
||||
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() )
|
||||
return SMESH::BND_2DFROM3D;
|
||||
@ -134,54 +134,54 @@ SMESH::Bnd_Dimension SMESHGUI_CopyMeshDlg::mode() const
|
||||
return SMESH::BND_1DFROM3D;
|
||||
}
|
||||
|
||||
bool SMESHGUI_CopyMeshDlg::needNewMesh() const
|
||||
bool SMESHGUI_Make2DFrom3DDlg::needNewMesh() const
|
||||
{
|
||||
return myNewMeshRB->isChecked();
|
||||
}
|
||||
|
||||
QString SMESHGUI_CopyMeshDlg::getNewMeshName() const
|
||||
QString SMESHGUI_Make2DFrom3DDlg::getNewMeshName() const
|
||||
{
|
||||
return myMeshName->text().trimmed();
|
||||
}
|
||||
|
||||
void SMESHGUI_CopyMeshDlg::setNewMeshName( const QString& name )
|
||||
void SMESHGUI_Make2DFrom3DDlg::setNewMeshName( const QString& name )
|
||||
{
|
||||
myMeshName->setText( name );
|
||||
}
|
||||
|
||||
bool SMESHGUI_CopyMeshDlg::needGroup() const
|
||||
bool SMESHGUI_Make2DFrom3DDlg::needGroup() const
|
||||
{
|
||||
return myGroupCheck->isChecked();
|
||||
}
|
||||
|
||||
QString SMESHGUI_CopyMeshDlg::getGroupName() const
|
||||
QString SMESHGUI_Make2DFrom3DDlg::getGroupName() const
|
||||
{
|
||||
return myGroupName->text().trimmed();
|
||||
}
|
||||
|
||||
void SMESHGUI_CopyMeshDlg::setGroupName( const QString& name )
|
||||
void SMESHGUI_Make2DFrom3DDlg::setGroupName( const QString& name )
|
||||
{
|
||||
myGroupName->setText( name );
|
||||
}
|
||||
|
||||
bool SMESHGUI_CopyMeshDlg::copySource() const
|
||||
bool SMESHGUI_Make2DFrom3DDlg::copySource() const
|
||||
{
|
||||
return myCopyCheck->isChecked();
|
||||
}
|
||||
|
||||
bool SMESHGUI_CopyMeshDlg::copyMissingOnly() const
|
||||
bool SMESHGUI_Make2DFrom3DDlg::copyMissingOnly() const
|
||||
{
|
||||
return myMissingCheck->isChecked();
|
||||
}
|
||||
|
||||
void SMESHGUI_CopyMeshDlg::onTargetChanged()
|
||||
void SMESHGUI_Make2DFrom3DDlg::onTargetChanged()
|
||||
{
|
||||
myMeshName->setEnabled( myNewMeshRB->isChecked() );
|
||||
myCopyCheck->setEnabled( myNewMeshRB->isChecked() );
|
||||
myMissingCheck->setEnabled( myNewMeshRB->isChecked() );
|
||||
}
|
||||
|
||||
void SMESHGUI_CopyMeshDlg::onGroupChecked()
|
||||
void SMESHGUI_Make2DFrom3DDlg::onGroupChecked()
|
||||
{
|
||||
myGroupName->setEnabled( myGroupCheck->isChecked() );
|
||||
}
|
||||
@ -210,15 +210,15 @@ LightApp_Dialog* SMESHGUI_Make2DFrom3DOp::dlg() const
|
||||
void SMESHGUI_Make2DFrom3DOp::startOperation()
|
||||
{
|
||||
if( !myDlg )
|
||||
myDlg = new SMESHGUI_CopyMeshDlg( desktop() );
|
||||
myDlg = new SMESHGUI_Make2DFrom3DDlg( desktop() );
|
||||
|
||||
mySrc = SMESH::SMESH_IDSource::_nil();
|
||||
|
||||
myHelpFileName = "copy_mesh_page.html";
|
||||
myHelpFileName = "make_2dmesh_from_3d_page.html";
|
||||
|
||||
SMESHGUI_SelectionOp::startOperation();
|
||||
|
||||
myDlg->activateObject( SMESHGUI_CopyMeshDlg::Mesh );
|
||||
myDlg->activateObject( SMESHGUI_Make2DFrom3DDlg::Mesh );
|
||||
myDlg->setNewMeshName( SMESH::UniqueName( "Mesh_1" ) );
|
||||
myDlg->setGroupName( SMESH::UniqueName( "Group" ) );
|
||||
myDlg->show();
|
||||
@ -251,7 +251,7 @@ void SMESHGUI_Make2DFrom3DOp::selectionDone()
|
||||
SUIT_SelectionFilter* SMESHGUI_Make2DFrom3DOp::createFilter( const int theId ) const
|
||||
{
|
||||
SUIT_SelectionFilter* f = 0;
|
||||
if ( theId == SMESHGUI_CopyMeshDlg::Mesh ) {
|
||||
if ( theId == SMESHGUI_Make2DFrom3DDlg::Mesh ) {
|
||||
QList<SUIT_SelectionFilter*> filters;
|
||||
filters.append( new SMESH_TypeFilter( MESHorSUBMESH ) );
|
||||
filters.append( new SMESH_TypeFilter( GROUP ) );
|
||||
@ -265,7 +265,7 @@ bool SMESHGUI_Make2DFrom3DOp::isValid( QString& msg ) const
|
||||
if ( !dlg() ) return false;
|
||||
|
||||
// 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;
|
||||
_PTR(SObject) sobj = SMESHGUI::activeStudy()->studyDS()->FindObjectID( entry.toLatin1().constData() );
|
||||
if ( sobj )
|
||||
@ -317,7 +317,7 @@ bool SMESHGUI_Make2DFrom3DOp::compute2DMesh()
|
||||
|
||||
bool ok = false;
|
||||
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() );
|
||||
SMESH::SMESH_IDSource_var obj = SMESH::SObjectToInterface<SMESH::SMESH_IDSource>( sobj );
|
||||
|
||||
|
@ -38,15 +38,15 @@ class QRadioButton;
|
||||
* \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
|
||||
|
||||
public:
|
||||
enum { Mesh };
|
||||
|
||||
SMESHGUI_CopyMeshDlg( QWidget* );
|
||||
virtual ~SMESHGUI_CopyMeshDlg();
|
||||
SMESHGUI_Make2DFrom3DDlg( QWidget* );
|
||||
virtual ~SMESHGUI_Make2DFrom3DDlg();
|
||||
|
||||
SMESH::Bnd_Dimension mode() const;
|
||||
|
||||
@ -106,7 +106,7 @@ private:
|
||||
|
||||
private:
|
||||
SMESH::SMESH_IDSource_var mySrc;
|
||||
QPointer<SMESHGUI_CopyMeshDlg> myDlg;
|
||||
QPointer<SMESHGUI_Make2DFrom3DDlg> myDlg;
|
||||
};
|
||||
|
||||
#endif // SMESHGUI_Make2DFrom3DOp_H
|
||||
|
@ -181,7 +181,7 @@
|
||||
</message>
|
||||
<message>
|
||||
<source>MEN_2D_FROM_3D</source>
|
||||
<translation>Create 2D mesh from 3D</translation>
|
||||
<translation>Create boundary elements</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MEN_MESH_ORDER</source>
|
||||
@ -2180,7 +2180,7 @@ Please check preferences of Mesh module.
|
||||
</message>
|
||||
<message>
|
||||
<source>STB_2D_FROM_3D</source>
|
||||
<translation>Create 2D mesh from 3D</translation>
|
||||
<translation>Create boundary elements</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>STB_MESH_ORDER</source>
|
||||
@ -2700,7 +2700,7 @@ Please check preferences of Mesh module.
|
||||
</message>
|
||||
<message>
|
||||
<source>TOP_2D_FROM_3D</source>
|
||||
<translation>Create 2D mesh from 3D</translation>
|
||||
<translation>Create boundary elements</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>TOP_MESH_ORDER</source>
|
||||
@ -3645,7 +3645,7 @@ Please specify it and try again</translation>
|
||||
<name>SMESHGUI_Make2DFrom3DDlg</name>
|
||||
<message>
|
||||
<source>CAPTION</source>
|
||||
<translation>Create 2D mesh from 3D</translation>
|
||||
<translation>Create boundary elements</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -5273,7 +5273,7 @@ It is impossible to read point coordinates from file</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SMESHGUI_CopyMeshDlg</name>
|
||||
<name>SMESHGUI_Make2DFrom3DDlg</name>
|
||||
<message>
|
||||
<source>CAPTION</source>
|
||||
<translation>Create boundary elements</translation>
|
||||
|
Loading…
Reference in New Issue
Block a user