X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_ZLevelsDlg.cxx;h=2fc1bf240f612ed8edc5d9669d38c3b2441c4e69;hb=a53349567d67f4df0ef737798a25c24d9dc8f08e;hp=4a50f528704754ec6734dc66984500593146aeb5;hpb=817365e15e087b3f6bf4db4e278599890d9378de;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_ZLevelsDlg.cxx b/src/HYDROGUI/HYDROGUI_ZLevelsDlg.cxx index 4a50f528..2fc1bf24 100644 --- a/src/HYDROGUI/HYDROGUI_ZLevelsDlg.cxx +++ b/src/HYDROGUI/HYDROGUI_ZLevelsDlg.cxx @@ -1,12 +1,8 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// +// Copyright (C) 2014-2015 EDF-R&D // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -41,6 +37,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" ) ); @@ -54,16 +57,17 @@ HYDROGUI_ZLevelsDlg::HYDROGUI_ZLevelsDlg( QWidget* theParent, HYDROGUI_Module* t // "All objects" check box myAllObjects = new QCheckBox( tr( "ALL_OBJECTS" ) ); - myAllObjects->setToolTip( tr( "ALL_OBJECTS_TLT" ) ); // Apply and close buttons + myApplyAndClose = new QPushButton( tr("APPLY_AND_CLOSE") ); + myApplyAndClose->setDefault( true ); myApply = new QPushButton( tr("APPLY") ); - myApply->setDefault( true ); myClose = new QPushButton( tr("CLOSE") ); // Layout // apply and close buttons QHBoxLayout* aDlgButtonsLayout = new QHBoxLayout(); + aDlgButtonsLayout->addWidget( myApplyAndClose ); aDlgButtonsLayout->addWidget( myApply ); aDlgButtonsLayout->addWidget( myClose ); aDlgButtonsLayout->addStretch(); @@ -75,6 +79,7 @@ HYDROGUI_ZLevelsDlg::HYDROGUI_ZLevelsDlg( QWidget* theParent, HYDROGUI_Module* t // Connections connect( myAllObjects, SIGNAL( stateChanged( int ) ), this, SLOT( onStateChanged() ) ); + connect( myApplyAndClose, SIGNAL( clicked() ), this, SIGNAL( applyOrderAndClose() ) ); connect( myApply, SIGNAL( clicked() ), this, SIGNAL( applyOrder() ) ); connect( myClose, SIGNAL( clicked() ), this, SLOT( reject() ) ); @@ -120,5 +125,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 ); }