OpendTect-6_4  6.4
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  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uicombobox.h"
16 
17 #include <QComboBox>
18 
20 
24 QT_BEGIN_NAMESPACE
25 
26 class i_comboMessenger : public QObject
27 {
28  Q_OBJECT
29  friend class uiComboBoxBody;
30 
31 protected:
32  i_comboMessenger( QComboBox* sndr,
33  uiComboBox* receiver )
34  : _sender( sndr )
35  , _receiver( receiver )
36  {
37  connect( sndr, SIGNAL( activated (int)),
38  this, SLOT( activated (int)) );
39 
40  connect( sndr,
41  SIGNAL( editTextChanged(const QString&)),
42  this,
43  SLOT( editTextChanged(const QString&)) );
44  }
45 
46  virtual ~i_comboMessenger() {}
47 
48 private:
49 
51  QComboBox* _sender;
52 
53 private slots:
54 
60 void activated( int )
61 { _receiver->notifyHandler( true ); }
62 
63 
64 void editTextChanged( const QString& )
65 { _receiver->notifyHandler( false ); }
66 
67 
68 };
69 
70 QT_END_NAMESPACE
71 
72 #endif
Helper class for uiComboBox to relay Qt&#39;s &#39;activated&#39; messages to uiAction.
Definition: i_qcombobox.h:26
void activated(int)
Definition: i_qcombobox.h:60
void editTextChanged(const QString &)
Definition: i_qcombobox.h:64
Combo box.
Definition: uicombobox.h:32
QComboBox * _sender
Definition: i_qcombobox.h:51
virtual ~i_comboMessenger()
Definition: i_qcombobox.h:46
void notifyHandler(bool selectionchanged)
friend class uiComboBoxBody
Definition: i_qcombobox.h:29
i_comboMessenger(QComboBox *sndr, uiComboBox *receiver)
Definition: i_qcombobox.h:32
uiComboBox * _receiver
Definition: i_qcombobox.h:50

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