- QGroupBox* aGrp = new QGroupBox( 1, Qt::Vertical, theParent );
-
- myButtons[ BTN_OK ] = new QPushButton( tr( "SMESH_BUT_OK" ), aGrp );
- myButtons[ BTN_Apply ] = new QPushButton( tr( "SMESH_BUT_APPLY" ), aGrp );
-
- QLabel* aLbl = new QLabel( aGrp );
- aLbl->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-
- myButtons[ BTN_Cancel ] = new QPushButton( tr( "SMESH_BUT_CANCEL" ), aGrp );
- myButtons[ BTN_Close ] = new QPushButton( tr( "SMESH_BUT_CLOSE" ), aGrp );
-
- connect( myButtons[ BTN_OK ], SIGNAL( clicked() ), SLOT( onOk() ) );
- connect( myButtons[ BTN_Cancel ], SIGNAL( clicked() ), SLOT( onClose() ) ) ;
- connect( myButtons[ BTN_Close ], SIGNAL( clicked() ), SLOT( onClose() ) ) ;
- connect( myButtons[ BTN_Apply ], SIGNAL( clicked() ), SLOT( onApply() ) );
+ QGroupBox* aGrp = new QGroupBox(theParent);
+ QHBoxLayout* aLay = new QHBoxLayout(aGrp);
+ aLay->setMargin(MARGIN);
+ aLay->setSpacing(SPACING);
+
+ myButtons[ BTN_OK ] = new QPushButton(tr("SMESH_BUT_APPLY_AND_CLOSE"), aGrp);
+ myButtons[ BTN_Apply ] = new QPushButton(tr("SMESH_BUT_APPLY"), aGrp);
+
+ myButtons[ BTN_Close ] = new QPushButton(tr("SMESH_BUT_CLOSE"), aGrp);
+ myButtons[ BTN_Help ] = new QPushButton(tr("SMESH_BUT_HELP"), aGrp);
+
+ aLay->addWidget(myButtons[ BTN_OK ]);
+ aLay->addSpacing(10);
+ aLay->addWidget(myButtons[ BTN_Apply ]);
+ aLay->addSpacing(10);
+ aLay->addStretch();
+ aLay->addWidget(myButtons[ BTN_Close ]);
+ aLay->addWidget(myButtons[ BTN_Help ]);
+
+ connect(myButtons[ BTN_OK ], SIGNAL(clicked()), SLOT(onOk()));
+ connect(myButtons[ BTN_Close ], SIGNAL(clicked()), SLOT(reject()));
+ connect(myButtons[ BTN_Apply ], SIGNAL(clicked()), SLOT(onApply()));
+ connect(myButtons[ BTN_Help ], SIGNAL(clicked()), SLOT(onHelp()));