OpendTect  6.3
i_qcombobox.h
Go to the documentation of this file.
1 #ifndef i_qcombobox_h
2 #define i_qcombobox_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: A.H. Lammertink
9  Date: 25/05/2000
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "uicombobox.h"
15 
16 #include <QComboBox>
17 
19 
23 QT_BEGIN_NAMESPACE
24 
25 class i_comboMessenger : public QObject
26 {
27  Q_OBJECT
28  friend class uiComboBoxBody;
29 
30 protected:
31  i_comboMessenger( QComboBox* sndr,
32  uiComboBox* receiver )
33  : _sender( sndr )
34  , _receiver( receiver )
35  {
36  connect( sndr, SIGNAL( activated (int)),
37  this, SLOT( activated (int)) );
38 
39  connect( sndr,
40  SIGNAL( editTextChanged(const QString&)),
41  this,
42  SLOT( editTextChanged(const QString&)) );
43  }
44 
45  virtual ~i_comboMessenger() {}
46 
47 private:
48 
50  QComboBox* _sender;
51 
52 private slots:
53 
59 void activated( int )
60 { _receiver->notifyHandler( true ); }
61 
62 
63 void editTextChanged( const QString& )
64 { _receiver->notifyHandler( false ); }
65 
66 
67 };
68 
69 QT_END_NAMESPACE
70 
71 #endif
Helper class for uiComboBox to relay Qt&#39;s &#39;activated&#39; messages to uiAction.
Definition: i_qcombobox.h:25
void activated(int)
Definition: i_qcombobox.h:59
void editTextChanged(const QString &)
Definition: i_qcombobox.h:63
Combo box.
Definition: uicombobox.h:30
QComboBox * _sender
Definition: i_qcombobox.h:50
virtual ~i_comboMessenger()
Definition: i_qcombobox.h:45
void notifyHandler(bool selectionchanged)
friend class uiComboBoxBody
Definition: i_qcombobox.h:28
i_comboMessenger(QComboBox *sndr, uiComboBox *receiver)
Definition: i_qcombobox.h:31
uiComboBox * _receiver
Definition: i_qcombobox.h:49

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2017