IPAL 18203

This commit is contained in:
dmv 2007-12-06 14:19:14 +00:00
parent 446fdd4222
commit 3efdeeeb01
2 changed files with 24 additions and 6 deletions

View File

@ -46,7 +46,10 @@ GEOMBase_aWarningDlg::GEOMBase_aWarningDlg( QWidget* parent, const char* name, c
{
if(!name)
setName( "Warning" );
resize(296, 150);
if ( theNum < 15 )
resize(296, (120 + (14*theNum)) );
else
resize(296, 300);
setCaption(name); /* appears on the title bar */
setSizeGripEnabled(TRUE);
@ -65,13 +68,17 @@ GEOMBase_aWarningDlg::GEOMBase_aWarningDlg( QWidget* parent, const char* name, c
mainGrpLayout->setMargin(11);
topLayout->addWidget(mainGrp, 0, 0);
QLabel* TextLabel = new QLabel(mainGrp, "TextLabel");
TextLabel->setText( QObject::tr( "GEOM_REALLY_DELETE" ).arg( theNum ) );
mainGrpLayout->addWidget(TextLabel, 0, 0);
QScrollView* viewer = new QScrollView (mainGrp, "viewer");
viewer->setResizePolicy( QScrollView::AutoOneFit );
QLabel* TextLabel1 = new QLabel(viewer, "TextLabel1");
TextLabel1->setText( QObject::tr( "GEOM_REALLY_DELETE" ).arg( theNum ).arg( theText ) );
TextLabel1->setText( theText );
TextLabel1->setAlignment(Qt::AlignTop);
viewer->addChild(TextLabel1);
mainGrpLayout->addWidget(viewer, 0, 0);
mainGrpLayout->addWidget(viewer, 1, 0);
//Create Buttons

View File

@ -317,15 +317,26 @@ void GEOMToolsGUI::OnEditDelete()
// VSR 17/11/04: check if all objects selected belong to GEOM component <-- finish
QString aNameList;
int nbSel = 0;
Handle(SALOME_InteractiveObject) anIObject;
for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() )
{
Handle(SALOME_InteractiveObject) io = It.Value();
QString aName = io->getName();
QString aName = It.Value()->getName();
if ( aName != "" && aName.ref(0) != '*') {
aNameList.append("\n - " + aName);
aNameList.append(" - " + aName + "\n");
nbSel++;
}
anIObject = It.Value();
}
// Append Child Names of Last Selected Object
_PTR(SObject) obj ( aStudy->FindObjectID( anIObject->getEntry() ) );
for (_PTR(ChildIterator) iit (aStudy->NewChildIterator(obj)); iit->More(); iit->Next()) {
_PTR(SObject) child (iit->Value());
QString aName = child->GetName();
if (aName != "" && aName.ref(0) != '*') {
aNameList.append(" - " + aName + "\n");
nbSel++;
}
}
GEOMBase_aWarningDlg* Dialog = new GEOMBase_aWarningDlg( app->desktop(), QObject::tr( "GEOM_WRN_WARNING" ), aNameList, nbSel);
int r = Dialog->exec();