Orfeo Toolbox  4.0
otbQtStringSelectionWidget.cxx
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ORFEO Toolbox
4  Language: C++
5  Date: $Date$
6  Version: $Revision$
7 
8 
9  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
10  See OTBCopyright.txt for details.
11 
12 
13  This software is distributed WITHOUT ANY WARRANTY; without even
14  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  PURPOSE. See the above copyright notices for more information.
16 
17 =========================================================================*/
19 
20 namespace otb
21 {
22 namespace Wrapper
23 {
24 
26  : QWidget()
27 {
28  this->DoCreateWidget();
29 }
30 
32 {
33 }
34 
36 {
37 }
38 
40 {
41  unsigned int sp = 2;
42  // Set up input text edit
43  m_HLayout = new QHBoxLayout;
44  m_HLayout->setSpacing(sp);
45  m_HLayout->setContentsMargins(sp, sp, sp, sp);
46 
47  m_Checkbox = new QCheckBox();
48  m_Checkbox->setChecked(true);
49  m_HLayout->addWidget(m_Checkbox);
50 
51  m_Input = new QLineEdit;
52  m_Input->setEnabled( m_Checkbox->isChecked() );
53 
54  m_HLayout->addWidget(m_Input);
55 
56  QObject::connect(
57  m_Checkbox, SIGNAL( toggled( bool ) ),
58  m_Input, SLOT( setEnabled( bool ) )
59  );
60 
61  QObject::connect(
62  m_Input,
63  SIGNAL( editingFinished( ) ),
64  this,
65  SLOT( OnEditionFinished() )
66  );
67 
68  this->setLayout(m_HLayout);
69 }
70 
72 {
73  // used to propagate m_Input (QLineEdit type) editingFinished signal
75 }
76 
77 }
78 
79 }

Generated at Sat Mar 8 2014 16:14:19 for Orfeo Toolbox with doxygen 1.8.3.1