{
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);
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
// 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();