Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update copyrights
[modules/smesh.git]
/
src
/
StdMeshersGUI
/
StdMeshersGUI_StdHypothesisCreator.cxx
diff --git
a/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx
b/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx
index c2ffde107dec7b878fd6a55aa2352f4ca5566b7a..dc1f6b19e87504aa2f1c0e0ef6cc23e17a80be1d 100644
(file)
--- a/
src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx
+++ b/
src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
5
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
9
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-30,7
+30,6
@@
#include <SMESHGUI_HypothesesUtils.h>
#include <SMESHGUI_Utils.h>
#include <SMESHGUI_GEOMGenUtils.h>
#include <SMESHGUI_HypothesesUtils.h>
#include <SMESHGUI_Utils.h>
#include <SMESHGUI_GEOMGenUtils.h>
-
#include <SMESH_TypeFilter.hxx>
#include <SMESH_NumberFilter.hxx>
#include <SMESH_TypeFilter.hxx>
#include <SMESH_NumberFilter.hxx>
@@
-47,8
+46,9
@@
#include <GEOM_wrap.hxx>
// SALOME GUI includes
#include <GEOM_wrap.hxx>
// SALOME GUI includes
-#include <SUIT_ResourceMgr.h>
#include <SUIT_MessageBox.h>
#include <SUIT_MessageBox.h>
+#include <SUIT_ResourceMgr.h>
+#include <SalomeApp_IntSpinBox.h>
// IDL includes
#include <SALOMEconfig.h>
// IDL includes
#include <SALOMEconfig.h>
@@
-126,7
+126,7
@@
QWidget* StdMeshersGUI_StdHypothesisCreator::getWidgetForParam( int i ) const
//================================================================================
/*!
//================================================================================
/*!
- * \brief Allow modifing myCustomWidgets in const methods
+ * \brief Allow modif
y
ing myCustomWidgets in const methods
* \retval ListOfWidgets* - non-const pointer to myCustomWidgets
*/
//================================================================================
* \retval ListOfWidgets* - non-const pointer to myCustomWidgets
*/
//================================================================================
@@
-423,10
+423,10
@@
bool StdMeshersGUI_StdHypothesisCreator::checkParams( QString& msg ) const
GEOM::GEOM_Object_var face = w->GetObject< GEOM::GEOM_Object >();
GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
GEOM::GEOM_Object_var face = w->GetObject< GEOM::GEOM_Object >();
GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
- _PTR(Study) aStudy = SMESH::
GetActiveStudyDocument
();
+ _PTR(Study) aStudy = SMESH::
getStudy
();
GEOM::GEOM_IShapesOperations_wrap shapeOp;
if ( !geomGen->_is_nil() && aStudy )
GEOM::GEOM_IShapesOperations_wrap shapeOp;
if ( !geomGen->_is_nil() && aStudy )
- shapeOp = geomGen->GetIShapesOperations(
aStudy->StudyId()
);
+ shapeOp = geomGen->GetIShapesOperations();
if ( !shapeOp->_is_nil() )
{
GEOM::ListOfLong_var vertices =
if ( !shapeOp->_is_nil() )
{
GEOM::ListOfLong_var vertices =
@@
-467,7
+467,7
@@
QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
bool res = getStdParamFromDlg( params );
if( isCreation() )
{
bool res = getStdParamFromDlg( params );
if( isCreation() )
{
- SMESH::SetName( SMESH::FindSObject( hypothesis() ), params[0].myValue.toString().to
Latin1
().data() );
+ SMESH::SetName( SMESH::FindSObject( hypothesis() ), params[0].myValue.toString().to
Utf8
().data() );
params.erase( params.begin() );
}
params.erase( params.begin() );
}
@@
-1349,6
+1349,7
@@
void StdMeshersGUI_StdHypothesisCreator::attuneStdWidget (QWidget* w, const int)
{
sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
sb->setEnabled( !widget< QCheckBox >( 1 )->isChecked() );
{
sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
sb->setEnabled( !widget< QCheckBox >( 1 )->isChecked() );
+ sb->setMinimumWidth( 150 );
}
else if( hypType()=="MaxElementArea" )
{
}
else if( hypType()=="MaxElementArea" )
{
@@
-1382,6
+1383,14
@@
void StdMeshersGUI_StdHypothesisCreator::attuneStdWidget (QWidget* w, const int)
sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
}
}
sb->RangeStepAndValidator( VALUE_SMALL, VALUE_MAX, 1.0, "length_precision" );
}
}
+ else if ( SalomeApp_IntSpinBox* sb = qobject_cast< SalomeApp_IntSpinBox* >( w ))
+ {
+ if ( hypType().startsWith( "NumberOfLayers" ) ||
+ hypType().startsWith( "ViscousLayers" ))
+ {
+ sb->setMinimum( 1 );
+ }
+ }
}
//================================================================================
}
//================================================================================
@@
-1424,7
+1433,7
@@
QString StdMeshersGUI_StdHypothesisCreator::type() const
//================================================================================
/*!
* \brief String to insert in "SMESH_%1_HYPOTHESIS" to get hypothesis type name
//================================================================================
/*!
* \brief String to insert in "SMESH_%1_HYPOTHESIS" to get hypothesis type name
- * from message resouce file
+ * from message resou
r
ce file
* \param t - hypothesis type
* \retval QString - result string
*/
* \param t - hypothesis type
* \retval QString - result string
*/