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" ) );
// Apply and close buttons
myApply = new QPushButton( tr("APPLY") );
+ myApply->setDefault( true );
myClose = new QPushButton( tr("CLOSE") );
// Layout
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 );
}
}
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 );
}