mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-31 11:50:34 +05:00
untabify
This commit is contained in:
parent
4802162fe0
commit
859a8ee4f0
@ -2892,7 +2892,7 @@ void SMESHGUI::BuildPresentation( const Handle(SALOME_InteractiveObject) & theIO
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
void SMESHGUI::createSMESHAction( const int id, const QString& po_id, const QString& icon_id,
|
||||
const int key, const bool toggle, const QString& shortcutAction )
|
||||
const int key, const bool toggle, const QString& shortcutAction )
|
||||
{
|
||||
QIcon icon;
|
||||
QWidget* parent = application()->desktop();
|
||||
@ -2910,7 +2910,7 @@ void SMESHGUI::createSMESHAction( const int id, const QString& po_id, const QStr
|
||||
status_bar = tr( QString( "STB_%1" ).arg( po_id ).toLatin1().data() );
|
||||
|
||||
createAction( id, tooltip, icon, menu, status_bar, key, parent,
|
||||
toggle, this, SLOT( OnGUIEvent() ), shortcutAction );
|
||||
toggle, this, SLOT( OnGUIEvent() ), shortcutAction );
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@ -146,7 +146,7 @@ protected:
|
||||
const QString& = QString(),
|
||||
const int = 0,
|
||||
const bool = false,
|
||||
const QString& = QString() );
|
||||
const QString& = QString() );
|
||||
void createPopupItem( const int,
|
||||
const QString&,
|
||||
const QString&,
|
||||
|
@ -492,19 +492,19 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply()
|
||||
if( addToGroup ) {
|
||||
aGroupName = ComboBox_GroupName->currentText();
|
||||
for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
|
||||
QString aName = ComboBox_GroupName->itemText( i );
|
||||
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
|
||||
idx = i;
|
||||
QString aName = ComboBox_GroupName->itemText( i );
|
||||
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
|
||||
idx = i;
|
||||
}
|
||||
if ( idx > 0 ) {
|
||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
|
||||
if ( !aGeomGroup->_is_nil() ) {
|
||||
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
||||
tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
|
||||
tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
|
||||
if ( res == 1 ) return;
|
||||
}
|
||||
aGroup = myGroups[idx-1];
|
||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
|
||||
if ( !aGeomGroup->_is_nil() ) {
|
||||
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
||||
tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
|
||||
tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
|
||||
if ( res == 1 ) return;
|
||||
}
|
||||
aGroup = myGroups[idx-1];
|
||||
}
|
||||
}
|
||||
|
||||
@ -530,24 +530,24 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply()
|
||||
if ( anElemId != -1 && addToGroup && !aGroupName.isEmpty() ) {
|
||||
SMESH::SMESH_Group_var aGroupUsed;
|
||||
if ( aGroup->_is_nil() ) {
|
||||
// create new group
|
||||
aGroupUsed = SMESH::AddGroup( myMesh, (SMESH::ElementType)myElementType, aGroupName );
|
||||
if ( !aGroupUsed->_is_nil() ) {
|
||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
|
||||
ComboBox_GroupName->addItem( aGroupName );
|
||||
}
|
||||
// create new group
|
||||
aGroupUsed = SMESH::AddGroup( myMesh, (SMESH::ElementType)myElementType, aGroupName );
|
||||
if ( !aGroupUsed->_is_nil() ) {
|
||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
|
||||
ComboBox_GroupName->addItem( aGroupName );
|
||||
}
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
|
||||
if ( !aGeomGroup->_is_nil() ) {
|
||||
aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
|
||||
if ( !aGroupUsed->_is_nil() && idx > 0 ) {
|
||||
myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
|
||||
SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
|
||||
}
|
||||
}
|
||||
else
|
||||
aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
|
||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
|
||||
if ( !aGeomGroup->_is_nil() ) {
|
||||
aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
|
||||
if ( !aGroupUsed->_is_nil() && idx > 0 ) {
|
||||
myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
|
||||
SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
|
||||
}
|
||||
}
|
||||
else
|
||||
aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
|
||||
}
|
||||
|
||||
if ( !aGroupUsed->_is_nil() ) {
|
||||
@ -736,11 +736,11 @@ void SMESHGUI_AddMeshElementDlg::SelectionIntoArgument()
|
||||
for ( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
|
||||
SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
|
||||
if ( !aGroup->_is_nil() && aGroup->GetType() == (SMESH::ElementType)myElementType ) {
|
||||
QString aGroupName( aGroup->GetName() );
|
||||
if ( !aGroupName.isEmpty() ) {
|
||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
|
||||
ComboBox_GroupName->addItem( aGroupName );
|
||||
}
|
||||
QString aGroupName( aGroup->GetName() );
|
||||
if ( !aGroupName.isEmpty() ) {
|
||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
|
||||
ComboBox_GroupName->addItem( aGroupName );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -731,15 +731,15 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
|
||||
for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
|
||||
QString aName = ComboBox_GroupName->itemText( i );
|
||||
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
|
||||
idx = i;
|
||||
idx = i;
|
||||
}
|
||||
if ( idx > 0 ) {
|
||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
|
||||
if ( !aGeomGroup->_is_nil() ) {
|
||||
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
||||
tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
|
||||
tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
|
||||
if ( res == 1 ) return;
|
||||
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
||||
tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
|
||||
tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
|
||||
if ( res == 1 ) return;
|
||||
}
|
||||
aGroup = myGroups[idx-1];
|
||||
}
|
||||
@ -771,21 +771,21 @@ void SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
|
||||
// create new group
|
||||
aGroupUsed = SMESH::AddGroup( myMesh, anElementType, aGroupName );
|
||||
if ( !aGroupUsed->_is_nil() ) {
|
||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
|
||||
ComboBox_GroupName->addItem( aGroupName );
|
||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
|
||||
ComboBox_GroupName->addItem( aGroupName );
|
||||
}
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
|
||||
if ( !aGeomGroup->_is_nil() ) {
|
||||
aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
|
||||
if ( !aGroupUsed->_is_nil() && idx > 0 ) {
|
||||
myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
|
||||
SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
|
||||
}
|
||||
aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
|
||||
if ( !aGroupUsed->_is_nil() && idx > 0 ) {
|
||||
myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
|
||||
SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
|
||||
}
|
||||
}
|
||||
else
|
||||
aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
|
||||
aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
|
||||
}
|
||||
|
||||
if ( !aGroupUsed->_is_nil() ) {
|
||||
@ -974,11 +974,11 @@ void SMESHGUI_AddQuadraticElementDlg::SelectionIntoArgument()
|
||||
for ( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
|
||||
SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
|
||||
if ( !aGroup->_is_nil() && aGroup->GetType() == anElementType ) {
|
||||
QString aGroupName( aGroup->GetName() );
|
||||
if ( !aGroupName.isEmpty() ) {
|
||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
|
||||
ComboBox_GroupName->addItem( aGroupName );
|
||||
}
|
||||
QString aGroupName( aGroup->GetName() );
|
||||
if ( !aGroupName.isEmpty() ) {
|
||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
|
||||
ComboBox_GroupName->addItem( aGroupName );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -456,22 +456,22 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply()
|
||||
SMESH::SMESH_GroupBase_var aGroup;
|
||||
int idx = 0;
|
||||
if( addToGroup ) {
|
||||
aGroupName = ComboBox_GroupName->currentText();
|
||||
for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
|
||||
QString aName = ComboBox_GroupName->itemText( i );
|
||||
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
|
||||
idx = i;
|
||||
}
|
||||
if ( idx > 0 ) {
|
||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
|
||||
if ( !aGeomGroup->_is_nil() ) {
|
||||
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
||||
tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
|
||||
tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
|
||||
if ( res == 1 ) return;
|
||||
}
|
||||
aGroup = myGroups[idx-1];
|
||||
}
|
||||
aGroupName = ComboBox_GroupName->currentText();
|
||||
for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
|
||||
QString aName = ComboBox_GroupName->itemText( i );
|
||||
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
|
||||
idx = i;
|
||||
}
|
||||
if ( idx > 0 ) {
|
||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
|
||||
if ( !aGeomGroup->_is_nil() ) {
|
||||
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
||||
tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
|
||||
tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
|
||||
if ( res == 1 ) return;
|
||||
}
|
||||
aGroup = myGroups[idx-1];
|
||||
}
|
||||
}
|
||||
|
||||
if (GetConstructorId() == 0)
|
||||
@ -535,28 +535,28 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply()
|
||||
}
|
||||
|
||||
if ( anElemId != -1 && addToGroup && !aGroupName.isEmpty() ) {
|
||||
SMESH::SMESH_Group_var aGroupUsed;
|
||||
if ( aGroup->_is_nil() ) {
|
||||
// create new group
|
||||
aGroupUsed = SMESH::AddGroup( myMesh, SMESH::VOLUME, aGroupName );
|
||||
if ( !aGroupUsed->_is_nil() ) {
|
||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
|
||||
ComboBox_GroupName->addItem( aGroupName );
|
||||
}
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
|
||||
if ( !aGeomGroup->_is_nil() ) {
|
||||
aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
|
||||
if ( !aGroupUsed->_is_nil() && idx > 0 ) {
|
||||
myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
|
||||
SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
|
||||
}
|
||||
}
|
||||
else
|
||||
aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
|
||||
}
|
||||
|
||||
SMESH::SMESH_Group_var aGroupUsed;
|
||||
if ( aGroup->_is_nil() ) {
|
||||
// create new group
|
||||
aGroupUsed = SMESH::AddGroup( myMesh, SMESH::VOLUME, aGroupName );
|
||||
if ( !aGroupUsed->_is_nil() ) {
|
||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
|
||||
ComboBox_GroupName->addItem( aGroupName );
|
||||
}
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
|
||||
if ( !aGeomGroup->_is_nil() ) {
|
||||
aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
|
||||
if ( !aGroupUsed->_is_nil() && idx > 0 ) {
|
||||
myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
|
||||
SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
|
||||
}
|
||||
}
|
||||
else
|
||||
aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
|
||||
}
|
||||
|
||||
if ( !aGroupUsed->_is_nil() ) {
|
||||
SMESH::long_array_var anIdList = new SMESH::long_array;
|
||||
anIdList->length( 1 );
|
||||
@ -771,10 +771,10 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::SelectionIntoArgument()
|
||||
for ( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
|
||||
SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
|
||||
if ( !aGroup->_is_nil() && aGroup->GetType() == SMESH::VOLUME ) {
|
||||
QString aGroupName( aGroup->GetName() );
|
||||
if ( !aGroupName.isEmpty() ) {
|
||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
|
||||
ComboBox_GroupName->addItem( aGroupName );
|
||||
QString aGroupName( aGroup->GetName() );
|
||||
if ( !aGroupName.isEmpty() ) {
|
||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
|
||||
ComboBox_GroupName->addItem( aGroupName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -325,23 +325,23 @@ bool SMESHGUI_DuplicateNodesDlg::onApply()
|
||||
|
||||
if (operationMode == 0) {
|
||||
if (toCreateGroup) {
|
||||
SMESH::SMESH_GroupBase_ptr aNewGroup =
|
||||
aMeshEditor->DoubleNodeGroupNew(myGroup1, myGroup2);
|
||||
if (!CORBA::is_nil(aNewGroup))
|
||||
SMESH::SMESH_GroupBase_ptr aNewGroup =
|
||||
aMeshEditor->DoubleNodeGroupNew(myGroup1, myGroup2);
|
||||
if (!CORBA::is_nil(aNewGroup))
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
result = aMeshEditor->DoubleNodeGroup(myGroup1, myGroup2);
|
||||
result = aMeshEditor->DoubleNodeGroup(myGroup1, myGroup2);
|
||||
}
|
||||
else {
|
||||
if (toCreateGroup) {
|
||||
SMESH::SMESH_GroupBase_ptr aNewGroup =
|
||||
aMeshEditor->DoubleNodeElemGroupNew(myGroup1, myGroup2, myGroup3);
|
||||
if (!CORBA::is_nil(aNewGroup))
|
||||
result = true;
|
||||
SMESH::SMESH_GroupBase_ptr aNewGroup =
|
||||
aMeshEditor->DoubleNodeElemGroupNew(myGroup1, myGroup2, myGroup3);
|
||||
if (!CORBA::is_nil(aNewGroup))
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
result = aMeshEditor->DoubleNodeElemGroup(myGroup1, myGroup2, myGroup3);
|
||||
result = aMeshEditor->DoubleNodeElemGroup(myGroup1, myGroup2, myGroup3);
|
||||
}
|
||||
}
|
||||
catch (const SALOME::SALOME_Exception& S_ex) {
|
||||
@ -419,20 +419,20 @@ void SMESHGUI_DuplicateNodesDlg::onSelectionChanged()
|
||||
bool isTypeValid = true;
|
||||
|
||||
if (operationMode == 0) {
|
||||
if ( (myCurrentLineEdit == myLineEdit1 && aGroupType != SMESH::NODE) ||
|
||||
(myCurrentLineEdit == myLineEdit2 && aGroupType == SMESH::NODE) )
|
||||
isTypeValid = false;
|
||||
if ( (myCurrentLineEdit == myLineEdit1 && aGroupType != SMESH::NODE) ||
|
||||
(myCurrentLineEdit == myLineEdit2 && aGroupType == SMESH::NODE) )
|
||||
isTypeValid = false;
|
||||
}
|
||||
else if (operationMode == 1) {
|
||||
if ( (myCurrentLineEdit == myLineEdit1 && aGroupType != SMESH::EDGE &&
|
||||
aGroupType != SMESH::FACE) ||
|
||||
(myCurrentLineEdit == myLineEdit2 && aGroupType != SMESH::NODE) ||
|
||||
(myCurrentLineEdit == myLineEdit3 && aGroupType == SMESH::NODE) )
|
||||
isTypeValid = false;
|
||||
if ( (myCurrentLineEdit == myLineEdit1 && aGroupType != SMESH::EDGE &&
|
||||
aGroupType != SMESH::FACE) ||
|
||||
(myCurrentLineEdit == myLineEdit2 && aGroupType != SMESH::NODE) ||
|
||||
(myCurrentLineEdit == myLineEdit3 && aGroupType == SMESH::NODE) )
|
||||
isTypeValid = false;
|
||||
}
|
||||
|
||||
if (!isTypeValid)
|
||||
aGroup = SMESH::SMESH_GroupBase::_nil();
|
||||
aGroup = SMESH::SMESH_GroupBase::_nil();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2976,8 +2976,8 @@ void SMESHGUI_FilterDlg::onSelectionDone()
|
||||
|
||||
QList<int> types;
|
||||
types << SMESH::FT_BelongToGeom << SMESH::FT_BelongToPlane
|
||||
<< SMESH::FT_BelongToCylinder << SMESH::FT_BelongToGenSurface
|
||||
<< SMESH::FT_LyingOnGeom;
|
||||
<< SMESH::FT_BelongToCylinder << SMESH::FT_BelongToGenSurface
|
||||
<< SMESH::FT_LyingOnGeom;
|
||||
if (aList.Extent() != 1 || !myTable->CurrentCell(aRow, aCol) ||
|
||||
!types.contains(myTable->GetCriterionType(aRow)))
|
||||
return;
|
||||
|
@ -718,12 +718,12 @@ void SMESHGUI_GroupDlg::setSelectionMode (int theMode)
|
||||
switch (theMode) {
|
||||
case grpNodeSelection:
|
||||
if (myActorsList.count() > 0) {
|
||||
QListIterator<SMESH_Actor*> it( myActorsList );
|
||||
while ( it.hasNext() )
|
||||
it.next()->SetPointRepresentation(true);
|
||||
QListIterator<SMESH_Actor*> it( myActorsList );
|
||||
while ( it.hasNext() )
|
||||
it.next()->SetPointRepresentation(true);
|
||||
}
|
||||
else {
|
||||
SMESH::SetPointRepresentation(true);
|
||||
SMESH::SetPointRepresentation(true);
|
||||
}
|
||||
if ( aViewWindow ) aViewWindow->SetSelectionMode(isSelectAll ? ActorSelection : NodeSelection);
|
||||
break;
|
||||
@ -805,19 +805,19 @@ bool SMESHGUI_GroupDlg::onApply()
|
||||
myGroup = SMESH::AddGroup(myMesh, aType, myName->text());
|
||||
|
||||
if ( mySelectAll->isChecked() ) {
|
||||
// select all
|
||||
myGroup->AddFrom(myMesh.in());
|
||||
// select all
|
||||
myGroup->AddFrom(myMesh.in());
|
||||
}
|
||||
else {
|
||||
// select manually
|
||||
SMESH::long_array_var anIdList = new SMESH::long_array;
|
||||
int i, k = myElements->count();
|
||||
anIdList->length(k);
|
||||
for (i = 0; i < k; i++) {
|
||||
anIdList[i] = myElements->item(i)->text().toInt();
|
||||
}
|
||||
|
||||
myGroup->Add(anIdList.inout());
|
||||
// select manually
|
||||
SMESH::long_array_var anIdList = new SMESH::long_array;
|
||||
int i, k = myElements->count();
|
||||
anIdList->length(k);
|
||||
for (i = 0; i < k; i++) {
|
||||
anIdList[i] = myElements->item(i)->text().toInt();
|
||||
}
|
||||
|
||||
myGroup->Add(anIdList.inout());
|
||||
}
|
||||
|
||||
SALOMEDS::Color aColor = getGroupColor();
|
||||
@ -851,43 +851,43 @@ bool SMESHGUI_GroupDlg::onApply()
|
||||
}
|
||||
|
||||
if ( mySelectAll->isChecked() ) {
|
||||
// select all
|
||||
myGroup->Clear();
|
||||
myGroup->AddFrom(myMesh.in());
|
||||
// select all
|
||||
myGroup->Clear();
|
||||
myGroup->AddFrom(myMesh.in());
|
||||
}
|
||||
else {
|
||||
QList<int> aAddList;
|
||||
|
||||
int i, total = myElements->count();
|
||||
for (i = 0; i < total; i++) {
|
||||
int anId = myElements->item(i)->text().toInt();
|
||||
int idx = myIdList.indexOf(anId);
|
||||
if ( idx == -1 )
|
||||
aAddList.append(anId);
|
||||
else
|
||||
myIdList.removeAt(idx);
|
||||
}
|
||||
if (!aAddList.empty()) {
|
||||
SMESH::long_array_var anIdList = new SMESH::long_array;
|
||||
int added = aAddList.count();
|
||||
anIdList->length(added);
|
||||
for (i = 0; i < added; i++)
|
||||
anIdList[i] = aAddList[i];
|
||||
myGroup->Add(anIdList.inout());
|
||||
}
|
||||
if (!myIdList.empty()) {
|
||||
SMESH::long_array_var anIdList = new SMESH::long_array;
|
||||
int removed = myIdList.count();
|
||||
anIdList->length(removed);
|
||||
for (i = 0; i < removed; i++)
|
||||
anIdList[i] = myIdList[i];
|
||||
myGroup->Remove(anIdList.inout());
|
||||
}
|
||||
/* init for next operation */
|
||||
myIdList.clear();
|
||||
for (i = 0; i < total; i++) {
|
||||
myIdList.append(myElements->item(i)->text().toInt());
|
||||
}
|
||||
QList<int> aAddList;
|
||||
|
||||
int i, total = myElements->count();
|
||||
for (i = 0; i < total; i++) {
|
||||
int anId = myElements->item(i)->text().toInt();
|
||||
int idx = myIdList.indexOf(anId);
|
||||
if ( idx == -1 )
|
||||
aAddList.append(anId);
|
||||
else
|
||||
myIdList.removeAt(idx);
|
||||
}
|
||||
if (!aAddList.empty()) {
|
||||
SMESH::long_array_var anIdList = new SMESH::long_array;
|
||||
int added = aAddList.count();
|
||||
anIdList->length(added);
|
||||
for (i = 0; i < added; i++)
|
||||
anIdList[i] = aAddList[i];
|
||||
myGroup->Add(anIdList.inout());
|
||||
}
|
||||
if (!myIdList.empty()) {
|
||||
SMESH::long_array_var anIdList = new SMESH::long_array;
|
||||
int removed = myIdList.count();
|
||||
anIdList->length(removed);
|
||||
for (i = 0; i < removed; i++)
|
||||
anIdList[i] = myIdList[i];
|
||||
myGroup->Remove(anIdList.inout());
|
||||
}
|
||||
/* init for next operation */
|
||||
myIdList.clear();
|
||||
for (i = 0; i < total; i++) {
|
||||
myIdList.append(myElements->item(i)->text().toInt());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -452,15 +452,15 @@ bool SMESHGUI_NodesDlg::ClickOnApply()
|
||||
for ( int i = 1; i < ComboBox_GroupName->count(); i++ ) {
|
||||
QString aName = ComboBox_GroupName->itemText( i );
|
||||
if ( aGroupName == aName && ( i == ComboBox_GroupName->currentIndex() || idx == 0 ) )
|
||||
idx = i;
|
||||
idx = i;
|
||||
}
|
||||
if ( idx > 0 ) {
|
||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( myGroups[idx-1] );
|
||||
if ( !aGeomGroup->_is_nil() ) {
|
||||
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
||||
tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
|
||||
tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
|
||||
if ( res == 1 ) return false;
|
||||
int res = SUIT_MessageBox::question( this, tr( "SMESH_WRN_WARNING" ),
|
||||
tr( "MESH_STANDALONE_GRP_CHOSEN" ).arg( aGroupName ),
|
||||
tr( "SMESH_BUT_YES" ), tr( "SMESH_BUT_NO" ), 0, 1 );
|
||||
if ( res == 1 ) return false;
|
||||
}
|
||||
aGroup = myGroups[idx-1];
|
||||
}
|
||||
@ -478,21 +478,21 @@ bool SMESHGUI_NodesDlg::ClickOnApply()
|
||||
// create new group
|
||||
aGroupUsed = SMESH::AddGroup( myMesh, SMESH::NODE, aGroupName );
|
||||
if ( !aGroupUsed->_is_nil() ) {
|
||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
|
||||
ComboBox_GroupName->addItem( aGroupName );
|
||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroupUsed));
|
||||
ComboBox_GroupName->addItem( aGroupName );
|
||||
}
|
||||
}
|
||||
else {
|
||||
SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup );
|
||||
if ( !aGeomGroup->_is_nil() ) {
|
||||
aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
|
||||
if ( !aGroupUsed->_is_nil() && idx > 0 ) {
|
||||
myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
|
||||
SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
|
||||
}
|
||||
aGroupUsed = myMesh->ConvertToStandalone( aGeomGroup );
|
||||
if ( !aGroupUsed->_is_nil() && idx > 0 ) {
|
||||
myGroups[idx-1] = SMESH::SMESH_GroupBase::_duplicate(aGroupUsed);
|
||||
SMESHGUI::GetSMESHGUI()->getApp()->updateObjectBrowser();
|
||||
}
|
||||
}
|
||||
else
|
||||
aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
|
||||
aGroupUsed = SMESH::SMESH_Group::_narrow( aGroup );
|
||||
}
|
||||
|
||||
if ( !aGroupUsed->_is_nil() ) {
|
||||
@ -625,10 +625,10 @@ void SMESHGUI_NodesDlg::SelectionIntoArgument()
|
||||
for( int i = 0, n = aListOfGroups.length(); i < n; i++ ) {
|
||||
SMESH::SMESH_GroupBase_var aGroup = aListOfGroups[i];
|
||||
if ( !aGroup->_is_nil() && aGroup->GetType() == SMESH::NODE ) {
|
||||
QString aGroupName( aGroup->GetName() );
|
||||
if ( !aGroupName.isEmpty() ) {
|
||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
|
||||
ComboBox_GroupName->addItem( aGroupName );
|
||||
QString aGroupName( aGroup->GetName() );
|
||||
if ( !aGroupName.isEmpty() ) {
|
||||
myGroups.append(SMESH::SMESH_GroupBase::_duplicate(aGroup));
|
||||
ComboBox_GroupName->addItem( aGroupName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -371,24 +371,24 @@ void SMESHGUI_RemoveElementsDlg::SelectionIntoArgument()
|
||||
|
||||
myActor = SMESH::FindActorByEntry(anIO->getEntry());
|
||||
if (myActor) {
|
||||
|
||||
// get selected nodes
|
||||
QString aString = "";
|
||||
int nbElems = SMESH::GetNameOfSelectedElements(mySelector,anIO,aString);
|
||||
if (nbElems > 0) {
|
||||
myBusy = true;
|
||||
myEditCurrentArgument->setText(aString);
|
||||
myBusy = false;
|
||||
|
||||
// OK
|
||||
|
||||
myNbOkElements = nbElems;
|
||||
} // if (nbElems > 0)
|
||||
|
||||
// get selected nodes
|
||||
QString aString = "";
|
||||
int nbElems = SMESH::GetNameOfSelectedElements(mySelector,anIO,aString);
|
||||
if (nbElems > 0) {
|
||||
myBusy = true;
|
||||
myEditCurrentArgument->setText(aString);
|
||||
myBusy = false;
|
||||
|
||||
// OK
|
||||
|
||||
myNbOkElements = nbElems;
|
||||
} // if (nbElems > 0)
|
||||
} // if (myActor)
|
||||
} // if (!myMesh->_is_nil())
|
||||
} // if (nbSel == 1) {
|
||||
|
||||
updateButtons();
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
|
@ -377,23 +377,23 @@ void SMESHGUI_RemoveNodesDlg::SelectionIntoArgument()
|
||||
myActor = SMESH::FindActorByEntry(anIO->getEntry());
|
||||
if (myActor) {
|
||||
|
||||
// get selected nodes
|
||||
QString aString = "";
|
||||
int nbNodes = SMESH::GetNameOfSelectedNodes(mySelector,anIO,aString);
|
||||
if (nbNodes > 0) {
|
||||
myBusy = true;
|
||||
myEditCurrentArgument->setText(aString);
|
||||
myBusy = false;
|
||||
|
||||
// OK
|
||||
|
||||
myNbOkNodes = nbNodes;
|
||||
} // if (nbNodes > 0)
|
||||
// get selected nodes
|
||||
QString aString = "";
|
||||
int nbNodes = SMESH::GetNameOfSelectedNodes(mySelector,anIO,aString);
|
||||
if (nbNodes > 0) {
|
||||
myBusy = true;
|
||||
myEditCurrentArgument->setText(aString);
|
||||
myBusy = false;
|
||||
|
||||
// OK
|
||||
|
||||
myNbOkNodes = nbNodes;
|
||||
} // if (nbNodes > 0)
|
||||
} // if (myActor)
|
||||
} // if (!myMesh->_is_nil())
|
||||
} // if (nbSel == 1)
|
||||
|
||||
updateButtons();
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
|
@ -354,7 +354,7 @@ CORBA::Long SMESH_Group_i::AddFrom( SMESH::SMESH_IDSource_ptr theSource )
|
||||
if (aGroupDS) {
|
||||
SMESH::long_array_var anIds;
|
||||
if ( !CORBA::is_nil(SMESH::SMESH_GroupBase::_narrow(theSource)) &&
|
||||
SMESH::SMESH_GroupBase::_narrow(theSource)->GetType() == GetType() ) {
|
||||
SMESH::SMESH_GroupBase::_narrow(theSource)->GetType() == GetType() ) {
|
||||
anIds = theSource->GetIDs();
|
||||
}
|
||||
else if ( !CORBA::is_nil(SMESH::SMESH_Mesh::_narrow(theSource)) ) {
|
||||
|
@ -561,7 +561,7 @@ public:
|
||||
* \sa DoubleNodeGroup()
|
||||
*/
|
||||
SMESH::SMESH_Group_ptr DoubleNodeGroupNew( SMESH::SMESH_GroupBase_ptr theNodes,
|
||||
SMESH::SMESH_GroupBase_ptr theModifiedElems );
|
||||
SMESH::SMESH_GroupBase_ptr theModifiedElems );
|
||||
|
||||
CORBA::Boolean DoubleNodeGroups( const SMESH::ListOfGroups& theNodes,
|
||||
const SMESH::ListOfGroups& theModifiedElems);
|
||||
@ -619,8 +619,8 @@ public:
|
||||
* \sa DoubleNodeElemGroup()
|
||||
*/
|
||||
SMESH::SMESH_Group_ptr DoubleNodeElemGroupNew( SMESH::SMESH_GroupBase_ptr theElems,
|
||||
SMESH::SMESH_GroupBase_ptr theNodesNot,
|
||||
SMESH::SMESH_GroupBase_ptr theAffectedElems );
|
||||
SMESH::SMESH_GroupBase_ptr theNodesNot,
|
||||
SMESH::SMESH_GroupBase_ptr theAffectedElems );
|
||||
|
||||
/*!
|
||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
|
Loading…
Reference in New Issue
Block a user