Back to index

salome-gui  6.5.0
Public Member Functions | Private Attributes
SalomeApp_ExitDlg Class Reference

Describes a dialog box shown on question about quit application. More...

#include <SalomeApp_ExitDlg.h>

Inheritance diagram for SalomeApp_ExitDlg:
Inheritance graph
[legend]
Collaboration diagram for SalomeApp_ExitDlg:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SalomeApp_ExitDlg (QWidget *)
 creates a Exit dialog box
 ~SalomeApp_ExitDlg ()
 Destructor.
bool isServersShutdown ()
 get the check box status

Private Attributes

QCheckBox * myServersShutdown

Detailed Description

Describes a dialog box shown on question about quit application.

Definition at line 33 of file SalomeApp_ExitDlg.h.


Constructor & Destructor Documentation

SalomeApp_ExitDlg::SalomeApp_ExitDlg ( QWidget *  parent)

creates a Exit dialog box

Parameters:
parenta parent widget
modalbool argument, if true the dialog box is a modal dialog box
fstyle flags

Definition at line 39 of file SalomeApp_ExitDlg.cxx.

  : QDialog( parent )
{
  setModal( true );
  setWindowTitle( tr( "INF_DESK_EXIT" ) );

  QVBoxLayout* m_vbL = new QVBoxLayout( this );
  m_vbL->setMargin( 11 );
  m_vbL->setSpacing( 6 );

  QLabel* m_lIcon = new QLabel( this );
  QPixmap pm = QMessageBox::standardIcon( QMessageBox::Question );
  m_lIcon->setPixmap( pm );
  m_lIcon->setScaledContents( false );
  m_lIcon->setAlignment( Qt::AlignCenter );

  QLabel* m_lDescr = new QLabel( this );
  m_lDescr->setText( tr( "QUE_DESK_EXIT" ) );
  m_lDescr->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );

  myServersShutdown = new QCheckBox( tr( "SHUTDOWN_SERVERS" ), this );
  myServersShutdown->setChecked( true );
  
  QVBoxLayout* m_vl1 = new QVBoxLayout();
  m_vl1->setMargin( 10 ); m_vl1->setSpacing( 16 );
  m_vl1->addWidget( m_lDescr );
  m_vl1->addWidget( myServersShutdown );

  QHBoxLayout* m_hl1 = new QHBoxLayout();
  m_hl1->setMargin( 0 ); m_hl1->setSpacing( 6 );
  m_hl1->addWidget( m_lIcon );
  m_hl1->addStretch(); 
  m_hl1->addLayout( m_vl1 );
  m_hl1->addStretch();

  QPushButton* m_pbOk     = new QPushButton( tr( "BUT_OK" ),     this );
  QPushButton* m_pbCancel = new QPushButton( tr( "BUT_CANCEL" ), this );

  QGridLayout* m_hl2 = new QGridLayout();
  m_hl2->setMargin( 0 ); m_hl2->setSpacing( 6 );
  m_hl2->addWidget( m_pbOk, 0, 0 );
  m_hl2->setColumnStretch( 1, 5 );
  m_hl2->addWidget( m_pbCancel, 0, 2 );
  
  m_vbL->addStretch();
  m_vbL->addLayout( m_hl1 );
  m_vbL->addStretch();
  m_vbL->addLayout( m_hl2 );

  connect( m_pbOk,     SIGNAL( clicked() ), this, SLOT( accept() ) );
  connect( m_pbCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
}

Destructor.

Definition at line 95 of file SalomeApp_ExitDlg.cxx.

{
}

Member Function Documentation

get the check box status

Definition at line 102 of file SalomeApp_ExitDlg.cxx.

{
  return myServersShutdown->isChecked();
}

Member Data Documentation

Definition at line 44 of file SalomeApp_ExitDlg.h.


The documentation for this class was generated from the following files: