OpendTect-6_4  6.4
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  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "uidial.h"
16 
17 #include <QObject>
18 #include <QDial>
19 
21 
25 QT_BEGIN_NAMESPACE
26 
27 class i_DialMessenger : public QObject
28 {
29  Q_OBJECT
30  friend class uiDialBody;
31 
32 protected:
33 
34 i_DialMessenger( QDial* sndr, uiDial* receiver )
35  : sender_(sndr)
36  , receiver_(receiver)
37 {
38  connect( sndr, SIGNAL(sliderMoved(int)), this, SLOT(sliderMoved(int)) );
39  connect( sndr, SIGNAL(sliderPressed()), this, SLOT(sliderPressed()) );
40  connect( sndr, SIGNAL(sliderReleased()), this, SLOT(sliderReleased()) );
41  connect( sndr, SIGNAL(valueChanged(int)), this, SLOT(valueChanged(int)) );
42 }
43 
44 
45 private:
46 
48  QDial* sender_;
49 
50 #define mTrigger( notifier ) \
51  const int refnr = receiver_->beginCmdRecEvent( #notifier ); \
52  receiver_->notifier.trigger(*receiver_); \
53  receiver_->endCmdRecEvent( refnr, #notifier );
54 
55 private slots:
56 
61 
62 #undef mTrigger
63 
64 };
65 
66 QT_END_NAMESPACE
67 
68 #endif
friend class uiDialBody
Definition: i_qdial.h:30
void valueChanged(int)
Definition: i_qdial.h:60
Helper class for uidial to relay Qt&#39;s messages.
Definition: i_qdial.h:27
void sliderMoved(int)
Definition: i_qdial.h:57
i_DialMessenger(QDial *sndr, uiDial *receiver)
Definition: i_qdial.h:34
void sliderReleased()
Definition: i_qdial.h:59
QDial * sender_
Definition: i_qdial.h:48
void sliderPressed()
Definition: i_qdial.h:58
#define mTrigger(notifier)
Definition: i_qdial.h:50
uiDial * receiver_
Definition: i_qdial.h:47
Definition: uidial.h:24

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