Salome HOME
Join modifications from branch BR_DEBUG_3_2_0b1
[modules/gui.git] / src / SalomeApp / SalomeApp_CheckFileDlg.cxx
1 // Copyright (C) 2005  OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
2 // 
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either 
6 // version 2.1 of the License.
7 // 
8 // This library is distributed in the hope that it will be useful 
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public  
14 // License along with this library; if not, write to the Free Software 
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 #include "SalomeApp_CheckFileDlg.h"
20
21 #include <qcheckbox.h>
22 #include <qlabel.h>
23 #include <qpushbutton.h>
24
25 /*!
26 Constructor
27 */
28 SalomeApp_CheckFileDlg::SalomeApp_CheckFileDlg( QWidget* parent, bool open, const QString& theCheckBoxName, bool showQuickDir, bool modal) :
29 SUIT_FileDlg( parent, open, showQuickDir, modal )
30 {    
31   myCheckBox = new QCheckBox( theCheckBoxName, this );
32   QLabel* label = new QLabel("", this);
33   QPushButton* pb = new QPushButton(this);               
34   addWidgets( label, myCheckBox, pb );
35   pb->hide();
36 }
37
38 /*!
39 Destructor
40 */
41 SalomeApp_CheckFileDlg::~SalomeApp_CheckFileDlg() 
42 {
43
44 }
45
46 /*!Sets checked.*/
47 void SalomeApp_CheckFileDlg::SetChecked( bool check )
48 {
49   myCheckBox->setChecked(check);
50 }
51
52 /*!Is checked?
53  *\retval boolean - true, check box is checked, else false.
54  */
55 bool SalomeApp_CheckFileDlg::IsChecked() const
56 {
57   return myCheckBox->isChecked();
58 }