OpendTect  6.3
i_qdial.h
Go to the documentation of this file.
1 #ifndef i_qdial_h
2 #define i_qdial_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: Nanne Hemstra
9  Date: January 2010
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "uidial.h"
15 
16 #include <QObject>
17 #include <QDial>
18 
20 
24 QT_BEGIN_NAMESPACE
25 
26 class i_DialMessenger : public QObject
27 {
28  Q_OBJECT
29  friend class uiDialBody;
30 
31 protected:
32 
33 i_DialMessenger( QDial* sndr, uiDial* receiver )
34  : sender_(sndr)
35  , receiver_(receiver)
36 {
37  connect( sndr, SIGNAL(sliderMoved(int)), this, SLOT(sliderMoved(int)) );
38  connect( sndr, SIGNAL(sliderPressed()), this, SLOT(sliderPressed()) );
39  connect( sndr, SIGNAL(sliderReleased()), this, SLOT(sliderReleased()) );
40  connect( sndr, SIGNAL(valueChanged(int)), this, SLOT(valueChanged(int)) );
41 }
42 
43 
44 private:
45 
47  QDial* sender_;
48 
49 #define mTrigger( notifier ) \
50  const int refnr = receiver_->beginCmdRecEvent( #notifier ); \
51  receiver_->notifier.trigger(*receiver_); \
52  receiver_->endCmdRecEvent( refnr, #notifier );
53 
54 private slots:
55 
60 
61 #undef mTrigger
62 
63 };
64 
65 QT_END_NAMESPACE
66 
67 #endif
friend class uiDialBody
Definition: i_qdial.h:29
void valueChanged(int)
Definition: i_qdial.h:59
Helper class for uidial to relay Qt&#39;s messages.
Definition: i_qdial.h:26
void sliderMoved(int)
Definition: i_qdial.h:56
i_DialMessenger(QDial *sndr, uiDial *receiver)
Definition: i_qdial.h:33
void sliderReleased()
Definition: i_qdial.h:58
QDial * sender_
Definition: i_qdial.h:47
void sliderPressed()
Definition: i_qdial.h:57
#define mTrigger(notifier)
Definition: i_qdial.h:49
uiDial * receiver_
Definition: i_qdial.h:46
Definition: uidial.h:22

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