mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-20 18:50:33 +05:00
Dump Python Extension
This commit is contained in:
parent
386d271df8
commit
eddb6b8f48
@ -402,6 +402,27 @@ bool SMESHGUI_GenericHypothesisCreator::getParamFromCustomWidget( StdParam&, QWi
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SMESHGUI_GenericHypothesisCreator::checkParams() const
|
||||
{
|
||||
ListOfWidgets::const_iterator anIt = widgets().begin(), aLast = widgets().end();
|
||||
for( ; anIt!=aLast; anIt++ )
|
||||
{
|
||||
if( (*anIt)->inherits( "SalomeApp_IntSpinBox" ) )
|
||||
{
|
||||
SalomeApp_IntSpinBox* sb = ( SalomeApp_IntSpinBox* )( *anIt );
|
||||
if( !sb->isValid() )
|
||||
return false;
|
||||
}
|
||||
else if( (*anIt)->inherits( "SalomeApp_DoubleSpinBox" ) )
|
||||
{
|
||||
SalomeApp_DoubleSpinBox* sb = ( SalomeApp_DoubleSpinBox* )( *anIt );
|
||||
if( !sb->isValid() )
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void SMESHGUI_GenericHypothesisCreator::onReject()
|
||||
{
|
||||
}
|
||||
@ -483,7 +504,10 @@ void SMESHGUI_HypothesisDlg::setCustomFrame( QFrame* f )
|
||||
void SMESHGUI_HypothesisDlg::accept()
|
||||
{
|
||||
if ( myCreator && !myCreator->checkParams() )
|
||||
{
|
||||
SUIT_MessageBox::critical( this, tr( "SMESH_ERROR" ), tr( "SMESH_INCORRECT_INPUT" ) );
|
||||
return;
|
||||
}
|
||||
QtxDialog::accept();
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
void edit( SMESH::SMESH_Hypothesis_ptr,
|
||||
const QString&, QWidget* );
|
||||
|
||||
virtual bool checkParams() const = 0;
|
||||
virtual bool checkParams() const;
|
||||
virtual void onReject();
|
||||
virtual QString helpPage() const;
|
||||
|
||||
|
@ -115,4 +115,5 @@ void SMESHGUI_SpinBox::RangeStepAndValidator( double min,
|
||||
// see QtxDoubleSpinBox::mapValueToText( double v )
|
||||
setRange( min, max );
|
||||
setSingleStep( step );
|
||||
setDefaultValue( min );
|
||||
}
|
||||
|
@ -1217,6 +1217,10 @@ Are you sure want to export to MED 2.1 ?</translation>
|
||||
<source>SMESH_ID_NODES</source>
|
||||
<translation>Id Nodes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SMESH_INCORRECT_INPUT</source>
|
||||
<translation>Incorrect input data!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SMESH_INFORMATION</source>
|
||||
<translation>Information</translation>
|
||||
|
@ -79,6 +79,9 @@ StdMeshersGUI_NbSegmentsCreator::~StdMeshersGUI_NbSegmentsCreator()
|
||||
|
||||
bool StdMeshersGUI_NbSegmentsCreator::checkParams() const
|
||||
{
|
||||
if( !SMESHGUI_GenericHypothesisCreator::checkParams() )
|
||||
return false;
|
||||
|
||||
NbSegmentsHypothesisData data_old, data_new;
|
||||
readParamsFromHypo( data_old );
|
||||
readParamsFromWidgets( data_new );
|
||||
|
@ -340,6 +340,9 @@ namespace {
|
||||
|
||||
bool StdMeshersGUI_StdHypothesisCreator::checkParams() const
|
||||
{
|
||||
if( !SMESHGUI_GenericHypothesisCreator::checkParams() )
|
||||
return false;
|
||||
|
||||
// check if object reference parameter is set, as it has no default value
|
||||
bool ok = true;
|
||||
if ( hypType().startsWith("ProjectionSource" ))
|
||||
|
Loading…
Reference in New Issue
Block a user