From 997430a4beb5133cc080df809c3853f0b53745af Mon Sep 17 00:00:00 2001 From: stv Date: Tue, 22 May 2007 10:56:34 +0000 Subject: [PATCH] no message --- src/STD/STD_CloseDlg.cxx | 98 ---------------------------------------- src/STD/STD_CloseDlg.h | 64 -------------------------- 2 files changed, 162 deletions(-) delete mode 100644 src/STD/STD_CloseDlg.cxx delete mode 100644 src/STD/STD_CloseDlg.h diff --git a/src/STD/STD_CloseDlg.cxx b/src/STD/STD_CloseDlg.cxx deleted file mode 100644 index c2f470668..000000000 --- a/src/STD/STD_CloseDlg.cxx +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA 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. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#include "STD_CloseDlg.h" - -#include -#include -#include -#include -#include -#include - -/*! - * \brief creates a Close dialog box - * \param parent a parent widget - * \param modal bool argument, if true the dialog box is a modal dialog box - * \param f style flags - */ - -STD_CloseDlg::STD_CloseDlg( QWidget* parent, bool modal ) -: QDialog( parent ) -{ - setModal( modal ); - setSizeGripEnabled( true ); - setWindowTitle( tr( "CLOSE_DLG_CAPTION" ) ); - - 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::Warning ); - m_lIcon->setPixmap( pm ); - m_lIcon->setScaledContents( false ); - m_lIcon->setAlignment( Qt::AlignCenter ); - - QLabel* m_lDescr = new QLabel( this ); - m_lDescr->setText ( tr ("CLOSE_DLG_DESCRIPTION") ); - m_lDescr->setAlignment( Qt::AlignCenter ); - m_lDescr->setMinimumHeight( m_lDescr->sizeHint().height()*5 ); - m_lDescr->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); - - QHBoxLayout* m_hl1 = new QHBoxLayout(); - m_hl1->setMargin( 0 ); m_hl1->setSpacing( 6 ); - m_hl1->addWidget( m_lIcon ); - m_hl1->addWidget( m_lDescr ); - - m_pb1 = new QPushButton( tr ("CLOSE_DLG_SAVE_CLOSE"), this ); - m_pb2 = new QPushButton( tr ("CLOSE_DLG_CLOSE"), this ); - m_pb3 = new QPushButton( tr ("CLOSE_DLG_UNLOAD"), this ); - m_pb4 = new QPushButton( tr ("BUT_CANCEL"), this ); - - QGridLayout* m_hl2 = new QGridLayout(); - m_hl2->setMargin( 0 ); m_hl2->setSpacing( 6 ); - m_hl2->addWidget( m_pb1, 0, 0 ); - m_hl2->addWidget( m_pb2, 0, 1 ); - m_hl2->addWidget( m_pb3, 0, 2 ); - m_hl2->setColumnMinimumWidth( 3, 10 ); - m_hl2->setColumnStretch( 3, 5 ); - m_hl2->addWidget( m_pb4, 0, 4 ); - - m_vbL->addLayout( m_hl1 ); - m_vbL->addLayout( m_hl2 ); - - connect( m_pb1, SIGNAL( clicked() ), this, SLOT( onButtonClicked() ) ); - connect( m_pb2, SIGNAL( clicked() ), this, SLOT( onButtonClicked() ) ); - connect( m_pb3, SIGNAL( clicked() ), this, SLOT( onButtonClicked() ) ); - connect( m_pb4, SIGNAL( clicked() ), this, SLOT( reject() ) ); -} - -/*! - * \brief reaction on clicked(pressed) button - */ -void STD_CloseDlg::onButtonClicked() -{ - QPushButton* btn = ( QPushButton* )sender(); - if ( btn == m_pb1 ) - done( 1 ); - if ( btn == m_pb2 ) - done( 2 ); - if ( btn == m_pb3 ) - done( 3 ); -} diff --git a/src/STD/STD_CloseDlg.h b/src/STD/STD_CloseDlg.h deleted file mode 100644 index ba66026ea..000000000 --- a/src/STD/STD_CloseDlg.h +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA 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. -// -// This library is distributed in the hope that it will be useful -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef STD_CLOSEDLG_H -#define STD_CLOSEDLG_H - -#include - -class QPushButton; - -/*! \class QDialog - * \brief For more information see QT documentation. - */ -/*!\class STD_CloseDlg - * \brief Describes a dialog box shown on closing the active study - */ -class STD_CloseDlg: public QDialog -{ - Q_OBJECT - -public: - STD_CloseDlg( QWidget* = 0, bool = false ); - virtual ~STD_CloseDlg() {}; - -private slots: - void onButtonClicked(); - -private: - /*!\var m_pb1 - * \brief Private, stores a dialog button 1 - */ - QPushButton* m_pb1; - /*!\var m_pb2 - * \brief Private, stores a dialog button 2 - */ - QPushButton* m_pb2; - /*!\var m_pb3 - * \brief Private, stores a dialog button 3 - */ - QPushButton* m_pb3; - - /*!\var m_pb4 - * \brief Private, stores a dialog button 4 - */ - QPushButton* m_pb4; -}; - -#endif - -- 2.39.2