OpendTect  6.3
i_qtabbar.h
Go to the documentation of this file.
1 #ifndef i_qtabbar_h
2 #define i_qtabbar_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: 14/02/2003
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "uitabbar.h"
15 
16 #include <QObject>
17 #include <QTabBar>
18 
19 
21 
25 QT_BEGIN_NAMESPACE
26 
27 class i_tabbarMessenger : public QObject
28 {
29  Q_OBJECT
30  friend class uiTabBarBody;
31 
32 protected:
33 i_tabbarMessenger( QTabBar* sndr, uiTabBar* receiver )
34  : sender_(sndr)
35  , receiver_(receiver)
36 {
37  connect( sndr, SIGNAL(currentChanged(int)), this, SLOT(selected(int)) );
38 }
39 
40 private:
41 
43  QTabBar* sender_;
44 
45 private slots:
46 
47  void selected ( int id )
48  {
49  const int refnr = receiver_->beginCmdRecEvent();
50  receiver_->selected.trigger(*receiver_);
51  receiver_->endCmdRecEvent( refnr );
52  }
53 
54 };
55 
56 QT_END_NAMESPACE
57 
58 #endif
i_tabbarMessenger(QTabBar *sndr, uiTabBar *receiver)
Definition: i_qtabbar.h:33
void selected(int id)
Definition: i_qtabbar.h:47
Notifier< uiTabBar > selected
Definition: uitabbar.h:45
TabBar widget only. Normally you&#39;d want to use the uiTabStack class.
Definition: uitabbar.h:23
void trigger()
Definition: notify.h:128
friend class uiTabBarBody
Definition: i_qtabbar.h:30
QTabBar * sender_
Definition: i_qtabbar.h:43
Helper class for uitabbar to relay Qt&#39;s &#39;currentChanged&#39; messages to uiAction.
Definition: i_qtabbar.h:27
uiTabBar * receiver_
Definition: i_qtabbar.h:42

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