X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_ZLevelsDlg.cxx;h=5511c6695edf50e91b0faf8a5ce38ab15a8410c5;hb=81c9f5cdf82909d0aebd2c491c50fa7516cc80b7;hp=aac2cc2e14b3374a6ca7dab1f32467d349e041f7;hpb=2904bb5e64e69d27c643e66e3dd727c5110ec275;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_ZLevelsDlg.cxx b/src/HYDROGUI/HYDROGUI_ZLevelsDlg.cxx index aac2cc2e..5511c669 100644 --- a/src/HYDROGUI/HYDROGUI_ZLevelsDlg.cxx +++ b/src/HYDROGUI/HYDROGUI_ZLevelsDlg.cxx @@ -41,6 +41,13 @@ HYDROGUI_ZLevelsDlg::HYDROGUI_ZLevelsDlg( QWidget* theParent, HYDROGUI_Module* theModule ) : QDialog( theParent ) { + // Change windows flags to remove minimize button + Qt::WindowFlags aFlags = windowFlags(); + aFlags |= Qt::CustomizeWindowHint; + aFlags &= ~Qt::WindowMinimizeButtonHint; + aFlags &= ~Qt::WindowMaximizeButtonHint; + setWindowFlags( aFlags ); + // Dialog title setWindowTitle( tr( "CHANGE_LAYER_ORDER" ) ); @@ -57,6 +64,7 @@ HYDROGUI_ZLevelsDlg::HYDROGUI_ZLevelsDlg( QWidget* theParent, HYDROGUI_Module* t // Apply and close buttons myApply = new QPushButton( tr("APPLY") ); + myApply->setDefault( true ); myClose = new QPushButton( tr("CLOSE") ); // Layout @@ -74,14 +82,16 @@ HYDROGUI_ZLevelsDlg::HYDROGUI_ZLevelsDlg( QWidget* theParent, HYDROGUI_Module* t connect( myAllObjects, SIGNAL( stateChanged( int ) ), this, SLOT( onStateChanged() ) ); connect( myApply, SIGNAL( clicked() ), this, SIGNAL( applyOrder() ) ); - connect( myClose, SIGNAL( clicked() ), this, SLOT( close() ) ); + connect( myClose, SIGNAL( clicked() ), this, SLOT( reject() ) ); // Initialize onStateChanged(); // Create selector if ( theModule ) { - new HYDROGUI_ListSelector( myListWidget, theModule->getApp()->selectionMgr() ); + HYDROGUI_ListSelector* aListSelector = + new HYDROGUI_ListSelector( myListWidget, theModule->getApp()->selectionMgr() ); + aListSelector->setAutoBlock( true ); } } @@ -116,5 +126,10 @@ QList HYDROGUI_ZLevelsDlg::getObjects() const void HYDROGUI_ZLevelsDlg::onStateChanged() { bool isAll = myAllObjects->isChecked(); + + QString aToolTip = isAll ? tr( "ALL_OBJECTS_CHECKED_TLT" ) : + tr( "ALL_OBJECTS_UNCHECKED_TLT" ); + myAllObjects->setToolTip( aToolTip ); + myListWidget->setHiddenObjectsShown( isAll ); }