OpendTect  6.3
i_qspinbox.h
Go to the documentation of this file.
1 #ifndef i_qspinbox_h
2 #define i_qspinbox_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: 01/02/2001
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "uispinbox.h"
15 #include <QDoubleSpinBox>
16 
18 
22 QT_BEGIN_NAMESPACE
23 
24 class QString;
25 
26 class i_SpinBoxMessenger : public QObject
27 {
28  Q_OBJECT
29  friend class uiSpinBoxBody;
30 
31 protected:
32  i_SpinBoxMessenger(QDoubleSpinBox* sndr,
33  uiSpinBox* receiver)
34  : sender_(sndr)
35  , receiver_(receiver)
36  {
37  connect( sndr, SIGNAL(editingFinished()),
38  this, SLOT(editingFinished()) );
39  connect(sndr, SIGNAL(valueChanged(double)),
40  this, SLOT(valueChanged(double)) );
41  }
42 
43  virtual ~i_SpinBoxMessenger() {}
44 
45 private:
46 
48  QDoubleSpinBox* sender_;
49 
50 private slots:
51 
53  { receiver_->notifyHandler( true ); }
54  void valueChanged(double)
55  { receiver_->notifyHandler( false ); }
56 };
57 
58 QT_END_NAMESPACE
59 
60 #endif
void valueChanged(double)
Definition: i_qspinbox.h:54
virtual ~i_SpinBoxMessenger()
Definition: i_qspinbox.h:43
void editingFinished()
Definition: i_qspinbox.h:52
uiSpinBox * receiver_
Definition: i_qspinbox.h:47
QDoubleSpinBox * sender_
Definition: i_qspinbox.h:48
friend class uiSpinBoxBody
Definition: i_qspinbox.h:29
Definition: uispinbox.h:22
void notifyHandler(bool editingfinished)
i_SpinBoxMessenger(QDoubleSpinBox *sndr, uiSpinBox *receiver)
Definition: i_qspinbox.h:32
Definition: i_qspinbox.h:26

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