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

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