mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-15 10:08:34 +05:00
untabify
This commit is contained in:
parent
4e3fa683ce
commit
2cd5bf0e19
@ -638,8 +638,8 @@ void SMESHGUI_BaseComputeOp::startOperation()
|
|||||||
int nbSel = selected.Extent();
|
int nbSel = selected.Extent();
|
||||||
if (nbSel != 1) {
|
if (nbSel != 1) {
|
||||||
SUIT_MessageBox::warning(desktop(),
|
SUIT_MessageBox::warning(desktop(),
|
||||||
tr("SMESH_WRN_WARNING"),
|
tr("SMESH_WRN_WARNING"),
|
||||||
tr("SMESH_WRN_NO_AVAILABLE_DATA"));
|
tr("SMESH_WRN_NO_AVAILABLE_DATA"));
|
||||||
onCancel();
|
onCancel();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -648,8 +648,8 @@ void SMESHGUI_BaseComputeOp::startOperation()
|
|||||||
myMesh = SMESH::GetMeshByIO(myIObject);
|
myMesh = SMESH::GetMeshByIO(myIObject);
|
||||||
if (myMesh->_is_nil()) {
|
if (myMesh->_is_nil()) {
|
||||||
SUIT_MessageBox::warning(desktop(),
|
SUIT_MessageBox::warning(desktop(),
|
||||||
tr("SMESH_WRN_WARNING"),
|
tr("SMESH_WRN_WARNING"),
|
||||||
tr("SMESH_WRN_NO_AVAILABLE_DATA"));
|
tr("SMESH_WRN_NO_AVAILABLE_DATA"));
|
||||||
onCancel();
|
onCancel();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -742,9 +742,9 @@ void SMESHGUI_BaseComputeOp::computeMesh()
|
|||||||
LightApp_SelectionMgr *Sel = selectionMgr();
|
LightApp_SelectionMgr *Sel = selectionMgr();
|
||||||
if ( Sel )
|
if ( Sel )
|
||||||
{
|
{
|
||||||
SALOME_ListIO selected;
|
SALOME_ListIO selected;
|
||||||
selected.Append( myIObject );
|
selected.Append( myIObject );
|
||||||
Sel->setSelectedObjects( selected );
|
Sel->setSelectedObjects( selected );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -787,10 +787,10 @@ void SMESHGUI_BaseComputeOp::computeMesh()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SMESHGUI_BaseComputeOp::showComputeResult( const bool theMemoryLack,
|
void SMESHGUI_BaseComputeOp::showComputeResult( const bool theMemoryLack,
|
||||||
const bool theNoCompError,
|
const bool theNoCompError,
|
||||||
SMESH::compute_error_array_var& theCompErrors,
|
SMESH::compute_error_array_var& theCompErrors,
|
||||||
const bool theNoHypoError,
|
const bool theNoHypoError,
|
||||||
const QString& theHypErrors )
|
const QString& theHypErrors )
|
||||||
{
|
{
|
||||||
bool hasShape = myMesh->HasShapeToMesh();
|
bool hasShape = myMesh->HasShapeToMesh();
|
||||||
SMESHGUI_ComputeDlg* aCompDlg = computeDlg();
|
SMESHGUI_ComputeDlg* aCompDlg = computeDlg();
|
||||||
@ -855,29 +855,29 @@ void SMESHGUI_BaseComputeOp::showComputeResult( const bool theMemoryLack,
|
|||||||
{
|
{
|
||||||
SMESH::ComputeError & err = theCompErrors[ row ];
|
SMESH::ComputeError & err = theCompErrors[ row ];
|
||||||
|
|
||||||
QString text = err.algoName.in();
|
QString text = err.algoName.in();
|
||||||
if ( !tbl->item( row, COL_ALGO ) ) tbl->setItem( row, COL_ALGO, new QTableWidgetItem( text ) );
|
if ( !tbl->item( row, COL_ALGO ) ) tbl->setItem( row, COL_ALGO, new QTableWidgetItem( text ) );
|
||||||
else tbl->item( row, COL_ALGO )->setText( text );
|
else tbl->item( row, COL_ALGO )->setText( text );
|
||||||
|
|
||||||
text = SMESH::errorText( err.code, err.comment.in() );
|
text = SMESH::errorText( err.code, err.comment.in() );
|
||||||
if ( !tbl->item( row, COL_ERROR ) ) tbl->setItem( row, COL_ERROR, new QTableWidgetItem( text ) );
|
if ( !tbl->item( row, COL_ERROR ) ) tbl->setItem( row, COL_ERROR, new QTableWidgetItem( text ) );
|
||||||
else tbl->item( row, COL_ERROR )->setText( text );
|
else tbl->item( row, COL_ERROR )->setText( text );
|
||||||
|
|
||||||
text = QString("%1").arg( err.subShapeID );
|
text = QString("%1").arg( err.subShapeID );
|
||||||
if ( !tbl->item( row, COL_SHAPEID ) ) tbl->setItem( row, COL_SHAPEID, new QTableWidgetItem( text ) );
|
if ( !tbl->item( row, COL_SHAPEID ) ) tbl->setItem( row, COL_SHAPEID, new QTableWidgetItem( text ) );
|
||||||
else tbl->item( row, COL_SHAPEID )->setText( text );
|
else tbl->item( row, COL_SHAPEID )->setText( text );
|
||||||
|
|
||||||
text = hasShape ? SMESH::shapeText( err.subShapeID, myMainShape ) : QString("");
|
text = hasShape ? SMESH::shapeText( err.subShapeID, myMainShape ) : QString("");
|
||||||
if ( !tbl->item( row, COL_SHAPE ) ) tbl->setItem( row, COL_SHAPE, new QTableWidgetItem( text ) );
|
if ( !tbl->item( row, COL_SHAPE ) ) tbl->setItem( row, COL_SHAPE, new QTableWidgetItem( text ) );
|
||||||
else tbl->item( row, COL_SHAPE )->setText( text );
|
else tbl->item( row, COL_SHAPE )->setText( text );
|
||||||
|
|
||||||
text = ( !hasShape || SMESH::getSubShapeSO( err.subShapeID, myMainShape )) ? "PUBLISHED" : "";
|
text = ( !hasShape || SMESH::getSubShapeSO( err.subShapeID, myMainShape )) ? "PUBLISHED" : "";
|
||||||
if ( !tbl->item( row, COL_PUBLISHED ) ) tbl->setItem( row, COL_PUBLISHED, new QTableWidgetItem( text ) );
|
if ( !tbl->item( row, COL_PUBLISHED ) ) tbl->setItem( row, COL_PUBLISHED, new QTableWidgetItem( text ) );
|
||||||
else tbl->item( row, COL_PUBLISHED )->setText( text ); // if text=="", "PUBLISH" button enabled
|
else tbl->item( row, COL_PUBLISHED )->setText( text ); // if text=="", "PUBLISH" button enabled
|
||||||
|
|
||||||
text = err.hasBadMesh ? "hasBadMesh" : "";
|
text = err.hasBadMesh ? "hasBadMesh" : "";
|
||||||
if ( !tbl->item( row, COL_BAD_MESH ) ) tbl->setItem( row, COL_BAD_MESH, new QTableWidgetItem( text ) );
|
if ( !tbl->item( row, COL_BAD_MESH ) ) tbl->setItem( row, COL_BAD_MESH, new QTableWidgetItem( text ) );
|
||||||
else tbl->item( row, COL_BAD_MESH )->setText( text );
|
else tbl->item( row, COL_BAD_MESH )->setText( text );
|
||||||
if ( err.hasBadMesh ) hasBadMesh = true;
|
if ( err.hasBadMesh ) hasBadMesh = true;
|
||||||
|
|
||||||
//tbl->item( row, COL_ERROR )->setWordWrap( true ); // VSR: TODO ???
|
//tbl->item( row, COL_ERROR )->setWordWrap( true ); // VSR: TODO ???
|
||||||
@ -1381,7 +1381,7 @@ void SMESHGUI_PrecomputeOp::getAssignedAlgos(_PTR(SObject) theMesh,
|
|||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
if ( !algo->_is_nil() )
|
if ( !algo->_is_nil() )
|
||||||
theModeMap[ dim ] = 0;
|
theModeMap[ dim ] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1491,7 +1491,7 @@ void SMESHGUI_PrecomputeOp::onPreview()
|
|||||||
myPreviewDisplayer->SetData( previewRes );
|
myPreviewDisplayer->SetData( previewRes );
|
||||||
// append shape indeces with computed mesh entities
|
// append shape indeces with computed mesh entities
|
||||||
for ( int i = 0, n = aShapesId->length(); i < n; i++ )
|
for ( int i = 0, n = aShapesId->length(); i < n; i++ )
|
||||||
myMapShapeId[ aShapesId[ i ] ] = 0;
|
myMapShapeId[ aShapesId[ i ] ] = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
myPreviewDisplayer->SetVisibility(false);
|
myPreviewDisplayer->SetVisibility(false);
|
||||||
@ -1759,16 +1759,16 @@ void SMESHGUI_BaseComputeOp::evaluateMesh()
|
|||||||
// SHOW RESULTS
|
// SHOW RESULTS
|
||||||
if ( isShowResultDlg )
|
if ( isShowResultDlg )
|
||||||
showEvaluateResult( aRes, memoryLack, noCompError, aCompErrors,
|
showEvaluateResult( aRes, memoryLack, noCompError, aCompErrors,
|
||||||
noHypoError, aHypErrors);
|
noHypoError, aHypErrors);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SMESHGUI_BaseComputeOp::showEvaluateResult(const SMESH::long_array& theRes,
|
void SMESHGUI_BaseComputeOp::showEvaluateResult(const SMESH::long_array& theRes,
|
||||||
const bool theMemoryLack,
|
const bool theMemoryLack,
|
||||||
const bool theNoCompError,
|
const bool theNoCompError,
|
||||||
SMESH::compute_error_array_var& theCompErrors,
|
SMESH::compute_error_array_var& theCompErrors,
|
||||||
const bool theNoHypoError,
|
const bool theNoHypoError,
|
||||||
const QString& theHypErrors)
|
const QString& theHypErrors)
|
||||||
{
|
{
|
||||||
bool hasShape = myMesh->HasShapeToMesh();
|
bool hasShape = myMesh->HasShapeToMesh();
|
||||||
SMESHGUI_ComputeDlg* aCompDlg = evaluateDlg();
|
SMESHGUI_ComputeDlg* aCompDlg = evaluateDlg();
|
||||||
@ -1825,29 +1825,29 @@ void SMESHGUI_BaseComputeOp::showEvaluateResult(const SMESH::long_array& theRes,
|
|||||||
{
|
{
|
||||||
SMESH::ComputeError & err = theCompErrors[ row ];
|
SMESH::ComputeError & err = theCompErrors[ row ];
|
||||||
|
|
||||||
QString text = err.algoName.in();
|
QString text = err.algoName.in();
|
||||||
if ( !tbl->item( row, COL_ALGO ) ) tbl->setItem( row, COL_ALGO, new QTableWidgetItem( text ) );
|
if ( !tbl->item( row, COL_ALGO ) ) tbl->setItem( row, COL_ALGO, new QTableWidgetItem( text ) );
|
||||||
else tbl->item( row, COL_ALGO )->setText( text );
|
else tbl->item( row, COL_ALGO )->setText( text );
|
||||||
|
|
||||||
text = SMESH::errorText( err.code, err.comment.in() );
|
text = SMESH::errorText( err.code, err.comment.in() );
|
||||||
if ( !tbl->item( row, COL_ERROR ) ) tbl->setItem( row, COL_ERROR, new QTableWidgetItem( text ) );
|
if ( !tbl->item( row, COL_ERROR ) ) tbl->setItem( row, COL_ERROR, new QTableWidgetItem( text ) );
|
||||||
else tbl->item( row, COL_ERROR )->setText( text );
|
else tbl->item( row, COL_ERROR )->setText( text );
|
||||||
|
|
||||||
text = QString("%1").arg( err.subShapeID );
|
text = QString("%1").arg( err.subShapeID );
|
||||||
if ( !tbl->item( row, COL_SHAPEID ) ) tbl->setItem( row, COL_SHAPEID, new QTableWidgetItem( text ) );
|
if ( !tbl->item( row, COL_SHAPEID ) ) tbl->setItem( row, COL_SHAPEID, new QTableWidgetItem( text ) );
|
||||||
else tbl->item( row, COL_SHAPEID )->setText( text );
|
else tbl->item( row, COL_SHAPEID )->setText( text );
|
||||||
|
|
||||||
text = hasShape ? SMESH::shapeText( err.subShapeID, myMainShape ) : QString("");
|
text = hasShape ? SMESH::shapeText( err.subShapeID, myMainShape ) : QString("");
|
||||||
if ( !tbl->item( row, COL_SHAPE ) ) tbl->setItem( row, COL_SHAPE, new QTableWidgetItem( text ) );
|
if ( !tbl->item( row, COL_SHAPE ) ) tbl->setItem( row, COL_SHAPE, new QTableWidgetItem( text ) );
|
||||||
else tbl->item( row, COL_SHAPE )->setText( text );
|
else tbl->item( row, COL_SHAPE )->setText( text );
|
||||||
|
|
||||||
text = ( !hasShape || SMESH::getSubShapeSO( err.subShapeID, myMainShape )) ? "PUBLISHED" : "";
|
text = ( !hasShape || SMESH::getSubShapeSO( err.subShapeID, myMainShape )) ? "PUBLISHED" : "";
|
||||||
if ( !tbl->item( row, COL_PUBLISHED ) ) tbl->setItem( row, COL_PUBLISHED, new QTableWidgetItem( text ) );
|
if ( !tbl->item( row, COL_PUBLISHED ) ) tbl->setItem( row, COL_PUBLISHED, new QTableWidgetItem( text ) );
|
||||||
else tbl->item( row, COL_PUBLISHED )->setText( text ); // if text=="", "PUBLISH" button enabled
|
else tbl->item( row, COL_PUBLISHED )->setText( text ); // if text=="", "PUBLISH" button enabled
|
||||||
|
|
||||||
text = err.hasBadMesh ? "hasBadMesh" : "";
|
text = err.hasBadMesh ? "hasBadMesh" : "";
|
||||||
if ( !tbl->item( row, COL_BAD_MESH ) ) tbl->setItem( row, COL_BAD_MESH, new QTableWidgetItem( text ) );
|
if ( !tbl->item( row, COL_BAD_MESH ) ) tbl->setItem( row, COL_BAD_MESH, new QTableWidgetItem( text ) );
|
||||||
else tbl->item( row, COL_BAD_MESH )->setText( text );
|
else tbl->item( row, COL_BAD_MESH )->setText( text );
|
||||||
if ( err.hasBadMesh ) hasBadMesh = true;
|
if ( err.hasBadMesh ) hasBadMesh = true;
|
||||||
|
|
||||||
//tbl->item( row, COL_ERROR )->setWordWrap( true ); // VSR: TODO ???
|
//tbl->item( row, COL_ERROR )->setWordWrap( true ); // VSR: TODO ???
|
||||||
|
@ -79,18 +79,18 @@ protected:
|
|||||||
SMESHGUI_ComputeDlg* computeDlg() const;
|
SMESHGUI_ComputeDlg* computeDlg() const;
|
||||||
void computeMesh();
|
void computeMesh();
|
||||||
void showComputeResult( const bool,
|
void showComputeResult( const bool,
|
||||||
const bool,
|
const bool,
|
||||||
SMESH::compute_error_array_var&,
|
SMESH::compute_error_array_var&,
|
||||||
const bool,
|
const bool,
|
||||||
const QString& );
|
const QString& );
|
||||||
SMESHGUI_ComputeDlg* evaluateDlg() const;
|
SMESHGUI_ComputeDlg* evaluateDlg() const;
|
||||||
void evaluateMesh();
|
void evaluateMesh();
|
||||||
void showEvaluateResult(const SMESH::long_array& theRes,
|
void showEvaluateResult(const SMESH::long_array& theRes,
|
||||||
const bool,
|
const bool,
|
||||||
const bool,
|
const bool,
|
||||||
SMESH::compute_error_array_var&,
|
SMESH::compute_error_array_var&,
|
||||||
const bool,
|
const bool,
|
||||||
const QString&);
|
const QString&);
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
virtual bool onApply();
|
virtual bool onApply();
|
||||||
|
Loading…
Reference in New Issue
Block a user