X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_InputPanel.cxx;h=f89653dbe2039ba7eadd9bce4077d48502704648;hb=a53349567d67f4df0ef737798a25c24d9dc8f08e;hp=6338a14306e078fa5919ecad6b82bec6011875f0;hpb=2cf9e838e652ae811d9b3931914771ad1836c6b8;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_InputPanel.cxx b/src/HYDROGUI/HYDROGUI_InputPanel.cxx index 6338a143..f89653db 100644 --- a/src/HYDROGUI/HYDROGUI_InputPanel.cxx +++ b/src/HYDROGUI/HYDROGUI_InputPanel.cxx @@ -53,17 +53,20 @@ HYDROGUI_InputPanel::HYDROGUI_InputPanel( HYDROGUI_Module* theModule, const QStr aBtnsLayout->setMargin( 5 ); aBtnsLayout->setSpacing( 5 ); - myCancel = new QPushButton( tr( "CANCEL" ), myBtnFrame ); + myCancel = new QPushButton( tr( "CLOSE" ), myBtnFrame ); myHelp = new QPushButton( tr( "HELP" ), myBtnFrame ); if ( doInitLayout ) { + myApplyAndClose = new QPushButton( tr( "APPLY_AND_CLOSE" ), myBtnFrame ); myApply = new QPushButton( tr( "APPLY" ), myBtnFrame ); + aBtnsLayout->addWidget( myApplyAndClose, 0 ); aBtnsLayout->addWidget( myApply, 0 ); aBtnsLayout->addWidget( myCancel, 0 ); aBtnsLayout->addStretch( 1 ); aBtnsLayout->addWidget( myHelp, 0 ); + connect( myApplyAndClose, SIGNAL( clicked() ), this, SLOT( onApplyAndClose() ) ); connect( myApply, SIGNAL( clicked() ), this, SLOT( onApply() ) ); } connect( myCancel, SIGNAL( clicked() ), this, SLOT( onCancel() ) ); @@ -81,12 +84,18 @@ HYDROGUI_Module* HYDROGUI_InputPanel::module() const bool HYDROGUI_InputPanel::isApplyEnabled() const { - return myApply->isEnabled(); + return myApply->isEnabled(); } void HYDROGUI_InputPanel::setApplyEnabled( bool on ) { - myApply->setEnabled( on ); + myApplyAndClose->setEnabled( on ); + myApply->setEnabled( on ); +} + +void HYDROGUI_InputPanel::onApplyAndClose() +{ + emit panelApplyAndClose(); } void HYDROGUI_InputPanel::onApply()