mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-05-31 22:37:48 +05:00
IPAL 18203
This commit is contained in:
parent
446fdd4222
commit
3efdeeeb01
@ -46,7 +46,10 @@ GEOMBase_aWarningDlg::GEOMBase_aWarningDlg( QWidget* parent, const char* name, c
|
|||||||
{
|
{
|
||||||
if(!name)
|
if(!name)
|
||||||
setName( "Warning" );
|
setName( "Warning" );
|
||||||
resize(296, 150);
|
if ( theNum < 15 )
|
||||||
|
resize(296, (120 + (14*theNum)) );
|
||||||
|
else
|
||||||
|
resize(296, 300);
|
||||||
setCaption(name); /* appears on the title bar */
|
setCaption(name); /* appears on the title bar */
|
||||||
setSizeGripEnabled(TRUE);
|
setSizeGripEnabled(TRUE);
|
||||||
|
|
||||||
@ -65,13 +68,17 @@ GEOMBase_aWarningDlg::GEOMBase_aWarningDlg( QWidget* parent, const char* name, c
|
|||||||
mainGrpLayout->setMargin(11);
|
mainGrpLayout->setMargin(11);
|
||||||
topLayout->addWidget(mainGrp, 0, 0);
|
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");
|
QScrollView* viewer = new QScrollView (mainGrp, "viewer");
|
||||||
viewer->setResizePolicy( QScrollView::AutoOneFit );
|
viewer->setResizePolicy( QScrollView::AutoOneFit );
|
||||||
QLabel* TextLabel1 = new QLabel(viewer, "TextLabel1");
|
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);
|
viewer->addChild(TextLabel1);
|
||||||
mainGrpLayout->addWidget(viewer, 0, 0);
|
mainGrpLayout->addWidget(viewer, 1, 0);
|
||||||
|
|
||||||
//Create Buttons
|
//Create Buttons
|
||||||
|
|
||||||
|
@ -317,15 +317,26 @@ void GEOMToolsGUI::OnEditDelete()
|
|||||||
// VSR 17/11/04: check if all objects selected belong to GEOM component <-- finish
|
// VSR 17/11/04: check if all objects selected belong to GEOM component <-- finish
|
||||||
QString aNameList;
|
QString aNameList;
|
||||||
int nbSel = 0;
|
int nbSel = 0;
|
||||||
|
Handle(SALOME_InteractiveObject) anIObject;
|
||||||
for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() )
|
for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() )
|
||||||
{
|
{
|
||||||
Handle(SALOME_InteractiveObject) io = It.Value();
|
QString aName = It.Value()->getName();
|
||||||
QString aName = io->getName();
|
|
||||||
if ( aName != "" && aName.ref(0) != '*') {
|
if ( aName != "" && aName.ref(0) != '*') {
|
||||||
aNameList.append("\n - " + aName);
|
aNameList.append(" - " + aName + "\n");
|
||||||
nbSel++;
|
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);
|
GEOMBase_aWarningDlg* Dialog = new GEOMBase_aWarningDlg( app->desktop(), QObject::tr( "GEOM_WRN_WARNING" ), aNameList, nbSel);
|
||||||
int r = Dialog->exec();
|
int r = Dialog->exec();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user