-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020 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
/*!
\brief Constructor.
\param parent Parent widget.
- \param name Field name. Defauls to null string.
+ \param name Field name. Defaults to null string.
*/
Field::Field( QWidget* parent, const QString& name ): QLabel( parent )
{
\brief Format connectivity data to string representation.
\param connectivity Connectivity map.
\param type Element type or face index if negative
- \return Stringifed representation of the connectivity.
+ \return Stringified representation of the connectivity.
*/
QString formatConnectivity( SMESH::Connectivity connectivity, int type )
{
widget( i, j )->setProperty( "value", 0 );
}
}
+ // hide 'Load' button
+ widget( iEnd, iSingle )->setVisible( false );
}
/*!
}
/*!
- \brief Write information from panel to ouput stream.
+ \brief Write information from panel to output stream.
\param out Text stream output.
*/
void SMESHGUI_BaseInfo::saveInfo( QTextStream& out )
}
/*!
- \brief Write information from panel to ouput stream.
+ \brief Write information from panel to output stream.
\param out Text stream output.
*/
void SMESHGUI_ElemInfo::saveInfo( QTextStream &out )
myInfo->setColumnCount( 2 );
myInfo->setHeaderLabels( QStringList() << tr( "PROPERTY" ) << tr( "VALUE" ) );
myInfo->header()->setStretchLastSection( true );
-#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
- myInfo->header()->setResizeMode( 0, QHeaderView::ResizeToContents );
-#else
myInfo->header()->setSectionResizeMode( 0, QHeaderView::ResizeToContents );
-#endif
myInfo->setItemDelegate( new ItemDelegate( myInfo ) );
QVBoxLayout* l = new QVBoxLayout( centralWidget() );
l->setMargin( 0 );
if ( myProxy )
{
SUIT_OverrideCursor wc;
+ myProxy.load();
switch ( myOperation )
{
case GrpSize:
myTree->setColumnCount( 2 );
myTree->header()->setStretchLastSection( true );
-#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
- myTree->header()->setResizeMode( 0, QHeaderView::ResizeToContents );
-#else
myTree->header()->setSectionResizeMode( 0, QHeaderView::ResizeToContents );
-#endif
myTree->header()->hide();
l->addWidget( myTree );
}
/*!
- \brief Write information from panel to ouput stream.
+ \brief Write information from panel to output stream.
\param out Text stream output.
*/
void SMESHGUI_AddInfo::saveInfo( QTextStream &out )
};
/*!
- \brief Contructor.
+ \brief Constructor.
\param parent Parent widget.
\internal
*/
if ( fd.isChecked( BaseInfo ) ) myBaseInfo->saveInfo( out );
if ( fd.isChecked( ElemInfo ) ) myElemInfo->saveInfo( out );
if ( fd.isChecked( AddInfo ) ) myAddInfo->saveInfo( out );
- if ( fd.isChecked( CtrlInfo ) ) myCtrlInfo->saveInfo( out );
+ if ( fd.isChecked( CtrlInfo ) )
+ {
+ myCtrlInfo->showInfo( myProxy ); // it saves what is shown only
+ myCtrlInfo->saveInfo( out );
+ }
}
}
}
void SMESHGUI_CtrlInfo::setTolerance( double theTolerance )
{
- //SMESH::long_array_var anElems = getElementsByType( SMESH::NODE );
- myButtons[1]->setEnabled( true );
- myWidgets[2]->setText("");
+ myButtons[2]->setEnabled( true );
+ myWidgets[3]->setText("");
+ for ( int i = 0; i < myPredicates.count(); ++i )
+ if ( myPredicates[i]->GetFunctorType() == SMESH::FT_EqualNodes )
+ {
+ SMESH::EqualNodes_var functor = SMESH::EqualNodes::_narrow( myPredicates[i] );
+ if ( !functor->_is_nil() )
+ functor->SetTolerance( theTolerance );
+ }
}
#ifndef DISABLE_PLOT2DVIEWER
out << tr( "NAME_LAB" ) << " " << myWidgets[0]->text() << endl;
out << tr( "NODES_INFO" ) << endl;
out << indent() << tr( "NUMBER_OF_THE_FREE_NODES" ) << ": " << myWidgets[1]->text() << endl;
- out << indent() << tr( "NUMBER_OF_THE_DOUBLE_NODES" ) << ": " << myWidgets[2]->text() << endl;
+ out << indent() << tr( "NUMBER_OF_THE_DOUBLE_NODES" ) << ": " << myWidgets[3]->text() << endl;
out << tr( "EDGES_INFO" ) << endl;
- out << indent() << tr( "NUMBER_OF_THE_DOUBLE_EDGES" ) << ": " << myWidgets[3]->text() << endl;
+ out << indent() << tr( "NUMBER_OF_THE_DOUBLE_EDGES" ) << ": " << myWidgets[4]->text() << endl;
out << tr( "FACES_INFO" ) << endl;
- out << indent() << tr( "NUMBER_OF_THE_DOUBLE_FACES" ) << ": " << myWidgets[4]->text() << endl;
- out << indent() << tr( "NUMBER_OF_THE_OVER_CONSTRAINED" ) << ": " << myWidgets[5]->text() << endl;
+ out << indent() << tr( "NUMBER_OF_THE_DOUBLE_FACES" ) << ": " << myWidgets[5]->text() << endl;
+ out << indent() << tr( "NUMBER_OF_THE_OVER_CONSTRAINED" ) << ": " << myWidgets[6]->text() << endl;
out << tr( "VOLUMES_INFO" ) << endl;
- out << indent() << tr( "NUMBER_OF_THE_DOUBLE_VOLUMES" ) << ": " << myWidgets[6]->text() << endl;
- out << indent() << tr( "NUMBER_OF_THE_OVER_CONSTRAINED" ) << ": " << myWidgets[7]->text() << endl;
+ out << indent() << tr( "NUMBER_OF_THE_DOUBLE_VOLUMES" ) << ": " << myWidgets[7]->text() << endl;
+ out << indent() << tr( "NUMBER_OF_THE_OVER_CONSTRAINED" ) << ": " << myWidgets[8]->text() << endl;
}
////////////////////////////////////////////////////////////////////////////////